@@ -0,0 +1,1076 @@
+package com.camnter.newlife.utils;%0A%0Aimport android.app.Activity;%0A%0Aimport java.lang.ref.WeakReference;%0A%0A/**%0A * Description%EF%BC%9AActivityManager%0A * Created by%EF%BC%9ACaMnter%0A * Time%EF%BC%9A2016-02-27 21:54%0A */%0Apublic class ActivityManager %7B%0A%0A    private static ActivityManager instance = new ActivityManager();%0A    private WeakReference%3CActivity%3E activityWeakReference;%0A%0A%0A    private ActivityManager() %7B%0A    %7D%0A%0A    /**%0A     * %E8%8E%B7%E5%BE%97 ActivityManager %E5%AE%9E%E4%BE%8B%0A     *%0A     * @return ActivityManager%0A     */%0A    public static ActivityManager getInstance() %7B%0A        return instance;%0A    %7D%0A%0A    /**%0A     * %E8%8E%B7%E5%BE%97 %E5%BC%B1%E5%BC%95%E7%94%A8 %E7%BC%93%E5%AD%98%E7%9A%84 Activity%0A     *%0A     * @return Activity%0A     */%0A    public Activity getCurrentActivity() %7B%0A        Activity currentActivity = null;%0A        if (activityWeakReference != null) %7B%0A            currentActivity = activityWeakReference.get();%0A        %7D%0A        return currentActivity;%0A    %7D%0A%0A    /**%0A     * %E8%8E%B7%E5%BE%97 %E8%AE%BE%E7%BD%AE Activity %E4%B8%BA%E5%BC%B1%E5%BC%95%E7%94%A8%0A     *%0A     * @param activity activity%0A     */%0A    public void setCurrentActivity(Activity activity) %7B%0A        activityWeakReference = new WeakReference%3C%3E(activity);%0A    %7D%0A%0A%7D%0A

Add ActivityManager