Revert "Explicitly recreate on ui mode changes"

This reverts commit 3ad79fe6a2.
pull/199/head
M66B 4 years ago
parent f7ffc52747
commit 5b4a5eab58

@ -153,21 +153,18 @@
<activity <activity
android:name=".ActivitySetup" android:name=".ActivitySetup"
android:configChanges="uiMode"
android:exported="false" android:exported="false"
android:launchMode="singleTask" android:launchMode="singleTask"
android:parentActivityName=".ActivityMain" /> android:parentActivityName=".ActivityMain" />
<activity <activity
android:name=".ActivitySignature" android:name=".ActivitySignature"
android:configChanges="uiMode"
android:exported="false" android:exported="false"
android:launchMode="singleTask" android:launchMode="singleTask"
android:parentActivityName=".ActivitySetup" /> android:parentActivityName=".ActivitySetup" />
<activity <activity
android:name=".ActivityWidget" android:name=".ActivityWidget"
android:configChanges="uiMode"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
@ -177,7 +174,6 @@
<activity <activity
android:name=".ActivityWidgetSync" android:name=".ActivityWidgetSync"
android:configChanges="uiMode"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
@ -187,7 +183,6 @@
<activity <activity
android:name=".ActivityWidgetUnified" android:name=".ActivityWidgetUnified"
android:configChanges="uiMode"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
@ -197,7 +192,6 @@
<activity <activity
android:name=".ActivityView" android:name=".ActivityView"
android:configChanges="uiMode"
android:exported="false" android:exported="false"
android:launchMode="singleTask" android:launchMode="singleTask"
android:parentActivityName=".ActivityMain" /> android:parentActivityName=".ActivityMain" />
@ -221,7 +215,6 @@
<activity <activity
android:name=".ActivityCompose" android:name=".ActivityCompose"
android:configChanges="uiMode"
android:exported="true" android:exported="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:parentActivityName=".ActivityView"> android:parentActivityName=".ActivityView">
@ -251,7 +244,6 @@
<activity <activity
android:name=".ActivityEML" android:name=".ActivityEML"
android:configChanges="uiMode"
android:exported="true" android:exported="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:launchMode="singleTask"> android:launchMode="singleTask">
@ -286,7 +278,6 @@
<activity <activity
android:name=".ActivityDSN" android:name=".ActivityDSN"
android:configChanges="uiMode"
android:exported="true" android:exported="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:launchMode="singleTask"> android:launchMode="singleTask">
@ -307,7 +298,6 @@
<activity <activity
android:name=".ActivityBilling" android:name=".ActivityBilling"
android:configChanges="uiMode"
android:exported="false" android:exported="false"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:launchMode="singleTask" /> android:launchMode="singleTask" />

@ -65,7 +65,6 @@ import java.util.Map;
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener { abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
private Context originalContext; private Context originalContext;
private int themeId;
private boolean visible; private boolean visible;
private boolean contacts; private boolean contacts;
private List<IKeyPressedListener> keyPressedListeners = new ArrayList<>(); private List<IKeyPressedListener> keyPressedListeners = new ArrayList<>();
@ -99,8 +98,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
if (!this.getClass().equals(ActivityMain.class)) { if (!this.getClass().equals(ActivityMain.class)) {
themeId = FragmentDialogTheme.getTheme(this); setTheme(FragmentDialogTheme.getTheme(this));
setTheme(themeId);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
boolean dark = Helper.isDarkTheme(this); boolean dark = Helper.isDarkTheme(this);
@ -194,10 +192,6 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
public void onConfigurationChanged(Configuration newConfig) { public void onConfigurationChanged(Configuration newConfig) {
Log.d("Config " + this.getClass().getName()); Log.d("Config " + this.getClass().getName());
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
if (!this.getClass().equals(ActivityMain.class) &&
themeId != FragmentDialogTheme.getTheme(this))
recreate();
} }
@Override @Override

Loading…
Cancel
Save