src/com/europalab/caldavsyncadapter/Appctxpro.java

branch
ICAL4J_EMBED_1
changeset 21
af4693956263
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/com/europalab/caldavsyncadapter/Appctxpro.java	Sat Feb 14 00:28:10 2015 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +/**
     1.5 + * Copyright © 2015, Michael Schloh von Bennewitz
     1.6 + *
     1.7 + * This project source file is free software: you can redistribute
     1.8 + * it and/or modify it under the terms of the GNU General Public License
     1.9 + * as published by the Free Software Foundation, either version 3 of the
    1.10 + * License, or at your option any later version.
    1.11 + *
    1.12 + * Andoid Caldav Sync Adapter Free is distributed in the hope that
    1.13 + * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    1.14 + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.15 + * GNU General Public License for more details.
    1.16 + *
    1.17 + * You should have received a copy of the GNU General Public License
    1.18 + * along with Andoid Caldav Sync Adapter Free.
    1.19 + * If not, see <http://www.gnu.org/licenses/>.
    1.20 + */
    1.21 +
    1.22 +package com.europalab.caldavsyn;
    1.23 +
    1.24 +import android.app.Application;
    1.25 +import android.content.Context;
    1.26 +
    1.27 +public class Appctxpro extends Application {
    1.28 +    // Store a app context reference
    1.29 +    private static Context sContext;
    1.30 +
    1.31 +    // Construct a ctx provider
    1.32 +    public Appctxpro() {
    1.33 +        super();
    1.34 +        sContext = this;
    1.35 +    }
    1.36 +
    1.37 +    // Context accessor methods
    1.38 +    public static Context getContext() {
    1.39 +        return sContext;
    1.40 +    }
    1.41 +    public static void setContext(Context aContext) {
    1.42 +        sContext = aContext;
    1.43 +    }
    1.44 +}

mercurial