From ed0c16e2019c723347166afb12da98a8894bbc83 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 28 Mar 2018 02:36:03 +0800 Subject: [PATCH] Update for new lint --- src/main/java/com/topjohnwu/magisk/SplashActivity.java | 5 ----- src/main/java/com/topjohnwu/magisk/components/Activity.java | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/topjohnwu/magisk/SplashActivity.java b/src/main/java/com/topjohnwu/magisk/SplashActivity.java index 50c45f2b0..fa5fb0555 100644 --- a/src/main/java/com/topjohnwu/magisk/SplashActivity.java +++ b/src/main/java/com/topjohnwu/magisk/SplashActivity.java @@ -17,11 +17,6 @@ import com.topjohnwu.superuser.Shell; public class SplashActivity extends Activity { - @Override - public int getDarkTheme() { - return -1; - } - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/src/main/java/com/topjohnwu/magisk/components/Activity.java b/src/main/java/com/topjohnwu/magisk/components/Activity.java index 68c5a7e40..d97123ff2 100644 --- a/src/main/java/com/topjohnwu/magisk/components/Activity.java +++ b/src/main/java/com/topjohnwu/magisk/components/Activity.java @@ -33,7 +33,9 @@ public abstract class Activity extends AppCompatActivity { } @StyleRes - abstract public int getDarkTheme(); + public int getDarkTheme() { + return -1; + } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -41,7 +43,7 @@ public abstract class Activity extends AppCompatActivity { if (this instanceof Topic.Subscriber) { ((Topic.Subscriber) this).subscribeTopics(); } - if (getMagiskManager().isDarkTheme && getDarkTheme() > 0) { + if (getMagiskManager().isDarkTheme && getDarkTheme() != -1) { setTheme(getDarkTheme()); } }