Merge "[PostBoot] Do not destroy post boot loader because of theme change" into main

This commit is contained in:
Fengjiang Li
2024-10-24 07:59:24 +00:00
committed by Android (Google) Code Review
@@ -50,6 +50,8 @@ public abstract class BaseDraggingActivity extends BaseActivity
// automatically when user interacts with the launcher.
public static final Object AUTO_CANCEL_ACTION_MODE = new Object();
private boolean mIsThemeUpdatedBeforeRecreate;
private ActionMode mCurrentActionMode;
private int mThemeRes = R.style.AppTheme;
@@ -80,8 +82,13 @@ public abstract class BaseDraggingActivity extends BaseActivity
updateTheme();
}
private void updateTheme() {
public boolean isThemeUpdatedBeforeRecreate() {
return mIsThemeUpdatedBeforeRecreate;
}
protected void updateTheme() {
if (mThemeRes != Themes.getActivityThemeRes(this)) {
mIsThemeUpdatedBeforeRecreate = true;
recreate();
}
}