summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/SurfaceView.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/SurfaceView.java')
-rw-r--r--core/java/android/view/SurfaceView.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 3d023f7..0dc2570 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -100,6 +100,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() {
@@ -285,6 +287,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;
@@ -342,7 +353,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);