Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurface.java +8 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,12 @@ public interface StartingSurface { default int getBackgroundColor(TaskInfo taskInfo) { return Color.BLACK; } /** Set the proxy to communicate with SysUi side components. */ void setSysuiProxy(SysuiProxy proxy); /** Callback to tell SysUi components execute some methods. */ interface SysuiProxy { void requestTopUi(boolean requestTopUi, String componentTag); } } libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +12 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ public class StartingSurfaceDrawer { final SplashscreenContentDrawer mSplashscreenContentDrawer; private Choreographer mChoreographer; private final WindowManagerGlobal mWindowManagerGlobal; private StartingSurface.SysuiProxy mSysuiProxy; /** * @param splashScreenExecutor The thread used to control add and remove starting window. Loading Loading @@ -151,6 +152,11 @@ public class StartingSurfaceDrawer { : activityInfo.getThemeResource() != 0 ? activityInfo.getThemeResource() : com.android.internal.R.style.Theme_DeviceDefault_DayNight; } void setSysuiProxy(StartingSurface.SysuiProxy sysuiProxy) { mSysuiProxy = sysuiProxy; } /** * Called when a task need a splash screen starting window. * Loading Loading @@ -317,6 +323,9 @@ public class StartingSurfaceDrawer { } Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); }; if (mSysuiProxy != null) { mSysuiProxy.requestTopUi(true, TAG); } mSplashscreenContentDrawer.createContentView(context, suggestType, activityInfo, taskId, viewSupplier::setView); try { Loading Loading @@ -573,6 +582,9 @@ public class StartingSurfaceDrawer { } private void removeWindowInner(View decorView, boolean hideView) { if (mSysuiProxy != null) { mSysuiProxy.requestTopUi(false, TAG); } if (hideView) { decorView.setVisibility(View.GONE); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java +5 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,11 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo return color != Color.TRANSPARENT ? color : SplashscreenContentDrawer.getSystemBGColor(); } @Override public void setSysuiProxy(SysuiProxy proxy) { mSplashScreenExecutor.execute(() -> mStartingSurfaceDrawer.setSysuiProxy(proxy)); } } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −0 Original line number Diff line number Diff line Loading @@ -1089,6 +1089,11 @@ public class StatusBar extends SystemUI implements } } }, OverlayPlugin.class, true /* Allow multiple plugins */); mStartingSurfaceOptional.ifPresent(startingSurface -> startingSurface.setSysuiProxy( (requestTopUi, componentTag) -> mMainExecutor.execute(() -> mNotificationShadeWindowController.setRequestTopUi( requestTopUi, componentTag)))); } // ================================================================================ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurface.java +8 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,12 @@ public interface StartingSurface { default int getBackgroundColor(TaskInfo taskInfo) { return Color.BLACK; } /** Set the proxy to communicate with SysUi side components. */ void setSysuiProxy(SysuiProxy proxy); /** Callback to tell SysUi components execute some methods. */ interface SysuiProxy { void requestTopUi(boolean requestTopUi, String componentTag); } }
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +12 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ public class StartingSurfaceDrawer { final SplashscreenContentDrawer mSplashscreenContentDrawer; private Choreographer mChoreographer; private final WindowManagerGlobal mWindowManagerGlobal; private StartingSurface.SysuiProxy mSysuiProxy; /** * @param splashScreenExecutor The thread used to control add and remove starting window. Loading Loading @@ -151,6 +152,11 @@ public class StartingSurfaceDrawer { : activityInfo.getThemeResource() != 0 ? activityInfo.getThemeResource() : com.android.internal.R.style.Theme_DeviceDefault_DayNight; } void setSysuiProxy(StartingSurface.SysuiProxy sysuiProxy) { mSysuiProxy = sysuiProxy; } /** * Called when a task need a splash screen starting window. * Loading Loading @@ -317,6 +323,9 @@ public class StartingSurfaceDrawer { } Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); }; if (mSysuiProxy != null) { mSysuiProxy.requestTopUi(true, TAG); } mSplashscreenContentDrawer.createContentView(context, suggestType, activityInfo, taskId, viewSupplier::setView); try { Loading Loading @@ -573,6 +582,9 @@ public class StartingSurfaceDrawer { } private void removeWindowInner(View decorView, boolean hideView) { if (mSysuiProxy != null) { mSysuiProxy.requestTopUi(false, TAG); } if (hideView) { decorView.setVisibility(View.GONE); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java +5 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,11 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo return color != Color.TRANSPARENT ? color : SplashscreenContentDrawer.getSystemBGColor(); } @Override public void setSysuiProxy(SysuiProxy proxy) { mSplashScreenExecutor.execute(() -> mStartingSurfaceDrawer.setSysuiProxy(proxy)); } } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −0 Original line number Diff line number Diff line Loading @@ -1089,6 +1089,11 @@ public class StatusBar extends SystemUI implements } } }, OverlayPlugin.class, true /* Allow multiple plugins */); mStartingSurfaceOptional.ifPresent(startingSurface -> startingSurface.setSysuiProxy( (requestTopUi, componentTag) -> mMainExecutor.execute(() -> mNotificationShadeWindowController.setRequestTopUi( requestTopUi, componentTag)))); } // ================================================================================ Loading