Merge "Finish the recents animation when the phone goes to sleep" into sc-dev am: afb2cb2cc8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14245224 Change-Id: If12ec2c88e1e27209c3bd7a2aee8246b7bb7afea
This commit is contained in:
@@ -23,6 +23,7 @@ import static com.android.launcher3.LauncherState.NO_OFFSET;
|
|||||||
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
|
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
|
||||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||||
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
|
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
|
||||||
|
import static com.android.quickstep.util.NavigationModeFeatureFlag.LIVE_TILE;
|
||||||
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY;
|
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY;
|
||||||
|
|
||||||
import android.animation.AnimatorSet;
|
import android.animation.AnimatorSet;
|
||||||
@@ -189,6 +190,15 @@ public abstract class BaseQuickstepLauncher extends Launcher
|
|||||||
() -> ActivityManagerWrapper.getInstance().invalidateHomeTaskSnapshot(this));
|
() -> ActivityManagerWrapper.getInstance().invalidateHomeTaskSnapshot(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onScreenOff() {
|
||||||
|
super.onScreenOff();
|
||||||
|
if (LIVE_TILE.get()) {
|
||||||
|
RecentsView recentsView = getOverviewPanel();
|
||||||
|
recentsView.finishRecentsAnimation(true /* toRecents */, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startIntentSenderForResult(IntentSender intent, int requestCode,
|
public void startIntentSenderForResult(IntentSender intent, int requestCode,
|
||||||
Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) {
|
Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) {
|
||||||
|
|||||||
@@ -1337,14 +1337,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
|
|||||||
private final BroadcastReceiver mScreenOffReceiver = new BroadcastReceiver() {
|
private final BroadcastReceiver mScreenOffReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
// Reset AllApps to its initial state only if we are not in the middle of
|
onScreenOff();
|
||||||
// processing a multi-step drop
|
|
||||||
if (mPendingRequestArgs == null) {
|
|
||||||
if (!isInState(NORMAL)) {
|
|
||||||
onUiChangedWhileSleeping();
|
|
||||||
}
|
|
||||||
mStateManager.goToState(NORMAL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1914,6 +1907,17 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void onScreenOff() {
|
||||||
|
// Reset AllApps to its initial state only if we are not in the middle of
|
||||||
|
// processing a multi-step drop
|
||||||
|
if (mPendingRequestArgs == null) {
|
||||||
|
if (!isInState(NORMAL)) {
|
||||||
|
onUiChangedWhileSleeping();
|
||||||
|
}
|
||||||
|
mStateManager.goToState(NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.M)
|
@TargetApi(Build.VERSION_CODES.M)
|
||||||
@Override
|
@Override
|
||||||
protected boolean onErrorStartingShortcut(Intent intent, ItemInfo info) {
|
protected boolean onErrorStartingShortcut(Intent intent, ItemInfo info) {
|
||||||
|
|||||||
Reference in New Issue
Block a user