mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
DO NOT MERGE Revert "Defer recreation until resumed"
Bug: 171707437 Test: Repro steps in bug This reverts commit3f8d868110. Change-Id: I909ab701c674fe975982a7de06dc9e89dcd03aea (cherry picked from commit272f4541f9)
This commit is contained in:
committed by
Sunny Goyal
parent
e676914740
commit
c4bef358b0
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user