Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1702,6 +1702,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mExclusionRegionListener.onExclusionRegionDismissed(mTaskInfo.taskId); mExclusionRegionListener.onExclusionRegionDismissed(mTaskInfo.taskId); disposeResizeVeil(); disposeResizeVeil(); disposeStatusBarInputLayer(); disposeStatusBarInputLayer(); mWindowDecorViewHolder.close(); mWindowDecorViewHolder = null; mWindowDecorViewHolder = null; if (canEnterDesktopMode(mContext) && isEducationEnabled()) { if (canEnterDesktopMode(mContext) && isEducationEnabled()) { notifyNoCaptionHandle(); notifyNoCaptionHandle(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -274,4 +274,6 @@ internal class AppHandleViewHolder( } } animator.start() animator.start() } } override fun close() {} } } libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -725,6 +725,11 @@ class AppHeaderViewHolder( Configuration.UI_MODE_NIGHT_YES Configuration.UI_MODE_NIGHT_YES } } override fun close() { // Should not fire long press events after closing the window decoration. maximizeWindowButton.cancelLongPress() } companion object { companion object { private const val TAG = "DesktopModeAppControlsWindowDecorationViewHolder" private const val TAG = "DesktopModeAppControlsWindowDecorationViewHolder" Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/WindowDecorationViewHolder.kt +4 −1 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import com.android.wm.shell.windowdecor.viewholder.WindowDecorationViewHolder.Da * Encapsulates the root [View] of a window decoration and its children to facilitate looking up * Encapsulates the root [View] of a window decoration and its children to facilitate looking up * children (via findViewById) and updating to the latest data from [RunningTaskInfo]. * children (via findViewById) and updating to the latest data from [RunningTaskInfo]. */ */ abstract class WindowDecorationViewHolder<T : Data>(rootView: View) { abstract class WindowDecorationViewHolder<T : Data>(rootView: View) : AutoCloseable { val context: Context = rootView.context val context: Context = rootView.context /** /** Loading @@ -39,6 +39,9 @@ abstract class WindowDecorationViewHolder<T : Data>(rootView: View) { /** Callback when the handle menu is closed. */ /** Callback when the handle menu is closed. */ abstract fun onHandleMenuClosed() abstract fun onHandleMenuClosed() /** Callback when the window decoration is destroyed. */ abstract override fun close() /** Data clas that contains the information needed to update the view holder. */ /** Data clas that contains the information needed to update the view holder. */ abstract class Data abstract class Data } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1702,6 +1702,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mExclusionRegionListener.onExclusionRegionDismissed(mTaskInfo.taskId); mExclusionRegionListener.onExclusionRegionDismissed(mTaskInfo.taskId); disposeResizeVeil(); disposeResizeVeil(); disposeStatusBarInputLayer(); disposeStatusBarInputLayer(); mWindowDecorViewHolder.close(); mWindowDecorViewHolder = null; mWindowDecorViewHolder = null; if (canEnterDesktopMode(mContext) && isEducationEnabled()) { if (canEnterDesktopMode(mContext) && isEducationEnabled()) { notifyNoCaptionHandle(); notifyNoCaptionHandle(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -274,4 +274,6 @@ internal class AppHandleViewHolder( } } animator.start() animator.start() } } override fun close() {} } }
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -725,6 +725,11 @@ class AppHeaderViewHolder( Configuration.UI_MODE_NIGHT_YES Configuration.UI_MODE_NIGHT_YES } } override fun close() { // Should not fire long press events after closing the window decoration. maximizeWindowButton.cancelLongPress() } companion object { companion object { private const val TAG = "DesktopModeAppControlsWindowDecorationViewHolder" private const val TAG = "DesktopModeAppControlsWindowDecorationViewHolder" Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/WindowDecorationViewHolder.kt +4 −1 Original line number Original line Diff line number Diff line Loading @@ -24,7 +24,7 @@ import com.android.wm.shell.windowdecor.viewholder.WindowDecorationViewHolder.Da * Encapsulates the root [View] of a window decoration and its children to facilitate looking up * Encapsulates the root [View] of a window decoration and its children to facilitate looking up * children (via findViewById) and updating to the latest data from [RunningTaskInfo]. * children (via findViewById) and updating to the latest data from [RunningTaskInfo]. */ */ abstract class WindowDecorationViewHolder<T : Data>(rootView: View) { abstract class WindowDecorationViewHolder<T : Data>(rootView: View) : AutoCloseable { val context: Context = rootView.context val context: Context = rootView.context /** /** Loading @@ -39,6 +39,9 @@ abstract class WindowDecorationViewHolder<T : Data>(rootView: View) { /** Callback when the handle menu is closed. */ /** Callback when the handle menu is closed. */ abstract fun onHandleMenuClosed() abstract fun onHandleMenuClosed() /** Callback when the window decoration is destroyed. */ abstract override fun close() /** Data clas that contains the information needed to update the view holder. */ /** Data clas that contains the information needed to update the view holder. */ abstract class Data abstract class Data } }