Loading core/java/android/view/ViewRootImpl.java +19 −15 Original line number Diff line number Diff line Loading @@ -590,6 +590,10 @@ public final class ViewRootImpl implements ViewParent, throw new WindowManager.InvalidDisplayException( "Unable to add window " + mWindow + " -- the specified display can not be found"); case WindowManagerGlobal.ADD_INVALID_TYPE: throw new WindowManager.InvalidDisplayException( "Unable to add window " + mWindow + " -- the specified window type is not valid"); } throw new RuntimeException( "Unable to add window -- unknown error code " + res); Loading core/java/android/view/WindowManagerGlobal.java +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public final class WindowManagerGlobal { public static final int ADD_MULTIPLE_SINGLETON = -7; public static final int ADD_PERMISSION_DENIED = -8; public static final int ADD_INVALID_DISPLAY = -9; public static final int ADD_INVALID_TYPE = -10; private static WindowManagerGlobal sDefaultWindowManager; private static IWindowManager sWindowManagerService; Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −2 Original line number Diff line number Diff line Loading @@ -1641,8 +1641,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { outAppOp[0] = AppOpsManager.OP_NONE; if (type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW || type > WindowManager.LayoutParams.LAST_SYSTEM_WINDOW) { if (!((type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) || (type >= FIRST_SUB_WINDOW && type <= LAST_SUB_WINDOW) || (type >= FIRST_SYSTEM_WINDOW && type <= LAST_SYSTEM_WINDOW))) { return WindowManagerGlobal.ADD_INVALID_TYPE; } if (type < FIRST_SYSTEM_WINDOW || type > LAST_SYSTEM_WINDOW) { // Window manager will make sure these are okay. return WindowManagerGlobal.ADD_OKAY; } String permission = null; Loading Loading
core/java/android/view/ViewRootImpl.java +19 −15 Original line number Diff line number Diff line Loading @@ -590,6 +590,10 @@ public final class ViewRootImpl implements ViewParent, throw new WindowManager.InvalidDisplayException( "Unable to add window " + mWindow + " -- the specified display can not be found"); case WindowManagerGlobal.ADD_INVALID_TYPE: throw new WindowManager.InvalidDisplayException( "Unable to add window " + mWindow + " -- the specified window type is not valid"); } throw new RuntimeException( "Unable to add window -- unknown error code " + res); Loading
core/java/android/view/WindowManagerGlobal.java +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public final class WindowManagerGlobal { public static final int ADD_MULTIPLE_SINGLETON = -7; public static final int ADD_PERMISSION_DENIED = -8; public static final int ADD_INVALID_DISPLAY = -9; public static final int ADD_INVALID_TYPE = -10; private static WindowManagerGlobal sDefaultWindowManager; private static IWindowManager sWindowManagerService; Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −2 Original line number Diff line number Diff line Loading @@ -1641,8 +1641,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { outAppOp[0] = AppOpsManager.OP_NONE; if (type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW || type > WindowManager.LayoutParams.LAST_SYSTEM_WINDOW) { if (!((type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) || (type >= FIRST_SUB_WINDOW && type <= LAST_SUB_WINDOW) || (type >= FIRST_SYSTEM_WINDOW && type <= LAST_SYSTEM_WINDOW))) { return WindowManagerGlobal.ADD_INVALID_TYPE; } if (type < FIRST_SYSTEM_WINDOW || type > LAST_SYSTEM_WINDOW) { // Window manager will make sure these are okay. return WindowManagerGlobal.ADD_OKAY; } String permission = null; Loading