summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinator.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt2
3 files changed, 1 insertions, 24 deletions
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 8029ba844850..c4c23124b39e 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinator.kt
@@ -68,12 +68,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
* user interaction.
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 6f30ac3901e1..676fbe368ea2 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 47e749cd1185..f23bf560c968 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