Device always wakes up when the bouncer shows
Else, we can end up stuck on the bouncer in AoD. Also, remove unnecessay injections into CentralSurfacesImpl. Fixes: 223747700 Test: Enroll udfps & aod, lock down device, wait for AOD, longpress lock icon, then repeat, should never get stuck on the bouncer Test: atest SystemUITests Change-Id: Ib79f54a9c25adeaabdf90039bc04a3dea0ad26a2
This commit is contained in:
@@ -650,7 +650,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
Process.myUid(),
|
Process.myUid(),
|
||||||
getContext().getOpPackageName(),
|
getContext().getOpPackageName(),
|
||||||
UdfpsController.EFFECT_CLICK,
|
UdfpsController.EFFECT_CLICK,
|
||||||
"lock-icon-device-entry",
|
"lock-screen-lock-icon-longpress",
|
||||||
TOUCH_VIBRATION_ATTRIBUTES);
|
TOUCH_VIBRATION_ATTRIBUTES);
|
||||||
|
|
||||||
mKeyguardViewController.showBouncer(/* scrim */ true);
|
mKeyguardViewController.showBouncer(/* scrim */ true);
|
||||||
@@ -675,6 +675,12 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isActionable() {
|
private boolean isActionable() {
|
||||||
|
if (mIsBouncerShowing) {
|
||||||
|
Log.v(TAG, "lock icon long-press ignored, bouncer already showing.");
|
||||||
|
// a long press gestures from AOD may have already triggered the bouncer to show,
|
||||||
|
// so this touch is no longer actionable
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return mUdfpsSupported || mShowUnlockIcon;
|
return mUdfpsSupported || mShowUnlockIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import static android.hardware.biometrics.BiometricFingerprintConstants.FINGERPR
|
|||||||
import static android.hardware.biometrics.BiometricOverlayConstants.REASON_AUTH_KEYGUARD;
|
import static android.hardware.biometrics.BiometricOverlayConstants.REASON_AUTH_KEYGUARD;
|
||||||
|
|
||||||
import static com.android.internal.util.Preconditions.checkNotNull;
|
import static com.android.internal.util.Preconditions.checkNotNull;
|
||||||
|
import static com.android.systemui.classifier.Classifier.LOCK_ICON;
|
||||||
import static com.android.systemui.classifier.Classifier.UDFPS_AUTHENTICATION;
|
import static com.android.systemui.classifier.Classifier.UDFPS_AUTHENTICATION;
|
||||||
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
@@ -167,11 +168,16 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
private final Set<Callback> mCallbacks = new HashSet<>();
|
private final Set<Callback> mCallbacks = new HashSet<>();
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public static final VibrationAttributes VIBRATION_ATTRIBUTES =
|
public static final VibrationAttributes UDFPS_VIBRATION_ATTRIBUTES =
|
||||||
new VibrationAttributes.Builder()
|
new VibrationAttributes.Builder()
|
||||||
// vibration will bypass battery saver mode:
|
// vibration will bypass battery saver mode:
|
||||||
.setUsage(VibrationAttributes.USAGE_COMMUNICATION_REQUEST)
|
.setUsage(VibrationAttributes.USAGE_COMMUNICATION_REQUEST)
|
||||||
.build();
|
.build();
|
||||||
|
@VisibleForTesting
|
||||||
|
public static final VibrationAttributes LOCK_ICON_VIBRATION_ATTRIBUTES =
|
||||||
|
new VibrationAttributes.Builder()
|
||||||
|
.setUsage(VibrationAttributes.USAGE_TOUCH)
|
||||||
|
.build();
|
||||||
|
|
||||||
// haptic to use for successful device entry
|
// haptic to use for successful device entry
|
||||||
public static final VibrationEffect EFFECT_CLICK =
|
public static final VibrationEffect EFFECT_CLICK =
|
||||||
@@ -671,7 +677,7 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
mContext.getOpPackageName(),
|
mContext.getOpPackageName(),
|
||||||
EFFECT_CLICK,
|
EFFECT_CLICK,
|
||||||
"udfps-onStart-click",
|
"udfps-onStart-click",
|
||||||
VIBRATION_ATTRIBUTES);
|
UDFPS_VIBRATION_ATTRIBUTES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -748,7 +754,19 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
|
if (!mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
|
||||||
|
if (mFalsingManager.isFalseTouch(LOCK_ICON)) {
|
||||||
|
Log.v(TAG, "aod lock icon long-press rejected by the falsing manager.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
mKeyguardViewManager.showBouncer(true);
|
mKeyguardViewManager.showBouncer(true);
|
||||||
|
|
||||||
|
// play the same haptic as the LockIconViewController longpress
|
||||||
|
mVibrator.vibrate(
|
||||||
|
Process.myUid(),
|
||||||
|
mContext.getOpPackageName(),
|
||||||
|
UdfpsController.EFFECT_CLICK,
|
||||||
|
"aod-lock-icon-longpress",
|
||||||
|
LOCK_ICON_VIBRATION_ATTRIBUTES);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -560,8 +560,6 @@ public interface CentralSurfaces extends Dumpable, ActivityStarter, LifecycleOwn
|
|||||||
|
|
||||||
void setLaunchEmergencyActionOnFinishedWaking(boolean launch);
|
void setLaunchEmergencyActionOnFinishedWaking(boolean launch);
|
||||||
|
|
||||||
void setTopHidesStatusBar(boolean hides);
|
|
||||||
|
|
||||||
QSPanelController getQSPanelController();
|
QSPanelController getQSPanelController();
|
||||||
|
|
||||||
boolean areNotificationAlertsDisabled();
|
boolean areNotificationAlertsDisabled();
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ import com.android.systemui.dagger.qualifiers.Main;
|
|||||||
import com.android.systemui.dagger.qualifiers.UiBackground;
|
import com.android.systemui.dagger.qualifiers.UiBackground;
|
||||||
import com.android.systemui.demomode.DemoMode;
|
import com.android.systemui.demomode.DemoMode;
|
||||||
import com.android.systemui.demomode.DemoModeController;
|
import com.android.systemui.demomode.DemoModeController;
|
||||||
import com.android.systemui.dreams.DreamOverlayStateController;
|
|
||||||
import com.android.systemui.emergency.EmergencyGesture;
|
import com.android.systemui.emergency.EmergencyGesture;
|
||||||
import com.android.systemui.flags.FeatureFlags;
|
import com.android.systemui.flags.FeatureFlags;
|
||||||
import com.android.systemui.flags.Flags;
|
import com.android.systemui.flags.Flags;
|
||||||
@@ -198,7 +197,6 @@ import com.android.systemui.statusbar.PowerButtonReveal;
|
|||||||
import com.android.systemui.statusbar.PulseExpansionHandler;
|
import com.android.systemui.statusbar.PulseExpansionHandler;
|
||||||
import com.android.systemui.statusbar.StatusBarState;
|
import com.android.systemui.statusbar.StatusBarState;
|
||||||
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
||||||
import com.android.systemui.statusbar.connectivity.NetworkController;
|
|
||||||
import com.android.systemui.statusbar.core.StatusBarInitializer;
|
import com.android.systemui.statusbar.core.StatusBarInitializer;
|
||||||
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
|
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
|
||||||
import com.android.systemui.statusbar.notification.NotifPipelineFlags;
|
import com.android.systemui.statusbar.notification.NotifPipelineFlags;
|
||||||
@@ -207,7 +205,6 @@ import com.android.systemui.statusbar.notification.NotificationEntryManager;
|
|||||||
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
|
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
|
||||||
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
|
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
|
||||||
import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager;
|
import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager;
|
||||||
import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource;
|
|
||||||
import com.android.systemui.statusbar.notification.init.NotificationsController;
|
import com.android.systemui.statusbar.notification.init.NotificationsController;
|
||||||
import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
|
import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
|
||||||
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
|
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
|
||||||
@@ -238,7 +235,6 @@ import com.android.systemui.util.WallpaperController;
|
|||||||
import com.android.systemui.util.concurrency.DelayableExecutor;
|
import com.android.systemui.util.concurrency.DelayableExecutor;
|
||||||
import com.android.systemui.util.concurrency.MessageRouter;
|
import com.android.systemui.util.concurrency.MessageRouter;
|
||||||
import com.android.systemui.volume.VolumeComponent;
|
import com.android.systemui.volume.VolumeComponent;
|
||||||
import com.android.systemui.wmshell.BubblesManager;
|
|
||||||
import com.android.wm.shell.bubbles.Bubbles;
|
import com.android.wm.shell.bubbles.Bubbles;
|
||||||
import com.android.wm.shell.startingsurface.SplashscreenContentDrawer;
|
import com.android.wm.shell.startingsurface.SplashscreenContentDrawer;
|
||||||
import com.android.wm.shell.startingsurface.StartingSurface;
|
import com.android.wm.shell.startingsurface.StartingSurface;
|
||||||
@@ -307,7 +303,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
|
private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
|
||||||
private final DreamOverlayStateController mDreamOverlayStateController;
|
|
||||||
private CentralSurfacesCommandQueueCallbacks mCommandQueueCallbacks;
|
private CentralSurfacesCommandQueueCallbacks mCommandQueueCallbacks;
|
||||||
private float mTransitionToFullShadeProgress = 0f;
|
private float mTransitionToFullShadeProgress = 0f;
|
||||||
private NotificationListContainer mNotifListContainer;
|
private NotificationListContainer mNotifListContainer;
|
||||||
@@ -404,11 +399,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
mLaunchEmergencyActionWhenFinishedWaking = launch;
|
mLaunchEmergencyActionWhenFinishedWaking = launch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setTopHidesStatusBar(boolean hides) {
|
|
||||||
mTopHidesStatusBar = hides;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QSPanelController getQSPanelController() {
|
public QSPanelController getQSPanelController() {
|
||||||
return mQSPanelController;
|
return mQSPanelController;
|
||||||
@@ -452,7 +442,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
private BiometricUnlockController mBiometricUnlockController;
|
private BiometricUnlockController mBiometricUnlockController;
|
||||||
private final LightBarController mLightBarController;
|
private final LightBarController mLightBarController;
|
||||||
private final Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
|
private final Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
|
||||||
private final LockscreenGestureLogger mLockscreenGestureLogger;
|
|
||||||
@Nullable
|
@Nullable
|
||||||
protected LockscreenWallpaper mLockscreenWallpaper;
|
protected LockscreenWallpaper mLockscreenWallpaper;
|
||||||
private final AutoHideController mAutoHideController;
|
private final AutoHideController mAutoHideController;
|
||||||
@@ -519,9 +508,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
|
|
||||||
private boolean mExpandedVisible;
|
private boolean mExpandedVisible;
|
||||||
|
|
||||||
private final int[] mAbsPos = new int[2];
|
|
||||||
|
|
||||||
private final NotifShadeEventSource mNotifShadeEventSource;
|
|
||||||
protected final NotificationEntryManager mEntryManager;
|
protected final NotificationEntryManager mEntryManager;
|
||||||
private final NotificationGutsManager mGutsManager;
|
private final NotificationGutsManager mGutsManager;
|
||||||
private final NotificationLogger mNotificationLogger;
|
private final NotificationLogger mNotificationLogger;
|
||||||
@@ -603,7 +589,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Handler mMainHandler;
|
|
||||||
private final DelayableExecutor mMainExecutor;
|
private final DelayableExecutor mMainExecutor;
|
||||||
|
|
||||||
private int mInteractingWindows;
|
private int mInteractingWindows;
|
||||||
@@ -637,12 +622,9 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
|
|
||||||
// Fingerprint (as computed by getLoggingFingerprint() of the last logged state.
|
// Fingerprint (as computed by getLoggingFingerprint() of the last logged state.
|
||||||
private int mLastLoggedStateFingerprint;
|
private int mLastLoggedStateFingerprint;
|
||||||
private boolean mTopHidesStatusBar;
|
|
||||||
private boolean mStatusBarWindowHidden;
|
|
||||||
private boolean mIsLaunchingActivityOverLockscreen;
|
private boolean mIsLaunchingActivityOverLockscreen;
|
||||||
|
|
||||||
private final UserSwitcherController mUserSwitcherController;
|
private final UserSwitcherController mUserSwitcherController;
|
||||||
private final NetworkController mNetworkController;
|
|
||||||
private final LifecycleRegistry mLifecycle = new LifecycleRegistry(this);
|
private final LifecycleRegistry mLifecycle = new LifecycleRegistry(this);
|
||||||
protected final BatteryController mBatteryController;
|
protected final BatteryController mBatteryController;
|
||||||
protected boolean mPanelExpanded;
|
protected boolean mPanelExpanded;
|
||||||
@@ -662,7 +644,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
protected NotificationPresenter mPresenter;
|
protected NotificationPresenter mPresenter;
|
||||||
private NotificationActivityStarter mNotificationActivityStarter;
|
private NotificationActivityStarter mNotificationActivityStarter;
|
||||||
private final Lazy<NotificationShadeDepthController> mNotificationShadeDepthControllerLazy;
|
private final Lazy<NotificationShadeDepthController> mNotificationShadeDepthControllerLazy;
|
||||||
private final Optional<BubblesManager> mBubblesManagerOptional;
|
|
||||||
private final Optional<Bubbles> mBubblesOptional;
|
private final Optional<Bubbles> mBubblesOptional;
|
||||||
private final Bubbles.BubbleExpandListener mBubbleExpandListener;
|
private final Bubbles.BubbleExpandListener mBubbleExpandListener;
|
||||||
private final Optional<StartingSurface> mStartingSurfaceOptional;
|
private final Optional<StartingSurface> mStartingSurfaceOptional;
|
||||||
@@ -704,7 +685,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
FalsingManager falsingManager,
|
FalsingManager falsingManager,
|
||||||
FalsingCollector falsingCollector,
|
FalsingCollector falsingCollector,
|
||||||
BroadcastDispatcher broadcastDispatcher,
|
BroadcastDispatcher broadcastDispatcher,
|
||||||
NotifShadeEventSource notifShadeEventSource,
|
|
||||||
NotificationEntryManager notificationEntryManager,
|
NotificationEntryManager notificationEntryManager,
|
||||||
NotificationGutsManager notificationGutsManager,
|
NotificationGutsManager notificationGutsManager,
|
||||||
NotificationLogger notificationLogger,
|
NotificationLogger notificationLogger,
|
||||||
@@ -719,13 +699,11 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
NotificationLockscreenUserManager lockScreenUserManager,
|
NotificationLockscreenUserManager lockScreenUserManager,
|
||||||
NotificationRemoteInputManager remoteInputManager,
|
NotificationRemoteInputManager remoteInputManager,
|
||||||
UserSwitcherController userSwitcherController,
|
UserSwitcherController userSwitcherController,
|
||||||
NetworkController networkController,
|
|
||||||
BatteryController batteryController,
|
BatteryController batteryController,
|
||||||
SysuiColorExtractor colorExtractor,
|
SysuiColorExtractor colorExtractor,
|
||||||
ScreenLifecycle screenLifecycle,
|
ScreenLifecycle screenLifecycle,
|
||||||
WakefulnessLifecycle wakefulnessLifecycle,
|
WakefulnessLifecycle wakefulnessLifecycle,
|
||||||
SysuiStatusBarStateController statusBarStateController,
|
SysuiStatusBarStateController statusBarStateController,
|
||||||
Optional<BubblesManager> bubblesManagerOptional,
|
|
||||||
Optional<Bubbles> bubblesOptional,
|
Optional<Bubbles> bubblesOptional,
|
||||||
VisualStabilityManager visualStabilityManager,
|
VisualStabilityManager visualStabilityManager,
|
||||||
DeviceProvisionedController deviceProvisionedController,
|
DeviceProvisionedController deviceProvisionedController,
|
||||||
@@ -737,7 +715,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
DozeParameters dozeParameters,
|
DozeParameters dozeParameters,
|
||||||
ScrimController scrimController,
|
ScrimController scrimController,
|
||||||
Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
|
Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
|
||||||
LockscreenGestureLogger lockscreenGestureLogger,
|
|
||||||
Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
|
Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
|
||||||
DozeServiceHost dozeServiceHost,
|
DozeServiceHost dozeServiceHost,
|
||||||
PowerManager powerManager,
|
PowerManager powerManager,
|
||||||
@@ -770,7 +747,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
LockscreenShadeTransitionController lockscreenShadeTransitionController,
|
LockscreenShadeTransitionController lockscreenShadeTransitionController,
|
||||||
FeatureFlags featureFlags,
|
FeatureFlags featureFlags,
|
||||||
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
|
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
|
||||||
@Main Handler mainHandler,
|
|
||||||
@Main DelayableExecutor delayableExecutor,
|
@Main DelayableExecutor delayableExecutor,
|
||||||
@Main MessageRouter messageRouter,
|
@Main MessageRouter messageRouter,
|
||||||
WallpaperManager wallpaperManager,
|
WallpaperManager wallpaperManager,
|
||||||
@@ -779,7 +755,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
NotifPipelineFlags notifPipelineFlags,
|
NotifPipelineFlags notifPipelineFlags,
|
||||||
InteractionJankMonitor jankMonitor,
|
InteractionJankMonitor jankMonitor,
|
||||||
DeviceStateManager deviceStateManager,
|
DeviceStateManager deviceStateManager,
|
||||||
DreamOverlayStateController dreamOverlayStateController,
|
|
||||||
WiredChargingRippleController wiredChargingRippleController,
|
WiredChargingRippleController wiredChargingRippleController,
|
||||||
IDreamManager dreamManager) {
|
IDreamManager dreamManager) {
|
||||||
super(context);
|
super(context);
|
||||||
@@ -800,7 +775,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
mFalsingCollector = falsingCollector;
|
mFalsingCollector = falsingCollector;
|
||||||
mFalsingManager = falsingManager;
|
mFalsingManager = falsingManager;
|
||||||
mBroadcastDispatcher = broadcastDispatcher;
|
mBroadcastDispatcher = broadcastDispatcher;
|
||||||
mNotifShadeEventSource = notifShadeEventSource;
|
|
||||||
mEntryManager = notificationEntryManager;
|
mEntryManager = notificationEntryManager;
|
||||||
mGutsManager = notificationGutsManager;
|
mGutsManager = notificationGutsManager;
|
||||||
mNotificationLogger = notificationLogger;
|
mNotificationLogger = notificationLogger;
|
||||||
@@ -815,13 +789,11 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
mLockscreenUserManager = lockScreenUserManager;
|
mLockscreenUserManager = lockScreenUserManager;
|
||||||
mRemoteInputManager = remoteInputManager;
|
mRemoteInputManager = remoteInputManager;
|
||||||
mUserSwitcherController = userSwitcherController;
|
mUserSwitcherController = userSwitcherController;
|
||||||
mNetworkController = networkController;
|
|
||||||
mBatteryController = batteryController;
|
mBatteryController = batteryController;
|
||||||
mColorExtractor = colorExtractor;
|
mColorExtractor = colorExtractor;
|
||||||
mScreenLifecycle = screenLifecycle;
|
mScreenLifecycle = screenLifecycle;
|
||||||
mWakefulnessLifecycle = wakefulnessLifecycle;
|
mWakefulnessLifecycle = wakefulnessLifecycle;
|
||||||
mStatusBarStateController = statusBarStateController;
|
mStatusBarStateController = statusBarStateController;
|
||||||
mBubblesManagerOptional = bubblesManagerOptional;
|
|
||||||
mBubblesOptional = bubblesOptional;
|
mBubblesOptional = bubblesOptional;
|
||||||
mVisualStabilityManager = visualStabilityManager;
|
mVisualStabilityManager = visualStabilityManager;
|
||||||
mDeviceProvisionedController = deviceProvisionedController;
|
mDeviceProvisionedController = deviceProvisionedController;
|
||||||
@@ -835,7 +807,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
mDozeParameters = dozeParameters;
|
mDozeParameters = dozeParameters;
|
||||||
mScrimController = scrimController;
|
mScrimController = scrimController;
|
||||||
mLockscreenWallpaperLazy = lockscreenWallpaperLazy;
|
mLockscreenWallpaperLazy = lockscreenWallpaperLazy;
|
||||||
mLockscreenGestureLogger = lockscreenGestureLogger;
|
|
||||||
mScreenPinningRequest = screenPinningRequest;
|
mScreenPinningRequest = screenPinningRequest;
|
||||||
mDozeScrimController = dozeScrimController;
|
mDozeScrimController = dozeScrimController;
|
||||||
mBiometricUnlockControllerLazy = biometricUnlockControllerLazy;
|
mBiometricUnlockControllerLazy = biometricUnlockControllerLazy;
|
||||||
@@ -862,12 +833,10 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
mStatusBarHideIconsForBouncerManager = statusBarHideIconsForBouncerManager;
|
mStatusBarHideIconsForBouncerManager = statusBarHideIconsForBouncerManager;
|
||||||
mFeatureFlags = featureFlags;
|
mFeatureFlags = featureFlags;
|
||||||
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
|
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
|
||||||
mMainHandler = mainHandler;
|
|
||||||
mMainExecutor = delayableExecutor;
|
mMainExecutor = delayableExecutor;
|
||||||
mMessageRouter = messageRouter;
|
mMessageRouter = messageRouter;
|
||||||
mWallpaperManager = wallpaperManager;
|
mWallpaperManager = wallpaperManager;
|
||||||
mJankMonitor = jankMonitor;
|
mJankMonitor = jankMonitor;
|
||||||
mDreamOverlayStateController = dreamOverlayStateController;
|
|
||||||
|
|
||||||
mLockscreenShadeTransitionController = lockscreenShadeTransitionController;
|
mLockscreenShadeTransitionController = lockscreenShadeTransitionController;
|
||||||
mStartingSurfaceOptional = startingSurfaceOptional;
|
mStartingSurfaceOptional = startingSurfaceOptional;
|
||||||
@@ -1484,12 +1453,16 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
mPowerManager.wakeUp(
|
mPowerManager.wakeUp(
|
||||||
time, PowerManager.WAKE_REASON_GESTURE, "com.android.systemui:" + why);
|
time, PowerManager.WAKE_REASON_GESTURE, "com.android.systemui:" + why);
|
||||||
mWakeUpComingFromTouch = true;
|
mWakeUpComingFromTouch = true;
|
||||||
where.getLocationInWindow(mTmpInt2);
|
|
||||||
|
|
||||||
// NOTE, the incoming view can sometimes be the entire container... unsure if
|
// NOTE, the incoming view can sometimes be the entire container... unsure if
|
||||||
// this location is valuable enough
|
// this location is valuable enough
|
||||||
|
if (where != null) {
|
||||||
|
where.getLocationInWindow(mTmpInt2);
|
||||||
mWakeUpTouchLocation = new PointF(mTmpInt2[0] + where.getWidth() / 2,
|
mWakeUpTouchLocation = new PointF(mTmpInt2[0] + where.getWidth() / 2,
|
||||||
mTmpInt2[1] + where.getHeight() / 2);
|
mTmpInt2[1] + where.getHeight() / 2);
|
||||||
|
} else {
|
||||||
|
mWakeUpTouchLocation = new PointF(-1, -1);
|
||||||
|
}
|
||||||
mFalsingCollector.onScreenOnFromTouch();
|
mFalsingCollector.onScreenOnFromTouch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2273,8 +2246,7 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
public void updateBubblesVisibility() {
|
public void updateBubblesVisibility() {
|
||||||
mBubblesOptional.ifPresent(bubbles -> bubbles.onStatusBarVisibilityChanged(
|
mBubblesOptional.ifPresent(bubbles -> bubbles.onStatusBarVisibilityChanged(
|
||||||
mStatusBarMode != MODE_LIGHTS_OUT
|
mStatusBarMode != MODE_LIGHTS_OUT
|
||||||
&& mStatusBarMode != MODE_LIGHTS_OUT_TRANSPARENT
|
&& mStatusBarMode != MODE_LIGHTS_OUT_TRANSPARENT));
|
||||||
&& !mStatusBarWindowHidden));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkBarMode(@TransitionMode int mode, @WindowVisibleState int windowState,
|
void checkBarMode(@TransitionMode int mode, @WindowVisibleState int windowState,
|
||||||
@@ -3536,6 +3508,9 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
setBouncerShowingForStatusBarComponents(bouncerShowing);
|
setBouncerShowingForStatusBarComponents(bouncerShowing);
|
||||||
mStatusBarHideIconsForBouncerManager.setBouncerShowingAndTriggerUpdate(bouncerShowing);
|
mStatusBarHideIconsForBouncerManager.setBouncerShowingAndTriggerUpdate(bouncerShowing);
|
||||||
mCommandQueue.recomputeDisableFlags(mDisplayId, true /* animate */);
|
mCommandQueue.recomputeDisableFlags(mDisplayId, true /* animate */);
|
||||||
|
if (mBouncerShowing) {
|
||||||
|
wakeUpIfDozing(SystemClock.uptimeMillis(), null, "BOUNCER_VISIBLE");
|
||||||
|
}
|
||||||
updateScrimController();
|
updateScrimController();
|
||||||
if (!mBouncerShowing) {
|
if (!mBouncerShowing) {
|
||||||
updatePanelExpansionForKeyguard();
|
updatePanelExpansionForKeyguard();
|
||||||
|
|||||||
@@ -644,6 +644,10 @@ public class KeyguardBouncer {
|
|||||||
public interface BouncerExpansionCallback {
|
public interface BouncerExpansionCallback {
|
||||||
/**
|
/**
|
||||||
* Invoked when the bouncer expansion reaches {@link KeyguardBouncer#EXPANSION_VISIBLE}.
|
* Invoked when the bouncer expansion reaches {@link KeyguardBouncer#EXPANSION_VISIBLE}.
|
||||||
|
* This is NOT called each time the bouncer is shown, but rather only when the fully
|
||||||
|
* shown amount has changed based on the panel expansion. The bouncer is visibility
|
||||||
|
* can still change when the expansion amount hasn't changed.
|
||||||
|
* See {@link KeyguardBouncer#isShowing()} for the checks for the bouncer showing state.
|
||||||
*/
|
*/
|
||||||
default void onFullyShown() {
|
default void onFullyShown() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,8 +129,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
public void onFullyShown() {
|
public void onFullyShown() {
|
||||||
mBouncerAnimating = false;
|
mBouncerAnimating = false;
|
||||||
updateStates();
|
updateStates();
|
||||||
mCentralSurfaces.wakeUpIfDozing(SystemClock.uptimeMillis(),
|
|
||||||
mCentralSurfaces.getBouncerContainer(), "BOUNCER_VISIBLE");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -740,12 +740,12 @@ public class UdfpsControllerTest extends SysuiTestCase {
|
|||||||
anyString(),
|
anyString(),
|
||||||
any(),
|
any(),
|
||||||
eq("udfps-onStart-click"),
|
eq("udfps-onStart-click"),
|
||||||
eq(UdfpsController.VIBRATION_ATTRIBUTES));
|
eq(UdfpsController.UDFPS_VIBRATION_ATTRIBUTES));
|
||||||
|
|
||||||
// THEN make sure vibration attributes has so that it always will play the haptic,
|
// THEN make sure vibration attributes has so that it always will play the haptic,
|
||||||
// even in battery saver mode
|
// even in battery saver mode
|
||||||
assertEquals(VibrationAttributes.USAGE_COMMUNICATION_REQUEST,
|
assertEquals(VibrationAttributes.USAGE_COMMUNICATION_REQUEST,
|
||||||
UdfpsController.VIBRATION_ATTRIBUTES.getUsage());
|
UdfpsController.UDFPS_VIBRATION_ATTRIBUTES.getUsage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ import com.android.systemui.classifier.FalsingCollectorFake;
|
|||||||
import com.android.systemui.classifier.FalsingManagerFake;
|
import com.android.systemui.classifier.FalsingManagerFake;
|
||||||
import com.android.systemui.colorextraction.SysuiColorExtractor;
|
import com.android.systemui.colorextraction.SysuiColorExtractor;
|
||||||
import com.android.systemui.demomode.DemoModeController;
|
import com.android.systemui.demomode.DemoModeController;
|
||||||
import com.android.systemui.dreams.DreamOverlayStateController;
|
|
||||||
import com.android.systemui.dump.DumpManager;
|
import com.android.systemui.dump.DumpManager;
|
||||||
import com.android.systemui.flags.FeatureFlags;
|
import com.android.systemui.flags.FeatureFlags;
|
||||||
import com.android.systemui.fragments.FragmentService;
|
import com.android.systemui.fragments.FragmentService;
|
||||||
@@ -118,7 +117,6 @@ import com.android.systemui.statusbar.OperatorNameViewController;
|
|||||||
import com.android.systemui.statusbar.PulseExpansionHandler;
|
import com.android.systemui.statusbar.PulseExpansionHandler;
|
||||||
import com.android.systemui.statusbar.StatusBarState;
|
import com.android.systemui.statusbar.StatusBarState;
|
||||||
import com.android.systemui.statusbar.StatusBarStateControllerImpl;
|
import com.android.systemui.statusbar.StatusBarStateControllerImpl;
|
||||||
import com.android.systemui.statusbar.connectivity.NetworkController;
|
|
||||||
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
|
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
|
||||||
import com.android.systemui.statusbar.notification.NotifPipelineFlags;
|
import com.android.systemui.statusbar.notification.NotifPipelineFlags;
|
||||||
import com.android.systemui.statusbar.notification.NotificationEntryManager;
|
import com.android.systemui.statusbar.notification.NotificationEntryManager;
|
||||||
@@ -129,7 +127,6 @@ import com.android.systemui.statusbar.notification.collection.NotifPipeline;
|
|||||||
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
|
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
|
||||||
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
|
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
|
||||||
import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager;
|
import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager;
|
||||||
import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource;
|
|
||||||
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider;
|
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider;
|
||||||
import com.android.systemui.statusbar.notification.init.NotificationsController;
|
import com.android.systemui.statusbar.notification.init.NotificationsController;
|
||||||
import com.android.systemui.statusbar.notification.interruption.KeyguardNotificationVisibilityProvider;
|
import com.android.systemui.statusbar.notification.interruption.KeyguardNotificationVisibilityProvider;
|
||||||
@@ -159,7 +156,6 @@ import com.android.systemui.util.concurrency.FakeExecutor;
|
|||||||
import com.android.systemui.util.concurrency.MessageRouterImpl;
|
import com.android.systemui.util.concurrency.MessageRouterImpl;
|
||||||
import com.android.systemui.util.time.FakeSystemClock;
|
import com.android.systemui.util.time.FakeSystemClock;
|
||||||
import com.android.systemui.volume.VolumeComponent;
|
import com.android.systemui.volume.VolumeComponent;
|
||||||
import com.android.systemui.wmshell.BubblesManager;
|
|
||||||
import com.android.wm.shell.bubbles.Bubbles;
|
import com.android.wm.shell.bubbles.Bubbles;
|
||||||
import com.android.wm.shell.startingsurface.StartingSurface;
|
import com.android.wm.shell.startingsurface.StartingSurface;
|
||||||
|
|
||||||
@@ -223,7 +219,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
@Mock private NotificationShadeWindowView mNotificationShadeWindowView;
|
@Mock private NotificationShadeWindowView mNotificationShadeWindowView;
|
||||||
@Mock private BroadcastDispatcher mBroadcastDispatcher;
|
@Mock private BroadcastDispatcher mBroadcastDispatcher;
|
||||||
@Mock private AssistManager mAssistManager;
|
@Mock private AssistManager mAssistManager;
|
||||||
@Mock private NotifShadeEventSource mNotifShadeEventSource;
|
|
||||||
@Mock private NotificationEntryManager mNotificationEntryManager;
|
@Mock private NotificationEntryManager mNotificationEntryManager;
|
||||||
@Mock private NotificationGutsManager mNotificationGutsManager;
|
@Mock private NotificationGutsManager mNotificationGutsManager;
|
||||||
@Mock private NotificationMediaManager mNotificationMediaManager;
|
@Mock private NotificationMediaManager mNotificationMediaManager;
|
||||||
@@ -240,15 +235,12 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
@Mock private StatusBarWindowStateController mStatusBarWindowStateController;
|
@Mock private StatusBarWindowStateController mStatusBarWindowStateController;
|
||||||
@Mock private NotificationViewHierarchyManager mNotificationViewHierarchyManager;
|
@Mock private NotificationViewHierarchyManager mNotificationViewHierarchyManager;
|
||||||
@Mock private UserSwitcherController mUserSwitcherController;
|
@Mock private UserSwitcherController mUserSwitcherController;
|
||||||
@Mock private NetworkController mNetworkController;
|
|
||||||
@Mock private BubblesManager mBubblesManager;
|
|
||||||
@Mock private Bubbles mBubbles;
|
@Mock private Bubbles mBubbles;
|
||||||
@Mock private NotificationShadeWindowController mNotificationShadeWindowController;
|
@Mock private NotificationShadeWindowController mNotificationShadeWindowController;
|
||||||
@Mock private NotificationIconAreaController mNotificationIconAreaController;
|
@Mock private NotificationIconAreaController mNotificationIconAreaController;
|
||||||
@Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController;
|
@Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController;
|
||||||
@Mock private DozeParameters mDozeParameters;
|
@Mock private DozeParameters mDozeParameters;
|
||||||
@Mock private Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
|
@Mock private Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
|
||||||
@Mock private LockscreenGestureLogger mLockscreenGestureLogger;
|
|
||||||
@Mock private LockscreenWallpaper mLockscreenWallpaper;
|
@Mock private LockscreenWallpaper mLockscreenWallpaper;
|
||||||
@Mock private DozeServiceHost mDozeServiceHost;
|
@Mock private DozeServiceHost mDozeServiceHost;
|
||||||
@Mock private ViewMediatorCallback mKeyguardVieMediatorCallback;
|
@Mock private ViewMediatorCallback mKeyguardVieMediatorCallback;
|
||||||
@@ -286,7 +278,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
@Mock private NotifLiveDataStore mNotifLiveDataStore;
|
@Mock private NotifLiveDataStore mNotifLiveDataStore;
|
||||||
@Mock private InteractionJankMonitor mJankMonitor;
|
@Mock private InteractionJankMonitor mJankMonitor;
|
||||||
@Mock private DeviceStateManager mDeviceStateManager;
|
@Mock private DeviceStateManager mDeviceStateManager;
|
||||||
@Mock private DreamOverlayStateController mDreamOverlayStateController;
|
|
||||||
@Mock private WiredChargingRippleController mWiredChargingRippleController;
|
@Mock private WiredChargingRippleController mWiredChargingRippleController;
|
||||||
private ShadeController mShadeController;
|
private ShadeController mShadeController;
|
||||||
private final FakeSystemClock mFakeSystemClock = new FakeSystemClock();
|
private final FakeSystemClock mFakeSystemClock = new FakeSystemClock();
|
||||||
@@ -401,7 +392,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
new FalsingManagerFake(),
|
new FalsingManagerFake(),
|
||||||
new FalsingCollectorFake(),
|
new FalsingCollectorFake(),
|
||||||
mBroadcastDispatcher,
|
mBroadcastDispatcher,
|
||||||
mNotifShadeEventSource,
|
|
||||||
mNotificationEntryManager,
|
mNotificationEntryManager,
|
||||||
mNotificationGutsManager,
|
mNotificationGutsManager,
|
||||||
notificationLogger,
|
notificationLogger,
|
||||||
@@ -416,13 +406,11 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
mLockscreenUserManager,
|
mLockscreenUserManager,
|
||||||
mRemoteInputManager,
|
mRemoteInputManager,
|
||||||
mUserSwitcherController,
|
mUserSwitcherController,
|
||||||
mNetworkController,
|
|
||||||
mBatteryController,
|
mBatteryController,
|
||||||
mColorExtractor,
|
mColorExtractor,
|
||||||
new ScreenLifecycle(mDumpManager),
|
new ScreenLifecycle(mDumpManager),
|
||||||
wakefulnessLifecycle,
|
wakefulnessLifecycle,
|
||||||
mStatusBarStateController,
|
mStatusBarStateController,
|
||||||
Optional.of(mBubblesManager),
|
|
||||||
Optional.of(mBubbles),
|
Optional.of(mBubbles),
|
||||||
mVisualStabilityManager,
|
mVisualStabilityManager,
|
||||||
mDeviceProvisionedController,
|
mDeviceProvisionedController,
|
||||||
@@ -434,7 +422,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
mDozeParameters,
|
mDozeParameters,
|
||||||
mScrimController,
|
mScrimController,
|
||||||
mLockscreenWallpaperLazy,
|
mLockscreenWallpaperLazy,
|
||||||
mLockscreenGestureLogger,
|
|
||||||
mBiometricUnlockControllerLazy,
|
mBiometricUnlockControllerLazy,
|
||||||
mDozeServiceHost,
|
mDozeServiceHost,
|
||||||
mPowerManager, mScreenPinningRequest,
|
mPowerManager, mScreenPinningRequest,
|
||||||
@@ -466,7 +453,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
mLockscreenTransitionController,
|
mLockscreenTransitionController,
|
||||||
mFeatureFlags,
|
mFeatureFlags,
|
||||||
mKeyguardUnlockAnimationController,
|
mKeyguardUnlockAnimationController,
|
||||||
new Handler(TestableLooper.get(this).getLooper()),
|
|
||||||
mMainExecutor,
|
mMainExecutor,
|
||||||
new MessageRouterImpl(mMainExecutor),
|
new MessageRouterImpl(mMainExecutor),
|
||||||
mWallpaperManager,
|
mWallpaperManager,
|
||||||
@@ -475,7 +461,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
mNotifPipelineFlags,
|
mNotifPipelineFlags,
|
||||||
mJankMonitor,
|
mJankMonitor,
|
||||||
mDeviceStateManager,
|
mDeviceStateManager,
|
||||||
mDreamOverlayStateController,
|
|
||||||
mWiredChargingRippleController, mDreamManager);
|
mWiredChargingRippleController, mDreamManager);
|
||||||
when(mKeyguardViewMediator.registerCentralSurfaces(
|
when(mKeyguardViewMediator.registerCentralSurfaces(
|
||||||
any(CentralSurfacesImpl.class),
|
any(CentralSurfacesImpl.class),
|
||||||
|
|||||||
Reference in New Issue
Block a user