/*
 * Copyright (C) 2012 Soomla Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.soomla.store;

import android.app.Application;
import android.content.Context;

public class SoomlaApp extends Application{
	public static SoomlaApp mInstance = null;
    
	public static SoomlaApp instance() {
    	return mInstance;
    }
	
	public static Context getAppContext()
	{
		return instance()._getAppContext();
	}

    @Override
    public void onCreate() {
        super.onCreate();
        mInstance = this;
    }

    protected Context _getAppContext() {
        return getApplicationContext();
    }
}

@@ -730,17 +730,21 @@
 cation%7B%0A
-%09
+%0A    
 public s
@@ -781,14 +781,13 @@
 ll;%0A
+%0A
     
-%0A%09
 publ
@@ -823,17 +823,20 @@
 ) %7B%0A    
-%09
+    
 return m
@@ -855,17 +855,20 @@
   %7D%0A
-%09%0A%09public
+%0A    private
  sta
@@ -883,67 +883,16 @@
 ext 
-getAppContext()%0A%09%7B%0A%09%09return instance()._getAppContext();%0A%09%7D
+context;
 %0A%0A  
@@ -992,34 +992,177 @@
     
-%7D%0A%0A    protected Context _
+    context = getApplicationContext();%0A    %7D%0A%0A    public static void setExternalContext(Context oContext) %7B%0A        context = oContext;%0A    %7D%0A%0A    public static Context 
 getA
@@ -1190,39 +1190,23 @@
  return 
-getApplicationC
+c
 ontext
-()
 ;%0A    %7D%0A

revert removing of setExternalContext