Update for new lint

This commit is contained in:
topjohnwu 2018-03-28 02:36:03 +08:00
parent 209fdf349a
commit ed0c16e201
2 changed files with 4 additions and 7 deletions

View File

@ -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);

View File

@ -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());
}
}