diff options
| author | 2020-06-22 17:18:42 +0000 | |
|---|---|---|
| committer | 2020-06-22 17:18:42 +0000 | |
| commit | cde9d6b37f70c58376d3ce8af314b49244405b8a (patch) | |
| tree | 4c866cd81a1a16107704d465e4a8926981e965b6 | |
| parent | 72998aeaf7cd671f55764b65b3fd6245b97ffa5b (diff) | |
| parent | 850f9387e36b8ae0fefa0aa6a9efdcfa9390c4d8 (diff) | |
Merge "Controls UI - Show timeout msg and not controls on error" into rvc-dev
2 files changed, 25 insertions, 23 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt index a6af6a11d8b7..ec8bfc6fa2ae 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt @@ -73,7 +73,7 @@ class ControlsProviderLifecycleManager( companion object { private const val BIND_RETRY_DELAY = 1000L // ms - private const val LOAD_TIMEOUT_SECONDS = 30L // seconds + private const val LOAD_TIMEOUT_SECONDS = 20L // seconds private const val MAX_BIND_RETRIES = 5 private const val DEBUG = true private val BIND_FLAGS = Context.BIND_AUTO_CREATE or Context.BIND_FOREGROUND_SERVICE diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt index 4884781c64de..b2821579c389 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt @@ -174,30 +174,32 @@ class ControlsFavoritingActivity @Inject constructor( subtitleView.visibility = View.GONE } else { statusText.visibility = View.GONE - } - pageIndicator.setNumPages(listOfStructures.size) - pageIndicator.setLocation(0f) - pageIndicator.visibility = - if (listOfStructures.size > 1) View.VISIBLE else View.INVISIBLE - - ControlsAnimations.enterAnimation(pageIndicator).apply { - addListener(object : AnimatorListenerAdapter() { - override fun onAnimationEnd(animation: Animator?) { - // Position the tooltip if necessary after animations are complete - // so we can get the position on screen. The tooltip is not - // rooted in the layout root. - if (pageIndicator.visibility == View.VISIBLE && + + pageIndicator.setNumPages(listOfStructures.size) + pageIndicator.setLocation(0f) + pageIndicator.visibility = + if (listOfStructures.size > 1) View.VISIBLE else View.INVISIBLE + + ControlsAnimations.enterAnimation(pageIndicator).apply { + addListener(object : AnimatorListenerAdapter() { + override fun onAnimationEnd(animation: Animator?) { + // Position the tooltip if necessary after animations are complete + // so we can get the position on screen. The tooltip is not + // rooted in the layout root. + if (pageIndicator.visibility == View.VISIBLE && mTooltipManager != null) { - val p = IntArray(2) - pageIndicator.getLocationOnScreen(p) - val x = p[0] + pageIndicator.width / 2 - val y = p[1] + pageIndicator.height - mTooltipManager?.show(R.string.controls_structure_tooltip, x, y) + val p = IntArray(2) + pageIndicator.getLocationOnScreen(p) + val x = p[0] + pageIndicator.width / 2 + val y = p[1] + pageIndicator.height + mTooltipManager?.show( + R.string.controls_structure_tooltip, x, y) + } } - } - }) - }.start() - ControlsAnimations.enterAnimation(structurePager).start() + }) + }.start() + ControlsAnimations.enterAnimation(structurePager).start() + } } }, Consumer { runnable -> cancelLoadRunnable = runnable }) } |