mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Merge "Revert "Refactor the OnUserUnlock code out of RecentsAnimationDeviceState and"" into tm-qpr-dev am: 8989f839f5 am: bcfc5acb9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21142878 Change-Id: Ib2d66bf6b341da53bf7f835ec534e450f24f2ed6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -89,7 +89,6 @@ import com.android.launcher3.tracing.LauncherTraceProto;
|
||||
import com.android.launcher3.tracing.TouchInteractionServiceProto;
|
||||
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.LockedUserState;
|
||||
import com.android.launcher3.util.OnboardingPrefs;
|
||||
import com.android.launcher3.util.TraceHelper;
|
||||
import com.android.quickstep.inputconsumers.AccessibilityInputConsumer;
|
||||
@@ -413,8 +412,8 @@ public class TouchInteractionService extends Service
|
||||
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
|
||||
|
||||
// Call runOnUserUnlocked() before any other callbacks to ensure everything is initialized.
|
||||
LockedUserState.get(this).runOnUserUnlocked(this::onUserUnlocked);
|
||||
LockedUserState.get(this).runOnUserUnlocked(mTaskbarManager::onUserUnlocked);
|
||||
mDeviceState.runOnUserUnlocked(this::onUserUnlocked);
|
||||
mDeviceState.runOnUserUnlocked(mTaskbarManager::onUserUnlocked);
|
||||
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
|
||||
|
||||
ProtoTracer.INSTANCE.get(this).add(this);
|
||||
@@ -484,7 +483,7 @@ public class TouchInteractionService extends Service
|
||||
}
|
||||
|
||||
private void resetHomeBounceSeenOnQuickstepEnabledFirstTime() {
|
||||
if (!LockedUserState.get(this).isUserUnlocked() || mDeviceState.isButtonNavMode()) {
|
||||
if (!mDeviceState.isUserUnlocked() || mDeviceState.isButtonNavMode()) {
|
||||
// Skip if not yet unlocked (can't read user shared prefs) or if the current navigation
|
||||
// mode doesn't have gestures
|
||||
return;
|
||||
@@ -527,7 +526,7 @@ public class TouchInteractionService extends Service
|
||||
|
||||
@UiThread
|
||||
private void onSystemUiFlagsChanged(int lastSysUIFlags) {
|
||||
if (LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (mDeviceState.isUserUnlocked()) {
|
||||
int systemUiStateFlags = mDeviceState.getSystemUiStateFlags();
|
||||
SystemUiProxy.INSTANCE.get(this).setLastSystemUiStateFlags(systemUiStateFlags);
|
||||
mOverviewComponentObserver.onSystemUiStateChanged();
|
||||
@@ -572,7 +571,7 @@ public class TouchInteractionService extends Service
|
||||
|
||||
@UiThread
|
||||
private void onAssistantVisibilityChanged() {
|
||||
if (LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (mDeviceState.isUserUnlocked()) {
|
||||
mOverviewComponentObserver.getActivityInterface().onAssistantVisibilityChanged(
|
||||
mDeviceState.getAssistantVisibility());
|
||||
}
|
||||
@@ -582,7 +581,7 @@ public class TouchInteractionService extends Service
|
||||
public void onDestroy() {
|
||||
Log.d(TAG, "Touch service destroyed: user=" + getUserId());
|
||||
sIsInitialized = false;
|
||||
if (LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (mDeviceState.isUserUnlocked()) {
|
||||
mInputConsumer.unregisterInputConsumer();
|
||||
mOverviewComponentObserver.onDestroy();
|
||||
}
|
||||
@@ -616,7 +615,7 @@ public class TouchInteractionService extends Service
|
||||
TestLogging.recordMotionEvent(
|
||||
TestProtocol.SEQUENCE_TIS, "TouchInteractionService.onInputEvent", event);
|
||||
|
||||
if (!LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (!mDeviceState.isUserUnlocked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -640,8 +639,7 @@ public class TouchInteractionService extends Service
|
||||
mGestureState = newGestureState;
|
||||
mConsumer = newConsumer(prevGestureState, mGestureState, event);
|
||||
mUncheckedConsumer = mConsumer;
|
||||
} else if (LockedUserState.get(this).isUserUnlocked()
|
||||
&& mDeviceState.isFullyGesturalNavMode()
|
||||
} else if (mDeviceState.isUserUnlocked() && mDeviceState.isFullyGesturalNavMode()
|
||||
&& mDeviceState.canTriggerAssistantAction(event)) {
|
||||
mGestureState = createGestureState(mGestureState, isTrackpadMotionEvent(event));
|
||||
// Do not change mConsumer as if there is an ongoing QuickSwitch gesture, we
|
||||
@@ -764,7 +762,7 @@ public class TouchInteractionService extends Service
|
||||
|
||||
boolean canStartSystemGesture = mDeviceState.canStartSystemGesture();
|
||||
|
||||
if (!LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (!mDeviceState.isUserUnlocked()) {
|
||||
CompoundString reasonString = newCompoundString("device locked");
|
||||
InputConsumer consumer;
|
||||
if (canStartSystemGesture) {
|
||||
@@ -1111,7 +1109,7 @@ public class TouchInteractionService extends Service
|
||||
}
|
||||
|
||||
private void preloadOverview(boolean fromInit, boolean forSUWAllSet) {
|
||||
if (!LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (!mDeviceState.isUserUnlocked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1143,7 +1141,7 @@ public class TouchInteractionService extends Service
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
if (!LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (!mDeviceState.isUserUnlocked()) {
|
||||
return;
|
||||
}
|
||||
final BaseActivityInterface activityInterface =
|
||||
@@ -1184,7 +1182,7 @@ public class TouchInteractionService extends Service
|
||||
} else {
|
||||
// Dump everything
|
||||
FeatureFlags.dump(pw);
|
||||
if (LockedUserState.get(this).isUserUnlocked()) {
|
||||
if (mDeviceState.isUserUnlocked()) {
|
||||
PluginManagerWrapper.INSTANCE.get(getBaseContext()).dump(pw);
|
||||
}
|
||||
mDeviceState.dump(pw);
|
||||
|
||||
Reference in New Issue
Block a user