Loading packages/SystemUI/src/com/android/systemui/topwindoweffects/TopLevelWindowEffects.kt +20 −17 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.topwindoweffects import android.content.Context import android.content.Context import android.graphics.PixelFormat import android.graphics.PixelFormat import android.view.Gravity import android.view.Gravity import android.view.View import android.view.WindowInsets import android.view.WindowInsets import android.view.WindowManager import android.view.WindowManager import androidx.annotation.DrawableRes import androidx.annotation.DrawableRes Loading Loading @@ -97,23 +98,25 @@ constructor( topRoundedCornerResourceId = topRoundedCornerId, topRoundedCornerResourceId = topRoundedCornerId, bottomRoundedCornerResourceId = bottomRoundedCornerId, bottomRoundedCornerResourceId = bottomRoundedCornerId, physicalPixelDisplaySizeRatio = physicalPixelDisplaySizeRatio, physicalPixelDisplaySizeRatio = physicalPixelDisplaySizeRatio, onEffectFinished = { onEffectFinished = ::removeWindow, if (root?.isAttachedToWindow == true) { windowManager.removeView(root) root = null } runOnMainThread { notificationShadeWindowController.setRequestTopUi(false, TAG) } }, appZoomOutOptional = appZoomOutOptional, appZoomOutOptional = appZoomOutOptional, interactionJankMonitor = interactionJankMonitor, interactionJankMonitor = interactionJankMonitor, ) ) .apply { visibility = View.GONE } root?.let { rootView -> root?.let { rootView -> runOnMainThread { notificationShadeWindowController.setRequestTopUi(true, TAG) } runOnMainThread { notificationShadeWindowController.setRequestTopUi(true, TAG) } windowManager.addView(rootView, getWindowManagerLayoutParams()) windowManager.addView(rootView, getWindowManagerLayoutParams()) rootView.post { rootView.visibility = View.VISIBLE } } } } } } private suspend fun removeWindow() { if (root?.isAttachedToWindow == true) { windowManager.removeView(root) root = null } runOnMainThread { notificationShadeWindowController.setRequestTopUi(false, TAG) } } } private suspend fun runOnMainThread(block: () -> Unit) { private suspend fun runOnMainThread(block: () -> Unit) { Loading Loading
packages/SystemUI/src/com/android/systemui/topwindoweffects/TopLevelWindowEffects.kt +20 −17 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.topwindoweffects import android.content.Context import android.content.Context import android.graphics.PixelFormat import android.graphics.PixelFormat import android.view.Gravity import android.view.Gravity import android.view.View import android.view.WindowInsets import android.view.WindowInsets import android.view.WindowManager import android.view.WindowManager import androidx.annotation.DrawableRes import androidx.annotation.DrawableRes Loading Loading @@ -97,23 +98,25 @@ constructor( topRoundedCornerResourceId = topRoundedCornerId, topRoundedCornerResourceId = topRoundedCornerId, bottomRoundedCornerResourceId = bottomRoundedCornerId, bottomRoundedCornerResourceId = bottomRoundedCornerId, physicalPixelDisplaySizeRatio = physicalPixelDisplaySizeRatio, physicalPixelDisplaySizeRatio = physicalPixelDisplaySizeRatio, onEffectFinished = { onEffectFinished = ::removeWindow, if (root?.isAttachedToWindow == true) { windowManager.removeView(root) root = null } runOnMainThread { notificationShadeWindowController.setRequestTopUi(false, TAG) } }, appZoomOutOptional = appZoomOutOptional, appZoomOutOptional = appZoomOutOptional, interactionJankMonitor = interactionJankMonitor, interactionJankMonitor = interactionJankMonitor, ) ) .apply { visibility = View.GONE } root?.let { rootView -> root?.let { rootView -> runOnMainThread { notificationShadeWindowController.setRequestTopUi(true, TAG) } runOnMainThread { notificationShadeWindowController.setRequestTopUi(true, TAG) } windowManager.addView(rootView, getWindowManagerLayoutParams()) windowManager.addView(rootView, getWindowManagerLayoutParams()) rootView.post { rootView.visibility = View.VISIBLE } } } } } } private suspend fun removeWindow() { if (root?.isAttachedToWindow == true) { windowManager.removeView(root) root = null } runOnMainThread { notificationShadeWindowController.setRequestTopUi(false, TAG) } } } private suspend fun runOnMainThread(block: () -> Unit) { private suspend fun runOnMainThread(block: () -> Unit) { Loading