From e6e04cc5b396de62be0104e1db79c8f5783700be Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 16 Oct 2017 11:51:34 +0800 Subject: [PATCH] Add reference ASAP --- app/src/main/java/com/topjohnwu/magisk/MagiskManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/MagiskManager.java b/app/src/main/java/com/topjohnwu/magisk/MagiskManager.java index cc813c58c..e47f34c7a 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MagiskManager.java +++ b/app/src/main/java/com/topjohnwu/magisk/MagiskManager.java @@ -114,6 +114,10 @@ public class MagiskManager extends Application { private static Handler mHandler = new Handler(); private boolean started = false; + public MagiskManager() { + weakSelf = new WeakReference<>(this); + } + private class LoadLocale extends ParallelTask { @Override @@ -140,7 +144,6 @@ public class MagiskManager extends Application { suDB = new SuDatabaseHelper(Utils.getEncContext()); } - weakSelf = new WeakReference<>(this); repoDB = new RepoDatabaseHelper(this); defaultLocale = Locale.getDefault(); setLocale();