Improve preference, use leakcanary, start GalleryDetailScene
This commit is contained in:
1 parent
9b6815c60c
commit
2130e7a8dd
42 files changed
+1289
-386
No files matched your search
@@ -16,15 +16,23 @@
|
||||
package com.hippo.scene;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
import com.squareup.leakcanary.RefWatcher;
|
||||
|
||||
public class SceneApplication extends Application {
|
||||
|
||||
private SceneManager mSceneManager;
|
||||
|
||||
private RefWatcher mRefWatcher;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
mRefWatcher = LeakCanary.install(this);
|
||||
|
||||
mSceneManager = SceneManager.getInstance();
|
||||
StageActivity.setSceneManager(mSceneManager);
|
||||
Scene.setSceneManager(mSceneManager);
|
||||
@@ -33,4 +41,9 @@ public class SceneApplication extends Application {
|
||||
public SceneManager getSceneManager() {
|
||||
return mSceneManager;
|
||||
}
|
||||
|
||||
public static RefWatcher getRefWatcher(Context context) {
|
||||
SceneApplication application = (SceneApplication) context.getApplicationContext();
|
||||
return application.mRefWatcher;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user