mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2025-06-05 22:19:12 +02:00
Add a workaround for theme not being correctly applied
on some Android versions
This commit is contained in:
@@ -3,6 +3,7 @@ package dummydomain.yetanothercallblocker;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
@@ -89,6 +90,12 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
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();
|
super.onStart();
|
||||||
|
|
||||||
EventUtils.register(this);
|
EventUtils.register(this);
|
||||||
|
Reference in New Issue
Block a user