mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Invalidate snapshot of home if its UI is changed
Snapshot may be enabled for home task when turning off
screen. If home UI has changed after screen off, the
snapshot should not be used to avoid ugly visual effect.
Bug: 140811348
Test: Lock/unlock device while home is on top with 4 cases:
1. All apps is shown.
2. Overview is shown.
3. Options menu is shown.
4. Quick search bar is active.
The expected result should be no starting window
when unlocking because the snapshot is dropped.
Change-Id: I4bd9926b6f9332ac16b1b3a25ffdd44706015a33
(cherry picked from commit 0ae61c8d29)
This commit is contained in:
@@ -54,6 +54,7 @@ import com.android.quickstep.SystemUiProxy;
|
||||
import com.android.quickstep.util.RemoteFadeOutAnimationListener;
|
||||
import com.android.quickstep.util.ShelfPeekAnim;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@@ -157,6 +158,12 @@ public abstract class BaseQuickstepLauncher extends Launcher
|
||||
RecentsModel.INSTANCE.get(this).onTrimMemory(level);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onUiChangedWhileSleeping() {
|
||||
// Remove the snapshot because the content view may have obvious changes.
|
||||
ActivityManagerWrapper.getInstance().invalidateHomeTaskSnapshot(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startIntentSenderForResult(IntentSender intent, int requestCode,
|
||||
Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) {
|
||||
|
||||
Reference in New Issue
Block a user