package com.joker.fourfun;

import android.app.Application;

import com.squareup.leakcanary.LeakCanary;

/**
 * Created by joker on 2016/11/27.
 */

public class FourFun extends Application {
    private static FourFun instance;

    public static FourFun getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        if (LeakCanary.isInAnalyzerProcess(this)) {
            return;
        }
        LeakCanary.install(this);
    }
}

@@ -52,16 +52,48 @@
 ication;
+%0Aimport android.content.Context;
 %0A%0Aimport
@@ -544,11 +544,101 @@
 );%0A    %7D
+%0A%0A    public Context getContext() %7B%0A        return instance.getApplicationContext();%0A    %7D
 %0A%7D%0A

add a method