diff options
author | Adam Lesinski <adamlesinski@google.com> | 2013-10-02 01:55:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-02 01:55:09 +0000 |
commit | 42e9b63100edfef7a9cbee735ee3574fb1b94349 (patch) | |
tree | f27b9553b8bbb31a9a3bb511d496497798090ae8 | |
parent | 42544cf843a8e6a3d6ecf57aafdc5a3591a16d17 (diff) | |
parent | 6a591f585909415a1da431a2cc76b7732724037d (diff) | |
download | frameworks_base-42e9b63100edfef7a9cbee735ee3574fb1b94349.zip frameworks_base-42e9b63100edfef7a9cbee735ee3574fb1b94349.tar.gz frameworks_base-42e9b63100edfef7a9cbee735ee3574fb1b94349.tar.bz2 |
Merge "Make room for new public flags" into klp-dev
9 files changed, 40 insertions, 41 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 1e4b29f..4366fb7 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -478,7 +478,7 @@ public class SurfaceView extends View { | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE ; if (!getContext().getResources().getCompatibilityInfo().supportsScreen()) { - mLayout.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW; + mLayout.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; } mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 76ebb6f..89c74f1 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -82,7 +82,6 @@ import java.io.OutputStream; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashSet; -import java.util.Locale; /** * The top of a view hierarchy, implementing the needed protocol between View @@ -468,7 +467,7 @@ public final class ViewRootImpl implements ViewParent, if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs); if (!compatibilityInfo.supportsScreen()) { - attrs.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW; + attrs.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = true; } @@ -750,7 +749,7 @@ public final class ViewRootImpl implements ViewParent, mClientWindowLayoutFlags = attrs.flags; // preserve compatible window flag if exists. int compatibleWindowFlag = - mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW; + mWindowAttributes.flags & WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; // transfer over system UI visibility values as they carry current state. attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; @@ -1147,10 +1146,10 @@ public final class ViewRootImpl implements ViewParent, mFullRedrawNeeded = true; mLayoutRequested = true; if (mLastInCompatMode) { - params.flags &= ~WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW; + params.flags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = false; } else { - params.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW; + params.flags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; mLastInCompatMode = true; } } diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index c9c74e7..53f4d77 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -841,6 +841,15 @@ public interface WindowManager extends ViewManager { // ----- HIDDEN FLAGS. // These start at the high bit and go down. + /** + * Flag for a window in local focus mode. + * Window in local focus mode can control focus independent of window manager using + * {@link Window#setLocalFocus(boolean, boolean)}. + * Usually window in this mode will not get touch/key events from window manager, but will + * get events only via local injection using {@link Window#injectInputEvent(InputEvent)}. + */ + public static final int FLAG_LOCAL_FOCUS_MODE = 0x10000000; + /** Window flag: Enable touches to slide out of a window into neighboring * windows in mid-gesture instead of being captured for the duration of * the gesture. @@ -851,7 +860,7 @@ public interface WindowManager extends ViewManager { * * {@hide} */ - public static final int FLAG_SLIPPERY = 0x04000000; + public static final int FLAG_SLIPPERY = 0x20000000; /** * Flag for a window belonging to an activity that responds to {@link KeyEvent#KEYCODE_MENU} @@ -864,29 +873,8 @@ public interface WindowManager extends ViewManager { * * {@hide} */ - public static final int FLAG_NEEDS_MENU_KEY = 0x08000000; + public static final int FLAG_NEEDS_MENU_KEY = 0x40000000; - /** - * Flag for a window in local focus mode. - * Window in local focus mode can control focus independent of window manager using - * {@link Window#setLocalFocus(boolean, boolean)}. - * Usually window in this mode will not get touch/key events from window manager, but will - * get events only via local injection using {@link Window#injectInputEvent(InputEvent)}. - */ - public static final int FLAG_LOCAL_FOCUS_MODE = 0x10000000; - - /** Window flag: special flag to limit the size of the window to be - * original size ([320x480] x density). Used to create window for applications - * running under compatibility mode. - * - * {@hide} */ - public static final int FLAG_COMPATIBLE_WINDOW = 0x20000000; - - /** Window flag: a special option intended for system dialogs. When - * this flag is set, the window will demand focus unconditionally when - * it is created. - * {@hide} */ - public static final int FLAG_SYSTEM_ERROR = 0x40000000; /** * Various behavioral options/flags. Default is none. @@ -1045,6 +1033,19 @@ public interface WindowManager extends ViewManager { * {@hide} */ public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040; + /** Window flag: special flag to limit the size of the window to be + * original size ([320x480] x density). Used to create window for applications + * running under compatibility mode. + * + * {@hide} */ + public static final int PRIVATE_FLAG_COMPATIBLE_WINDOW = 0x00000080; + + /** Window flag: a special option intended for system dialogs. When + * this flag is set, the window will demand focus unconditionally when + * it is created. + * {@hide} */ + public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; + /** * Control flags that are private to the platform. * @hide @@ -1783,7 +1784,7 @@ public interface WindowManager extends ViewManager { sb.append(" rotAnim="); sb.append(rotationAnimation); } - if ((flags & FLAG_COMPATIBLE_WINDOW) != 0) { + if ((flags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) { sb.append(" compatible=true"); } if (systemUiVisibility != 0) { diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index a5fd1d7..7f93c28 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1621,7 +1621,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); if (!compatInfo.supportsScreen()) { - win.addFlags(WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW); + win.addFlags(WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW); } win.setDefaultIcon(icon); diff --git a/services/java/com/android/server/am/AppErrorDialog.java b/services/java/com/android/server/am/AppErrorDialog.java index bfc86b0..fffa75e 100644 --- a/services/java/com/android/server/am/AppErrorDialog.java +++ b/services/java/com/android/server/am/AppErrorDialog.java @@ -16,7 +16,7 @@ package com.android.server.am; -import static android.view.WindowManager.LayoutParams.FLAG_SYSTEM_ERROR; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import android.content.Context; import android.content.DialogInterface; @@ -72,7 +72,7 @@ final class AppErrorDialog extends BaseErrorDialog { } setTitle(res.getText(com.android.internal.R.string.aerr_title)); - getWindow().addFlags(FLAG_SYSTEM_ERROR); + getWindow().addFlags(PRIVATE_FLAG_SYSTEM_ERROR); WindowManager.LayoutParams attrs = getWindow().getAttributes(); attrs.setTitle("Application Error: " + app.info.processName); attrs.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; diff --git a/services/java/com/android/server/am/AppNotRespondingDialog.java b/services/java/com/android/server/am/AppNotRespondingDialog.java index d0a0441..4de272d 100644 --- a/services/java/com/android/server/am/AppNotRespondingDialog.java +++ b/services/java/com/android/server/am/AppNotRespondingDialog.java @@ -16,7 +16,7 @@ package com.android.server.am; -import static android.view.WindowManager.LayoutParams.FLAG_SYSTEM_ERROR; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import android.content.ActivityNotFoundException; import android.content.Context; @@ -94,7 +94,7 @@ final class AppNotRespondingDialog extends BaseErrorDialog { if (aboveSystem) { getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR); } - getWindow().addFlags(FLAG_SYSTEM_ERROR); + getWindow().addFlags(PRIVATE_FLAG_SYSTEM_ERROR); WindowManager.LayoutParams attrs = getWindow().getAttributes(); attrs.setTitle("Application Not Responding: " + app.info.processName); attrs.privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; diff --git a/services/java/com/android/server/am/StrictModeViolationDialog.java b/services/java/com/android/server/am/StrictModeViolationDialog.java index b6d0daa..5fee0d3 100644 --- a/services/java/com/android/server/am/StrictModeViolationDialog.java +++ b/services/java/com/android/server/am/StrictModeViolationDialog.java @@ -16,14 +16,13 @@ package com.android.server.am; -import static android.view.WindowManager.LayoutParams.FLAG_SYSTEM_ERROR; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import android.content.Context; import android.content.DialogInterface; import android.content.res.Resources; import android.os.Handler; import android.os.Message; -import android.util.Slog; final class StrictModeViolationDialog extends BaseErrorDialog { private final static String TAG = "StrictModeViolationDialog"; @@ -75,7 +74,7 @@ final class StrictModeViolationDialog extends BaseErrorDialog { } setTitle(res.getText(com.android.internal.R.string.aerr_title)); - getWindow().addFlags(FLAG_SYSTEM_ERROR); + getWindow().addFlags(PRIVATE_FLAG_SYSTEM_ERROR); getWindow().setTitle("Strict Mode Violation: " + app.info.processName); // After the timeout, pretend the user clicked the quit button diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index e6b0531..a888731 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -2793,7 +2793,7 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_LAYOUT) Slog.v(TAG, "Relayout " + win + ": viewVisibility=" + viewVisibility + " req=" + requestedWidth + "x" + requestedHeight + " " + win.mAttrs); - win.mEnforceSizeCompat = (win.mAttrs.flags & FLAG_COMPATIBLE_WINDOW) != 0; + win.mEnforceSizeCompat = (win.mAttrs.flags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0; if ((attrChanges & WindowManager.LayoutParams.ALPHA_CHANGED) != 0) { winAnimator.mAlpha = attrs.alpha; diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java index 64b5a09..d56e225 100644 --- a/services/java/com/android/server/wm/WindowState.java +++ b/services/java/com/android/server/wm/WindowState.java @@ -20,7 +20,7 @@ import static com.android.server.wm.WindowManagerService.DEBUG_VISIBILITY; import static com.android.server.wm.WindowManagerService.DEBUG_LAYOUT; import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; -import static android.view.WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; @@ -332,7 +332,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { mContext = mService.mContext; DeathRecipient deathRecipient = new DeathRecipient(); mSeq = seq; - mEnforceSizeCompat = (mAttrs.flags & FLAG_COMPATIBLE_WINDOW) != 0; + mEnforceSizeCompat = (mAttrs.flags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0; if (WindowManagerService.localLOGV) Slog.v( TAG, "Window " + this + " client=" + c.asBinder() + " token=" + token + " (" + mAttrs.token + ")" + " params=" + a); |