Merge "Revert^2 "Store bubble bar state in sysui proxy"" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
f4b64aaebf
@@ -143,6 +143,10 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context:
|
||||
private var desktopTaskListener: IDesktopTaskListener? = null
|
||||
private val remoteTransitions = LinkedHashMap<RemoteTransition, TransitionFilter>()
|
||||
|
||||
// Save bubble bar state in case service is not bound yet when it is updated. SysUI relies on
|
||||
// this to suppress the floating bubbles UI.
|
||||
private var hasBubbleBar = false
|
||||
|
||||
private val stateChangeCallbacks: MutableList<Runnable> = ArrayList()
|
||||
|
||||
private var originalTransactionToken: IBinder? = null
|
||||
@@ -264,6 +268,7 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context:
|
||||
this.unfoldAnimation = if (Flags.enableUnfoldStateAnimation()) null else unfoldAnimation
|
||||
this.dragAndDrop = dragAndDrop
|
||||
linkToDeath()
|
||||
setHasBubbleBar(hasBubbleBar)
|
||||
// re-attach the listeners once missing due to setProxy has not been initialized yet.
|
||||
setPipAnimationListener(pipAnimationListener)
|
||||
setBubblesListener(bubblesListener)
|
||||
@@ -559,6 +564,14 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context:
|
||||
//
|
||||
// Bubbles
|
||||
//
|
||||
/** Tells SysUI whether bubble bar is used or not. */
|
||||
fun setHasBubbleBar(hasBubbleBar: Boolean) {
|
||||
executeWithErrorLog({ "Failed call setHasBubbleBar" }) {
|
||||
bubbles?.setHasBubbleBar(hasBubbleBar)
|
||||
}
|
||||
this.hasBubbleBar = hasBubbleBar
|
||||
}
|
||||
|
||||
/** Sets the listener to be notified of bubble state changes. */
|
||||
fun setBubblesListener(listener: IBubblesListener?) {
|
||||
executeWithErrorLog({ "Failed call registerBubblesListener" }) {
|
||||
@@ -698,13 +711,6 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context:
|
||||
}
|
||||
}
|
||||
|
||||
/** Tells SysUI whether bubble bar is used or not. */
|
||||
fun setHasBubbleBar(hasBubbleBar: Boolean) {
|
||||
executeWithErrorLog({ "Failed call setHasBubbleBar" }) {
|
||||
bubbles?.setHasBubbleBar(hasBubbleBar)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Splitscreen
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user