DO NOT MERGE Revert "Defer recreation until resumed"

Bug: 171707437
Test: Repro steps in bug

This reverts commit 3f8d868110.

Change-Id: I909ab701c674fe975982a7de06dc9e89dcd03aea
(cherry picked from commit 272f4541f9)
This commit is contained in:
Winson Chung
2020-10-28 00:13:03 -07:00
committed by Sunny Goyal
parent e676914740
commit c4bef358b0
2 changed files with 1 additions and 13 deletions

View File

@@ -42,7 +42,6 @@ import android.widget.Toast;
import androidx.annotation.Nullable;
import com.android.launcher3.Launcher.OnResumeCallback;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.logging.InstanceId;
import com.android.launcher3.logging.InstanceIdSequence;
@@ -108,20 +107,10 @@ public abstract class BaseDraggingActivity extends BaseActivity
private void updateTheme() {
if (mThemeRes != Themes.getActivityThemeRes(this)) {
// Workaround (b/162812884): The system currently doesn't allow recreating an activity
// when it is not resumed, in such a case defer recreation until it is possible
if (hasBeenResumed()) {
recreate();
} else {
addOnResumeCallback(this::recreate);
}
recreate();
}
}
protected void addOnResumeCallback(OnResumeCallback callback) {
// To be overridden
}
@Override
public void onActionModeStarted(ActionMode mode) {
super.onActionModeStarted(mode);