Loading core/java/android/view/SurfaceView.java +12 −1 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ public class SurfaceView extends View { static final int KEEP_SCREEN_ON_MSG = 1; static final int GET_NEW_SURFACE_MSG = 2; int mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; boolean mIsCreating = false; final Handler mHandler = new Handler() { Loading Loading @@ -286,6 +288,15 @@ public class SurfaceView extends View { super.dispatchDraw(canvas); } /** * Hack to allow special layering of windows. The type is one of the * types in WindowManager.LayoutParams. This is a hack so: * @hide */ public void setWindowType(int type) { mWindowType = type; } private void updateWindow(boolean force) { if (!mHaveFrame) { return; Loading Loading @@ -343,7 +354,7 @@ public class SurfaceView extends View { if (mWindow == null) { mWindow = new MyWindow(this); mLayout.type = WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; mLayout.type = mWindowType; mLayout.gravity = Gravity.LEFT|Gravity.TOP; mSession.add(mWindow, mLayout, mVisible ? VISIBLE : GONE, mContentInsets); Loading core/java/android/view/Window.java +6 −0 Original line number Diff line number Diff line Loading @@ -376,8 +376,14 @@ public abstract class Window { String title; if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA) { title="Media"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY) { title="MediaOvr"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) { title="Panel"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL) { title="SubPanel"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG) { title="AtchDlg"; } else { title=Integer.toString(wp.type); } Loading core/java/android/view/WindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,15 @@ public interface WindowManager extends ViewManager { */ public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW+3; /** * Window type: window for showing overlays on top of media windows. * These windows are displayed between TYPE_APPLICATION_MEDIA and the * application window. They should be translucent to be useful. This * is a big ugly hack so: * @hide */ public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW+4; /** * End of types of sub-windows. */ Loading Loading
core/java/android/view/SurfaceView.java +12 −1 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ public class SurfaceView extends View { static final int KEEP_SCREEN_ON_MSG = 1; static final int GET_NEW_SURFACE_MSG = 2; int mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; boolean mIsCreating = false; final Handler mHandler = new Handler() { Loading Loading @@ -286,6 +288,15 @@ public class SurfaceView extends View { super.dispatchDraw(canvas); } /** * Hack to allow special layering of windows. The type is one of the * types in WindowManager.LayoutParams. This is a hack so: * @hide */ public void setWindowType(int type) { mWindowType = type; } private void updateWindow(boolean force) { if (!mHaveFrame) { return; Loading Loading @@ -343,7 +354,7 @@ public class SurfaceView extends View { if (mWindow == null) { mWindow = new MyWindow(this); mLayout.type = WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; mLayout.type = mWindowType; mLayout.gravity = Gravity.LEFT|Gravity.TOP; mSession.add(mWindow, mLayout, mVisible ? VISIBLE : GONE, mContentInsets); Loading
core/java/android/view/Window.java +6 −0 Original line number Diff line number Diff line Loading @@ -376,8 +376,14 @@ public abstract class Window { String title; if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA) { title="Media"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY) { title="MediaOvr"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) { title="Panel"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL) { title="SubPanel"; } else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG) { title="AtchDlg"; } else { title=Integer.toString(wp.type); } Loading
core/java/android/view/WindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,15 @@ public interface WindowManager extends ViewManager { */ public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW+3; /** * Window type: window for showing overlays on top of media windows. * These windows are displayed between TYPE_APPLICATION_MEDIA and the * application window. They should be translucent to be useful. This * is a big ugly hack so: * @hide */ public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW+4; /** * End of types of sub-windows. */ Loading