mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2024-12-23 23:47:21 +01:00
Add a workaround for theme not being correctly applied
on some Android versions
This commit is contained in:
parent
5bc11077d7
commit
3d832cf6e8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user