diff --git a/app/src/main/java/dummydomain/yetanothercallblocker/MainActivity.java b/app/src/main/java/dummydomain/yetanothercallblocker/MainActivity.java index cbd86c5..812b87f 100644 --- a/app/src/main/java/dummydomain/yetanothercallblocker/MainActivity.java +++ b/app/src/main/java/dummydomain/yetanothercallblocker/MainActivity.java @@ -3,6 +3,7 @@ package dummydomain.yetanothercallblocker; import android.annotation.SuppressLint; import android.content.Intent; import android.os.AsyncTask; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Parcelable; @@ -89,6 +90,12 @@ public class MainActivity extends AppCompatActivity { @Override protected void onStart() { + // workaround for a black/non-responsive activity after theme change + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP + && Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { + getDelegate().setLocalNightMode(settings.getUiMode()); + } + super.onStart(); EventUtils.register(this);