diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinator.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinator.kt index 8029ba844850d20e13506a8bf85b9defd01e5dab..c4c23124b39ea804883cfd066dd712b6fc1a196f 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinator.kt @@ -67,12 +67,6 @@ interface ControlActionCoordinator { */ fun setValue(cvh: ControlViewHolder, templateId: String, newValue: Float) - /** - * Actions may have been put on hold while the device is unlocked. Invoke this action if - * present. - */ - fun runPendingAction(controlId: String) - /** * User interaction with a control may be blocked for a period of time while actions are being * executed by the application. When the response returns, run this method to enable further diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt index 6f30ac3901e159fe6519e26421167525aaec0330..676fbe368ea2410f8f35ce9f2549c7c053eff5d1 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt @@ -60,7 +60,6 @@ class ControlActionCoordinatorImpl @Inject constructor( ) : ControlActionCoordinator { private var dialog: Dialog? = null private val vibrator = context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator - private var pendingAction: Action? = null private var actionsInProgress = mutableSetOf<String>() private val isLocked: Boolean get() = !keyguardStateController.isUnlocked() @@ -122,14 +121,6 @@ class ControlActionCoordinatorImpl @Inject constructor( }, false /* blockable */)) } - override fun runPendingAction(controlId: String) { - if (isLocked) return - if (pendingAction?.controlId == controlId) { - pendingAction?.invoke() - pendingAction = null - } - } - @MainThread override fun enableActionOnTouch(controlId: String) { actionsInProgress.remove(controlId) @@ -148,17 +139,11 @@ class ControlActionCoordinatorImpl @Inject constructor( @VisibleForTesting fun bouncerOrRun(action: Action) { if (keyguardStateController.isShowing()) { - if (isLocked) { - context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) - - // pending actions will only run after the control state has been refreshed - pendingAction = action - } activityStarter.dismissKeyguardThenExecute({ Log.d(ControlsUiController.TAG, "Device unlocked, invoking controls action") action.invoke() true - }, { pendingAction = null }, true /* afterKeyguardGone */) + }, null, true /* afterKeyguardGone */) } else { action.invoke() } diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt index 47e749cd11851e22fd4f40fc2bb719e4c0c63785..f23bf560c9685d309a7bcfdf2dc3dc647a0ef0d0 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt @@ -172,8 +172,6 @@ class ControlViewHolder( controlActionCoordinator.longPress(this@ControlViewHolder) true }) - - controlActionCoordinator.runPendingAction(cws.ci.controlId) } val wasLoading = isLoading