diff options
| author | Wale Ogunwale <ogunwale@google.com> | 2015-01-12 22:03:49 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-12 22:03:50 +0000 |
| commit | 1ea6afe1234b04de0f5b3f9ac5802b1c6d42e8ac (patch) | |
| tree | 1e0cfdde03476e032a79c8da49a08407048b130d /core/java/android/view/ViewRootImpl.java | |
| parent | d15b54d23fbc2f5582c9491cca46830b84f388ae (diff) | |
| parent | 74bf065e43a3075ffcaf9fcdc1ef423a1e14b761 (diff) | |
| download | frameworks_base-1ea6afe1234b04de0f5b3f9ac5802b1c6d42e8ac.zip frameworks_base-1ea6afe1234b04de0f5b3f9ac5802b1c6d42e8ac.tar.gz frameworks_base-1ea6afe1234b04de0f5b3f9ac5802b1c6d42e8ac.tar.bz2 | |
Merge "Don't allow windows with invalid types to be added." into lmp-mr1-dev
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 34c27d7..a8bc5c9 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -560,39 +560,43 @@ public final class ViewRootImpl implements ViewParent, case WindowManagerGlobal.ADD_BAD_APP_TOKEN: case WindowManagerGlobal.ADD_BAD_SUBWINDOW_TOKEN: throw new WindowManager.BadTokenException( - "Unable to add window -- token " + attrs.token - + " is not valid; is your activity running?"); + "Unable to add window -- token " + attrs.token + + " is not valid; is your activity running?"); case WindowManagerGlobal.ADD_NOT_APP_TOKEN: throw new WindowManager.BadTokenException( - "Unable to add window -- token " + attrs.token - + " is not for an application"); + "Unable to add window -- token " + attrs.token + + " is not for an application"); case WindowManagerGlobal.ADD_APP_EXITING: throw new WindowManager.BadTokenException( - "Unable to add window -- app for token " + attrs.token - + " is exiting"); + "Unable to add window -- app for token " + attrs.token + + " is exiting"); case WindowManagerGlobal.ADD_DUPLICATE_ADD: throw new WindowManager.BadTokenException( - "Unable to add window -- window " + mWindow - + " has already been added"); + "Unable to add window -- window " + mWindow + + " has already been added"); case WindowManagerGlobal.ADD_STARTING_NOT_NEEDED: // Silently ignore -- we would have just removed it // right away, anyway. return; case WindowManagerGlobal.ADD_MULTIPLE_SINGLETON: throw new WindowManager.BadTokenException( - "Unable to add window " + mWindow + - " -- another window of this type already exists"); + "Unable to add window " + mWindow + + " -- another window of this type already exists"); case WindowManagerGlobal.ADD_PERMISSION_DENIED: throw new WindowManager.BadTokenException( - "Unable to add window " + mWindow + - " -- permission denied for this window type"); + "Unable to add window " + mWindow + + " -- permission denied for this window type"); case WindowManagerGlobal.ADD_INVALID_DISPLAY: throw new WindowManager.InvalidDisplayException( - "Unable to add window " + mWindow + - " -- the specified display can not be found"); + "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); + "Unable to add window -- unknown error code " + res); } if (view instanceof RootViewSurfaceTaker) { |
