The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.view; |
| 18 | |
Siva Velusamy | 0d857b9 | 2015-04-22 10:23:56 -0700 | [diff] [blame] | 19 | import android.annotation.NonNull; |
Bryce Lee | 53b9fbd | 2015-02-06 12:06:34 -0800 | [diff] [blame] | 20 | import android.annotation.SystemApi; |
Jeff Brown | a492c3a | 2012-08-23 19:48:44 -0700 | [diff] [blame] | 21 | import android.app.Presentation; |
| 22 | import android.content.Context; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 23 | import android.content.pm.ActivityInfo; |
| 24 | import android.graphics.PixelFormat; |
Alan Viverette | ccb11e1 | 2014-07-08 16:04:02 -0700 | [diff] [blame] | 25 | import android.graphics.Rect; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | import android.os.IBinder; |
| 27 | import android.os.Parcel; |
| 28 | import android.os.Parcelable; |
| 29 | import android.text.TextUtils; |
| 30 | import android.util.Log; |
| 31 | |
Clara Bayarri | 75e0979 | 2015-07-29 16:20:40 +0100 | [diff] [blame] | 32 | import java.util.List; |
Wale Ogunwale | 1f240c9 | 2016-02-22 18:04:58 -0800 | [diff] [blame] | 33 | import java.util.Objects; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | |
| 35 | /** |
| 36 | * The interface that apps use to talk to the window manager. |
| 37 | * <p> |
| 38 | * Use <code>Context.getSystemService(Context.WINDOW_SERVICE)</code> to get one of these. |
Jeff Brown | a492c3a | 2012-08-23 19:48:44 -0700 | [diff] [blame] | 39 | * </p><p> |
| 40 | * Each window manager instance is bound to a particular {@link Display}. |
| 41 | * To obtain a {@link WindowManager} for a different display, use |
| 42 | * {@link Context#createDisplayContext} to obtain a {@link Context} for that |
| 43 | * display, then use <code>Context.getSystemService(Context.WINDOW_SERVICE)</code> |
| 44 | * to get the WindowManager. |
| 45 | * </p><p> |
| 46 | * The simplest way to show a window on another display is to create a |
| 47 | * {@link Presentation}. The presentation will automatically obtain a |
| 48 | * {@link WindowManager} and {@link Context} for that display. |
| 49 | * </p> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 50 | * |
| 51 | * @see android.content.Context#getSystemService |
| 52 | * @see android.content.Context#WINDOW_SERVICE |
| 53 | */ |
| 54 | public interface WindowManager extends ViewManager { |
Jorim Jaggi | 61f39a7 | 2015-10-29 16:54:18 +0100 | [diff] [blame] | 55 | |
| 56 | /** @hide */ |
| 57 | int DOCKED_INVALID = -1; |
| 58 | /** @hide */ |
| 59 | int DOCKED_LEFT = 1; |
| 60 | /** @hide */ |
| 61 | int DOCKED_TOP = 2; |
| 62 | /** @hide */ |
| 63 | int DOCKED_RIGHT = 3; |
| 64 | /** @hide */ |
| 65 | int DOCKED_BOTTOM = 4; |
| 66 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 67 | /** |
| 68 | * Exception that is thrown when trying to add view whose |
Jorim Jaggi | 380ecb8 | 2014-03-14 17:25:20 +0100 | [diff] [blame] | 69 | * {@link LayoutParams} {@link LayoutParams#token} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 70 | * is invalid. |
| 71 | */ |
| 72 | public static class BadTokenException extends RuntimeException { |
| 73 | public BadTokenException() { |
| 74 | } |
| 75 | |
| 76 | public BadTokenException(String name) { |
| 77 | super(name); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | /** |
Craig Mautner | 6018aee | 2012-10-23 14:27:49 -0700 | [diff] [blame] | 82 | * Exception that is thrown when calling {@link #addView} to a secondary display that cannot |
| 83 | * be found. See {@link android.app.Presentation} for more information on secondary displays. |
| 84 | */ |
| 85 | public static class InvalidDisplayException extends RuntimeException { |
| 86 | public InvalidDisplayException() { |
| 87 | } |
| 88 | |
| 89 | public InvalidDisplayException(String name) { |
| 90 | super(name); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | /** |
Jeff Brown | a492c3a | 2012-08-23 19:48:44 -0700 | [diff] [blame] | 95 | * Returns the {@link Display} upon which this {@link WindowManager} instance |
| 96 | * will create new windows. |
| 97 | * <p> |
| 98 | * Despite the name of this method, the display that is returned is not |
| 99 | * necessarily the primary display of the system (see {@link Display#DEFAULT_DISPLAY}). |
| 100 | * The returned display could instead be a secondary display that this |
| 101 | * window manager instance is managing. Think of it as the display that |
| 102 | * this {@link WindowManager} instance uses by default. |
| 103 | * </p><p> |
| 104 | * To create windows on a different display, you need to obtain a |
| 105 | * {@link WindowManager} for that {@link Display}. (See the {@link WindowManager} |
| 106 | * class documentation for more information.) |
| 107 | * </p> |
| 108 | * |
| 109 | * @return The display that this window manager is managing. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 110 | */ |
| 111 | public Display getDefaultDisplay(); |
Jeff Brown | a492c3a | 2012-08-23 19:48:44 -0700 | [diff] [blame] | 112 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 113 | /** |
| 114 | * Special variation of {@link #removeView} that immediately invokes |
| 115 | * the given view hierarchy's {@link View#onDetachedFromWindow() |
| 116 | * View.onDetachedFromWindow()} methods before returning. This is not |
| 117 | * for normal applications; using it correctly requires great care. |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 118 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 119 | * @param view The view to be removed. |
| 120 | */ |
| 121 | public void removeViewImmediate(View view); |
Jeff Brown | d32460c | 2012-07-20 16:15:36 -0700 | [diff] [blame] | 122 | |
Clara Bayarri | 75e0979 | 2015-07-29 16:20:40 +0100 | [diff] [blame] | 123 | /** |
| 124 | * Used to asynchronously request Keyboard Shortcuts from the focused window. |
| 125 | * |
| 126 | * @hide |
| 127 | */ |
| 128 | public interface KeyboardShortcutsReceiver { |
| 129 | /** |
| 130 | * Callback used when the focused window keyboard shortcuts are ready to be displayed. |
| 131 | * |
| 132 | * @param result The keyboard shortcuts to be displayed. |
| 133 | */ |
| 134 | void onKeyboardShortcutsReceived(List<KeyboardShortcutGroup> result); |
| 135 | } |
| 136 | |
| 137 | /** |
Muyuan Li | 6ca619f | 2016-03-08 13:30:42 -0800 | [diff] [blame] | 138 | * Message for taking fullscreen screenshot |
| 139 | * @hide |
| 140 | */ |
| 141 | final int TAKE_SCREENSHOT_FULLSCREEN = 1; |
| 142 | |
| 143 | /** |
| 144 | * Message for taking screenshot of selected region. |
| 145 | * @hide |
| 146 | */ |
| 147 | final int TAKE_SCREENSHOT_SELECTED_REGION = 2; |
| 148 | |
| 149 | /** |
Clara Bayarri | 75e0979 | 2015-07-29 16:20:40 +0100 | [diff] [blame] | 150 | * @hide |
| 151 | */ |
| 152 | public static final String PARCEL_KEY_SHORTCUTS_ARRAY = "shortcuts_array"; |
| 153 | |
| 154 | /** |
| 155 | * Request for keyboard shortcuts to be retrieved asynchronously. |
| 156 | * |
| 157 | * @param receiver The callback to be triggered when the result is ready. |
| 158 | * |
| 159 | * @hide |
| 160 | */ |
| 161 | public void requestAppKeyboardShortcuts(final KeyboardShortcutsReceiver receiver); |
| 162 | |
Filip Gruszczynski | 1a4dfe5 | 2015-11-15 10:58:57 -0800 | [diff] [blame] | 163 | public static class LayoutParams extends ViewGroup.LayoutParams implements Parcelable { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 164 | /** |
| 165 | * X position for this window. With the default gravity it is ignored. |
Fabrice Di Meglio | 9e3b002 | 2011-06-06 16:30:29 -0700 | [diff] [blame] | 166 | * When using {@link Gravity#LEFT} or {@link Gravity#START} or {@link Gravity#RIGHT} or |
| 167 | * {@link Gravity#END} it provides an offset from the given edge. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 168 | */ |
Romain Guy | 529b60a | 2010-08-03 18:05:47 -0700 | [diff] [blame] | 169 | @ViewDebug.ExportedProperty |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 170 | public int x; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 171 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 172 | /** |
| 173 | * Y position for this window. With the default gravity it is ignored. |
| 174 | * When using {@link Gravity#TOP} or {@link Gravity#BOTTOM} it provides |
| 175 | * an offset from the given edge. |
| 176 | */ |
Romain Guy | 529b60a | 2010-08-03 18:05:47 -0700 | [diff] [blame] | 177 | @ViewDebug.ExportedProperty |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 178 | public int y; |
| 179 | |
| 180 | /** |
| 181 | * Indicates how much of the extra space will be allocated horizontally |
| 182 | * to the view associated with these LayoutParams. Specify 0 if the view |
| 183 | * should not be stretched. Otherwise the extra pixels will be pro-rated |
| 184 | * among all views whose weight is greater than 0. |
| 185 | */ |
Romain Guy | 529b60a | 2010-08-03 18:05:47 -0700 | [diff] [blame] | 186 | @ViewDebug.ExportedProperty |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 187 | public float horizontalWeight; |
| 188 | |
| 189 | /** |
| 190 | * Indicates how much of the extra space will be allocated vertically |
| 191 | * to the view associated with these LayoutParams. Specify 0 if the view |
| 192 | * should not be stretched. Otherwise the extra pixels will be pro-rated |
| 193 | * among all views whose weight is greater than 0. |
| 194 | */ |
Romain Guy | 529b60a | 2010-08-03 18:05:47 -0700 | [diff] [blame] | 195 | @ViewDebug.ExportedProperty |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 196 | public float verticalWeight; |
Romain Guy | 529b60a | 2010-08-03 18:05:47 -0700 | [diff] [blame] | 197 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 198 | /** |
| 199 | * The general type of window. There are three main classes of |
| 200 | * window types: |
| 201 | * <ul> |
| 202 | * <li> <strong>Application windows</strong> (ranging from |
| 203 | * {@link #FIRST_APPLICATION_WINDOW} to |
| 204 | * {@link #LAST_APPLICATION_WINDOW}) are normal top-level application |
| 205 | * windows. For these types of windows, the {@link #token} must be |
| 206 | * set to the token of the activity they are a part of (this will |
| 207 | * normally be done for you if {@link #token} is null). |
| 208 | * <li> <strong>Sub-windows</strong> (ranging from |
| 209 | * {@link #FIRST_SUB_WINDOW} to |
| 210 | * {@link #LAST_SUB_WINDOW}) are associated with another top-level |
| 211 | * window. For these types of windows, the {@link #token} must be |
| 212 | * the token of the window it is attached to. |
| 213 | * <li> <strong>System windows</strong> (ranging from |
| 214 | * {@link #FIRST_SYSTEM_WINDOW} to |
| 215 | * {@link #LAST_SYSTEM_WINDOW}) are special types of windows for |
| 216 | * use by the system for specific purposes. They should not normally |
| 217 | * be used by applications, and a special permission is required |
| 218 | * to use them. |
| 219 | * </ul> |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 220 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 221 | * @see #TYPE_BASE_APPLICATION |
| 222 | * @see #TYPE_APPLICATION |
| 223 | * @see #TYPE_APPLICATION_STARTING |
| 224 | * @see #TYPE_APPLICATION_PANEL |
| 225 | * @see #TYPE_APPLICATION_MEDIA |
| 226 | * @see #TYPE_APPLICATION_SUB_PANEL |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 227 | * @see #TYPE_APPLICATION_ABOVE_SUB_PANEL |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 228 | * @see #TYPE_APPLICATION_ATTACHED_DIALOG |
| 229 | * @see #TYPE_STATUS_BAR |
| 230 | * @see #TYPE_SEARCH_BAR |
| 231 | * @see #TYPE_PHONE |
| 232 | * @see #TYPE_SYSTEM_ALERT |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 233 | * @see #TYPE_TOAST |
| 234 | * @see #TYPE_SYSTEM_OVERLAY |
| 235 | * @see #TYPE_PRIORITY_PHONE |
| 236 | * @see #TYPE_STATUS_BAR_PANEL |
| 237 | * @see #TYPE_SYSTEM_DIALOG |
| 238 | * @see #TYPE_KEYGUARD_DIALOG |
| 239 | * @see #TYPE_SYSTEM_ERROR |
| 240 | * @see #TYPE_INPUT_METHOD |
| 241 | * @see #TYPE_INPUT_METHOD_DIALOG |
| 242 | */ |
Joe Onorato | 8f2bd43 | 2010-03-25 11:45:28 -0700 | [diff] [blame] | 243 | @ViewDebug.ExportedProperty(mapping = { |
| 244 | @ViewDebug.IntToString(from = TYPE_BASE_APPLICATION, to = "TYPE_BASE_APPLICATION"), |
| 245 | @ViewDebug.IntToString(from = TYPE_APPLICATION, to = "TYPE_APPLICATION"), |
| 246 | @ViewDebug.IntToString(from = TYPE_APPLICATION_STARTING, to = "TYPE_APPLICATION_STARTING"), |
| 247 | @ViewDebug.IntToString(from = TYPE_APPLICATION_PANEL, to = "TYPE_APPLICATION_PANEL"), |
| 248 | @ViewDebug.IntToString(from = TYPE_APPLICATION_MEDIA, to = "TYPE_APPLICATION_MEDIA"), |
| 249 | @ViewDebug.IntToString(from = TYPE_APPLICATION_SUB_PANEL, to = "TYPE_APPLICATION_SUB_PANEL"), |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 250 | @ViewDebug.IntToString(from = TYPE_APPLICATION_ABOVE_SUB_PANEL, to = "TYPE_APPLICATION_ABOVE_SUB_PANEL"), |
Joe Onorato | 8f2bd43 | 2010-03-25 11:45:28 -0700 | [diff] [blame] | 251 | @ViewDebug.IntToString(from = TYPE_APPLICATION_ATTACHED_DIALOG, to = "TYPE_APPLICATION_ATTACHED_DIALOG"), |
Scott Anderson | aeb7723 | 2012-05-31 18:55:54 -0700 | [diff] [blame] | 252 | @ViewDebug.IntToString(from = TYPE_APPLICATION_MEDIA_OVERLAY, to = "TYPE_APPLICATION_MEDIA_OVERLAY"), |
Joe Onorato | 8f2bd43 | 2010-03-25 11:45:28 -0700 | [diff] [blame] | 253 | @ViewDebug.IntToString(from = TYPE_STATUS_BAR, to = "TYPE_STATUS_BAR"), |
| 254 | @ViewDebug.IntToString(from = TYPE_SEARCH_BAR, to = "TYPE_SEARCH_BAR"), |
| 255 | @ViewDebug.IntToString(from = TYPE_PHONE, to = "TYPE_PHONE"), |
| 256 | @ViewDebug.IntToString(from = TYPE_SYSTEM_ALERT, to = "TYPE_SYSTEM_ALERT"), |
Joe Onorato | 8f2bd43 | 2010-03-25 11:45:28 -0700 | [diff] [blame] | 257 | @ViewDebug.IntToString(from = TYPE_TOAST, to = "TYPE_TOAST"), |
| 258 | @ViewDebug.IntToString(from = TYPE_SYSTEM_OVERLAY, to = "TYPE_SYSTEM_OVERLAY"), |
| 259 | @ViewDebug.IntToString(from = TYPE_PRIORITY_PHONE, to = "TYPE_PRIORITY_PHONE"), |
Joe Onorato | 8f2bd43 | 2010-03-25 11:45:28 -0700 | [diff] [blame] | 260 | @ViewDebug.IntToString(from = TYPE_SYSTEM_DIALOG, to = "TYPE_SYSTEM_DIALOG"), |
| 261 | @ViewDebug.IntToString(from = TYPE_KEYGUARD_DIALOG, to = "TYPE_KEYGUARD_DIALOG"), |
| 262 | @ViewDebug.IntToString(from = TYPE_SYSTEM_ERROR, to = "TYPE_SYSTEM_ERROR"), |
| 263 | @ViewDebug.IntToString(from = TYPE_INPUT_METHOD, to = "TYPE_INPUT_METHOD"), |
Jeff Brown | 3b2b354 | 2010-10-15 00:54:27 -0700 | [diff] [blame] | 264 | @ViewDebug.IntToString(from = TYPE_INPUT_METHOD_DIALOG, to = "TYPE_INPUT_METHOD_DIALOG"), |
Jeff Brown | bfcb60a | 2011-09-08 18:51:14 -0700 | [diff] [blame] | 265 | @ViewDebug.IntToString(from = TYPE_WALLPAPER, to = "TYPE_WALLPAPER"), |
| 266 | @ViewDebug.IntToString(from = TYPE_STATUS_BAR_PANEL, to = "TYPE_STATUS_BAR_PANEL"), |
Dianne Hackborn | 29aae6f | 2011-08-18 18:30:09 -0700 | [diff] [blame] | 267 | @ViewDebug.IntToString(from = TYPE_SECURE_SYSTEM_OVERLAY, to = "TYPE_SECURE_SYSTEM_OVERLAY"), |
Jeff Brown | bfcb60a | 2011-09-08 18:51:14 -0700 | [diff] [blame] | 268 | @ViewDebug.IntToString(from = TYPE_DRAG, to = "TYPE_DRAG"), |
| 269 | @ViewDebug.IntToString(from = TYPE_STATUS_BAR_SUB_PANEL, to = "TYPE_STATUS_BAR_SUB_PANEL"), |
| 270 | @ViewDebug.IntToString(from = TYPE_POINTER, to = "TYPE_POINTER"), |
| 271 | @ViewDebug.IntToString(from = TYPE_NAVIGATION_BAR, to = "TYPE_NAVIGATION_BAR"), |
| 272 | @ViewDebug.IntToString(from = TYPE_VOLUME_OVERLAY, to = "TYPE_VOLUME_OVERLAY"), |
Scott Anderson | aeb7723 | 2012-05-31 18:55:54 -0700 | [diff] [blame] | 273 | @ViewDebug.IntToString(from = TYPE_BOOT_PROGRESS, to = "TYPE_BOOT_PROGRESS"), |
Selim Cinek | f83e824 | 2015-05-19 18:08:14 -0700 | [diff] [blame] | 274 | @ViewDebug.IntToString(from = TYPE_INPUT_CONSUMER, to = "TYPE_INPUT_CONSUMER"), |
Scott Anderson | aeb7723 | 2012-05-31 18:55:54 -0700 | [diff] [blame] | 275 | @ViewDebug.IntToString(from = TYPE_DREAM, to = "TYPE_DREAM"), |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 276 | @ViewDebug.IntToString(from = TYPE_NAVIGATION_BAR_PANEL, to = "TYPE_NAVIGATION_BAR_PANEL"), |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 277 | @ViewDebug.IntToString(from = TYPE_DISPLAY_OVERLAY, to = "TYPE_DISPLAY_OVERLAY"), |
keunyoung | a446bf0 | 2013-06-21 19:07:57 -0700 | [diff] [blame] | 278 | @ViewDebug.IntToString(from = TYPE_MAGNIFICATION_OVERLAY, to = "TYPE_MAGNIFICATION_OVERLAY"), |
Dianne Hackborn | e30e02f | 2014-05-27 18:24:45 -0700 | [diff] [blame] | 279 | @ViewDebug.IntToString(from = TYPE_PRIVATE_PRESENTATION, to = "TYPE_PRIVATE_PRESENTATION"), |
| 280 | @ViewDebug.IntToString(from = TYPE_VOICE_INTERACTION, to = "TYPE_VOICE_INTERACTION"), |
Jorim Jaggi | 225d3b5 | 2015-04-01 11:18:57 -0700 | [diff] [blame] | 281 | @ViewDebug.IntToString(from = TYPE_VOICE_INTERACTION_STARTING, to = "TYPE_VOICE_INTERACTION_STARTING"), |
Filip Gruszczynski | 466f321 | 2015-09-21 17:57:57 -0700 | [diff] [blame] | 282 | @ViewDebug.IntToString(from = TYPE_DOCK_DIVIDER, to = "TYPE_DOCK_DIVIDER"), |
Jason Monk | 8f7f318 | 2015-11-18 16:35:14 -0500 | [diff] [blame] | 283 | @ViewDebug.IntToString(from = TYPE_QS_DIALOG, to = "TYPE_QS_DIALOG"), |
Muyuan Li | 6ca619f | 2016-03-08 13:30:42 -0800 | [diff] [blame] | 284 | @ViewDebug.IntToString(from = TYPE_SCREENSHOT, to = "TYPE_SCREENSHOT") |
Joe Onorato | 8f2bd43 | 2010-03-25 11:45:28 -0700 | [diff] [blame] | 285 | }) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 286 | public int type; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 287 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 288 | /** |
| 289 | * Start of window types that represent normal application windows. |
| 290 | */ |
| 291 | public static final int FIRST_APPLICATION_WINDOW = 1; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 292 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 293 | /** |
| 294 | * Window type: an application window that serves as the "base" window |
| 295 | * of the overall application; all other application windows will |
| 296 | * appear on top of it. |
Craig Mautner | 5962b12 | 2012-10-05 14:45:52 -0700 | [diff] [blame] | 297 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 298 | */ |
| 299 | public static final int TYPE_BASE_APPLICATION = 1; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 300 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 301 | /** |
| 302 | * Window type: a normal application window. The {@link #token} must be |
| 303 | * an Activity token identifying who the window belongs to. |
Craig Mautner | 5962b12 | 2012-10-05 14:45:52 -0700 | [diff] [blame] | 304 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 305 | */ |
| 306 | public static final int TYPE_APPLICATION = 2; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 307 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 308 | /** |
| 309 | * Window type: special application window that is displayed while the |
| 310 | * application is starting. Not for use by applications themselves; |
| 311 | * this is used by the system to display something until the |
| 312 | * application can show its own windows. |
Craig Mautner | 5962b12 | 2012-10-05 14:45:52 -0700 | [diff] [blame] | 313 | * In multiuser systems shows on all users' windows. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 314 | */ |
| 315 | public static final int TYPE_APPLICATION_STARTING = 3; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 316 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 317 | /** |
| 318 | * End of types of application windows. |
| 319 | */ |
| 320 | public static final int LAST_APPLICATION_WINDOW = 99; |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 321 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 322 | /** |
| 323 | * Start of types of sub-windows. The {@link #token} of these windows |
| 324 | * must be set to the window they are attached to. These types of |
| 325 | * windows are kept next to their attached window in Z-order, and their |
| 326 | * coordinate space is relative to their attached window. |
| 327 | */ |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 328 | public static final int FIRST_SUB_WINDOW = 1000; |
| 329 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 330 | /** |
| 331 | * Window type: a panel on top of an application window. These windows |
| 332 | * appear on top of their attached window. |
| 333 | */ |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 334 | public static final int TYPE_APPLICATION_PANEL = FIRST_SUB_WINDOW; |
| 335 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 336 | /** |
John Spurlock | 33291d8 | 2013-03-13 14:45:14 -0400 | [diff] [blame] | 337 | * Window type: window for showing media (such as video). These windows |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 338 | * are displayed behind their attached window. |
| 339 | */ |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 340 | public static final int TYPE_APPLICATION_MEDIA = FIRST_SUB_WINDOW + 1; |
| 341 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 342 | /** |
| 343 | * Window type: a sub-panel on top of an application window. These |
| 344 | * windows are displayed on top their attached window and any |
| 345 | * {@link #TYPE_APPLICATION_PANEL} panels. |
| 346 | */ |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 347 | public static final int TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW + 2; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 348 | |
| 349 | /** Window type: like {@link #TYPE_APPLICATION_PANEL}, but layout |
| 350 | * of the window happens as that of a top-level window, <em>not</em> |
| 351 | * as a child of its container. |
| 352 | */ |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 353 | public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW + 3; |
| 354 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 355 | /** |
Dianne Hackborn | c4d5d02 | 2009-05-21 17:32:42 -0700 | [diff] [blame] | 356 | * Window type: window for showing overlays on top of media windows. |
| 357 | * These windows are displayed between TYPE_APPLICATION_MEDIA and the |
| 358 | * application window. They should be translucent to be useful. This |
| 359 | * is a big ugly hack so: |
| 360 | * @hide |
| 361 | */ |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 362 | public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW + 4; |
| 363 | |
| 364 | /** |
| 365 | * Window type: a above sub-panel on top of an application window and it's |
| 366 | * sub-panel windows. These windows are displayed on top of their attached window |
| 367 | * and any {@link #TYPE_APPLICATION_SUB_PANEL} panels. |
Wale Ogunwale | 3540f93 | 2015-06-02 11:07:07 -0700 | [diff] [blame] | 368 | * @hide |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 369 | */ |
| 370 | public static final int TYPE_APPLICATION_ABOVE_SUB_PANEL = FIRST_SUB_WINDOW + 5; |
| 371 | |
Dianne Hackborn | c4d5d02 | 2009-05-21 17:32:42 -0700 | [diff] [blame] | 372 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 373 | * End of types of sub-windows. |
| 374 | */ |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 375 | public static final int LAST_SUB_WINDOW = 1999; |
| 376 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 377 | /** |
| 378 | * Start of system-specific window types. These are not normally |
| 379 | * created by applications. |
| 380 | */ |
| 381 | public static final int FIRST_SYSTEM_WINDOW = 2000; |
Wale Ogunwale | 0a4dc22 | 2015-04-14 12:58:42 -0700 | [diff] [blame] | 382 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 383 | /** |
| 384 | * Window type: the status bar. There can be only one status bar |
| 385 | * window; it is placed at the top of the screen, and all other |
| 386 | * windows are shifted down so they are below it. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 387 | * In multiuser systems shows on all users' windows. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 388 | */ |
| 389 | public static final int TYPE_STATUS_BAR = FIRST_SYSTEM_WINDOW; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 390 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 391 | /** |
| 392 | * Window type: the search bar. There can be only one search bar |
| 393 | * window; it is placed at the top of the screen. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 394 | * In multiuser systems shows on all users' windows. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 395 | */ |
| 396 | public static final int TYPE_SEARCH_BAR = FIRST_SYSTEM_WINDOW+1; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 397 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 398 | /** |
| 399 | * Window type: phone. These are non-application windows providing |
| 400 | * user interaction with the phone (in particular incoming calls). |
| 401 | * These windows are normally placed above all applications, but behind |
| 402 | * the status bar. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 403 | * In multiuser systems shows on all users' windows. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 404 | */ |
| 405 | public static final int TYPE_PHONE = FIRST_SYSTEM_WINDOW+2; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 406 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 407 | /** |
| 408 | * Window type: system window, such as low power alert. These windows |
| 409 | * are always on top of application windows. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 410 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 411 | */ |
| 412 | public static final int TYPE_SYSTEM_ALERT = FIRST_SYSTEM_WINDOW+3; |
Jorim Jaggi | 380ecb8 | 2014-03-14 17:25:20 +0100 | [diff] [blame] | 413 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 414 | /** |
| 415 | * Window type: keyguard window. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 416 | * In multiuser systems shows on all users' windows. |
Jorim Jaggi | e411fdf | 2014-07-28 23:00:44 +0200 | [diff] [blame] | 417 | * @removed |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 418 | */ |
| 419 | public static final int TYPE_KEYGUARD = FIRST_SYSTEM_WINDOW+4; |
Jorim Jaggi | 380ecb8 | 2014-03-14 17:25:20 +0100 | [diff] [blame] | 420 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 421 | /** |
| 422 | * Window type: transient notifications. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 423 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 424 | */ |
| 425 | public static final int TYPE_TOAST = FIRST_SYSTEM_WINDOW+5; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 426 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 427 | /** |
| 428 | * Window type: system overlay windows, which need to be displayed |
| 429 | * on top of everything else. These windows must not take input |
| 430 | * focus, or they will interfere with the keyguard. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 431 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 432 | */ |
| 433 | public static final int TYPE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+6; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 434 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 435 | /** |
| 436 | * Window type: priority phone UI, which needs to be displayed even if |
| 437 | * the keyguard is active. These windows must not take input |
| 438 | * focus, or they will interfere with the keyguard. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 439 | * In multiuser systems shows on all users' windows. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 440 | */ |
| 441 | public static final int TYPE_PRIORITY_PHONE = FIRST_SYSTEM_WINDOW+7; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 442 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 443 | /** |
| 444 | * Window type: panel that slides out from the status bar |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 445 | * In multiuser systems shows on all users' windows. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 446 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 447 | public static final int TYPE_SYSTEM_DIALOG = FIRST_SYSTEM_WINDOW+8; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 448 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 449 | /** |
| 450 | * Window type: dialogs that the keyguard shows |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 451 | * In multiuser systems shows on all users' windows. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 452 | */ |
| 453 | public static final int TYPE_KEYGUARD_DIALOG = FIRST_SYSTEM_WINDOW+9; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 454 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 455 | /** |
| 456 | * Window type: internal system error windows, appear on top of |
| 457 | * everything they can. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 458 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 459 | */ |
| 460 | public static final int TYPE_SYSTEM_ERROR = FIRST_SYSTEM_WINDOW+10; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 461 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 462 | /** |
| 463 | * Window type: internal input methods windows, which appear above |
| 464 | * the normal UI. Application windows may be resized or panned to keep |
| 465 | * the input focus visible while this window is displayed. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 466 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 467 | */ |
| 468 | public static final int TYPE_INPUT_METHOD = FIRST_SYSTEM_WINDOW+11; |
| 469 | |
| 470 | /** |
| 471 | * Window type: internal input methods dialog windows, which appear above |
| 472 | * the current input method window. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 473 | * In multiuser systems shows only on the owning user's window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 474 | */ |
| 475 | public static final int TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12; |
| 476 | |
| 477 | /** |
Dianne Hackborn | 4c62fc0 | 2009-08-08 20:40:27 -0700 | [diff] [blame] | 478 | * Window type: wallpaper window, placed behind any window that wants |
| 479 | * to sit on top of the wallpaper. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 480 | * In multiuser systems shows only on the owning user's window. |
Dianne Hackborn | 4c62fc0 | 2009-08-08 20:40:27 -0700 | [diff] [blame] | 481 | */ |
| 482 | public static final int TYPE_WALLPAPER = FIRST_SYSTEM_WINDOW+13; |
| 483 | |
| 484 | /** |
Joe Onorato | 29fc2c9 | 2010-11-24 10:26:50 -0800 | [diff] [blame] | 485 | * Window type: panel that slides out from over the status bar |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 486 | * In multiuser systems shows on all users' windows. |
Dianne Hackborn | badc47e | 2009-11-08 17:37:07 -0800 | [diff] [blame] | 487 | */ |
| 488 | public static final int TYPE_STATUS_BAR_PANEL = FIRST_SYSTEM_WINDOW+14; |
Jeff Brown | 3b2b354 | 2010-10-15 00:54:27 -0700 | [diff] [blame] | 489 | |
| 490 | /** |
| 491 | * Window type: secure system overlay windows, which need to be displayed |
| 492 | * on top of everything else. These windows must not take input |
| 493 | * focus, or they will interfere with the keyguard. |
| 494 | * |
| 495 | * This is exactly like {@link #TYPE_SYSTEM_OVERLAY} except that only the |
| 496 | * system itself is allowed to create these overlays. Applications cannot |
| 497 | * obtain permission to create secure system overlays. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 498 | * |
| 499 | * In multiuser systems shows only on the owning user's window. |
Jeff Brown | 3b2b354 | 2010-10-15 00:54:27 -0700 | [diff] [blame] | 500 | * @hide |
| 501 | */ |
| 502 | public static final int TYPE_SECURE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+15; |
| 503 | |
Dianne Hackborn | badc47e | 2009-11-08 17:37:07 -0800 | [diff] [blame] | 504 | /** |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 505 | * Window type: the drag-and-drop pseudowindow. There is only one |
| 506 | * drag layer (at most), and it is placed on top of all other windows. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 507 | * In multiuser systems shows only on the owning user's window. |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 508 | * @hide |
| 509 | */ |
Jeff Brown | 3b2b354 | 2010-10-15 00:54:27 -0700 | [diff] [blame] | 510 | public static final int TYPE_DRAG = FIRST_SYSTEM_WINDOW+16; |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 511 | |
| 512 | /** |
Joe Onorato | 29fc2c9 | 2010-11-24 10:26:50 -0800 | [diff] [blame] | 513 | * Window type: panel that slides out from under the status bar |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 514 | * In multiuser systems shows on all users' windows. |
Joe Onorato | a89e903 | 2010-11-24 11:13:44 -0800 | [diff] [blame] | 515 | * @hide |
Joe Onorato | 29fc2c9 | 2010-11-24 10:26:50 -0800 | [diff] [blame] | 516 | */ |
| 517 | public static final int TYPE_STATUS_BAR_SUB_PANEL = FIRST_SYSTEM_WINDOW+17; |
| 518 | |
Jeff Brown | 83c0968 | 2010-12-23 17:50:18 -0800 | [diff] [blame] | 519 | /** |
| 520 | * Window type: (mouse) pointer |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 521 | * In multiuser systems shows on all users' windows. |
Jeff Brown | 83c0968 | 2010-12-23 17:50:18 -0800 | [diff] [blame] | 522 | * @hide |
| 523 | */ |
| 524 | public static final int TYPE_POINTER = FIRST_SYSTEM_WINDOW+18; |
Joe Onorato | 29fc2c9 | 2010-11-24 10:26:50 -0800 | [diff] [blame] | 525 | |
| 526 | /** |
Daniel Sandler | 8956dbb | 2011-04-22 07:55:02 -0400 | [diff] [blame] | 527 | * Window type: Navigation bar (when distinct from status bar) |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 528 | * In multiuser systems shows on all users' windows. |
Daniel Sandler | 8956dbb | 2011-04-22 07:55:02 -0400 | [diff] [blame] | 529 | * @hide |
| 530 | */ |
| 531 | public static final int TYPE_NAVIGATION_BAR = FIRST_SYSTEM_WINDOW+19; |
| 532 | |
| 533 | /** |
Dianne Hackborn | e8ecde1 | 2011-08-03 18:55:19 -0700 | [diff] [blame] | 534 | * Window type: The volume level overlay/dialog shown when the user |
| 535 | * changes the system volume. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 536 | * In multiuser systems shows on all users' windows. |
Dianne Hackborn | e8ecde1 | 2011-08-03 18:55:19 -0700 | [diff] [blame] | 537 | * @hide |
| 538 | */ |
| 539 | public static final int TYPE_VOLUME_OVERLAY = FIRST_SYSTEM_WINDOW+20; |
| 540 | |
| 541 | /** |
Dianne Hackborn | 29aae6f | 2011-08-18 18:30:09 -0700 | [diff] [blame] | 542 | * Window type: The boot progress dialog, goes on top of everything |
| 543 | * in the world. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 544 | * In multiuser systems shows on all users' windows. |
Dianne Hackborn | 29aae6f | 2011-08-18 18:30:09 -0700 | [diff] [blame] | 545 | * @hide |
| 546 | */ |
| 547 | public static final int TYPE_BOOT_PROGRESS = FIRST_SYSTEM_WINDOW+21; |
| 548 | |
| 549 | /** |
Selim Cinek | f83e824 | 2015-05-19 18:08:14 -0700 | [diff] [blame] | 550 | * Window type to consume input events when the systemUI bars are hidden. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 551 | * In multiuser systems shows on all users' windows. |
Dianne Hackborn | df89e65 | 2011-10-06 22:35:11 -0700 | [diff] [blame] | 552 | * @hide |
| 553 | */ |
Selim Cinek | f83e824 | 2015-05-19 18:08:14 -0700 | [diff] [blame] | 554 | public static final int TYPE_INPUT_CONSUMER = FIRST_SYSTEM_WINDOW+22; |
Dianne Hackborn | df89e65 | 2011-10-06 22:35:11 -0700 | [diff] [blame] | 555 | |
| 556 | /** |
Daniel Sandler | 7d276c3 | 2012-01-30 14:33:52 -0500 | [diff] [blame] | 557 | * Window type: Dreams (screen saver) window, just above keyguard. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 558 | * In multiuser systems shows only on the owning user's window. |
Daniel Sandler | 7d276c3 | 2012-01-30 14:33:52 -0500 | [diff] [blame] | 559 | * @hide |
| 560 | */ |
| 561 | public static final int TYPE_DREAM = FIRST_SYSTEM_WINDOW+23; |
| 562 | |
| 563 | /** |
Jim Miller | e898ac5 | 2012-04-06 17:10:57 -0700 | [diff] [blame] | 564 | * Window type: Navigation bar panel (when navigation bar is distinct from status bar) |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 565 | * In multiuser systems shows on all users' windows. |
Jim Miller | e898ac5 | 2012-04-06 17:10:57 -0700 | [diff] [blame] | 566 | * @hide |
| 567 | */ |
| 568 | public static final int TYPE_NAVIGATION_BAR_PANEL = FIRST_SYSTEM_WINDOW+24; |
| 569 | |
| 570 | /** |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 571 | * Window type: Display overlay window. Used to simulate secondary display devices. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 572 | * In multiuser systems shows on all users' windows. |
Jeff Brown | bd6e150 | 2012-08-28 03:27:37 -0700 | [diff] [blame] | 573 | * @hide |
| 574 | */ |
| 575 | public static final int TYPE_DISPLAY_OVERLAY = FIRST_SYSTEM_WINDOW+26; |
| 576 | |
| 577 | /** |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 578 | * Window type: Magnification overlay window. Used to highlight the magnified |
| 579 | * portion of a display when accessibility magnification is enabled. |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 580 | * In multiuser systems shows on all users' windows. |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 581 | * @hide |
| 582 | */ |
| 583 | public static final int TYPE_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW+27; |
| 584 | |
| 585 | /** |
Jim Miller | 5ecd811 | 2013-01-09 18:50:26 -0800 | [diff] [blame] | 586 | * Window type: keyguard scrim window. Shows if keyguard needs to be restarted. |
| 587 | * In multiuser systems shows on all users' windows. |
| 588 | * @hide |
| 589 | */ |
| 590 | public static final int TYPE_KEYGUARD_SCRIM = FIRST_SYSTEM_WINDOW+29; |
| 591 | |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 592 | /** |
keunyoung | a446bf0 | 2013-06-21 19:07:57 -0700 | [diff] [blame] | 593 | * Window type: Window for Presentation on top of private |
| 594 | * virtual display. |
| 595 | */ |
| 596 | public static final int TYPE_PRIVATE_PRESENTATION = FIRST_SYSTEM_WINDOW+30; |
| 597 | |
| 598 | /** |
Dianne Hackborn | e30e02f | 2014-05-27 18:24:45 -0700 | [diff] [blame] | 599 | * Window type: Windows in the voice interaction layer. |
| 600 | * @hide |
| 601 | */ |
| 602 | public static final int TYPE_VOICE_INTERACTION = FIRST_SYSTEM_WINDOW+31; |
| 603 | |
| 604 | /** |
Phil Weaver | 40ded28 | 2016-01-25 15:49:02 -0800 | [diff] [blame] | 605 | * Window type: Windows that are overlaid <em>only</em> by a connected {@link |
Svetoslav | 3a5c721 | 2014-10-14 09:54:26 -0700 | [diff] [blame] | 606 | * android.accessibilityservice.AccessibilityService} for interception of |
| 607 | * user interactions without changing the windows an accessibility service |
| 608 | * can introspect. In particular, an accessibility service can introspect |
| 609 | * only windows that a sighted user can interact with which is they can touch |
| 610 | * these windows or can type into these windows. For example, if there |
| 611 | * is a full screen accessibility overlay that is touchable, the windows |
Phil Weaver | 40ded28 | 2016-01-25 15:49:02 -0800 | [diff] [blame] | 612 | * below it will be introspectable by an accessibility service even though |
Svetoslav | 3a5c721 | 2014-10-14 09:54:26 -0700 | [diff] [blame] | 613 | * they are covered by a touchable window. |
| 614 | */ |
| 615 | public static final int TYPE_ACCESSIBILITY_OVERLAY = FIRST_SYSTEM_WINDOW+32; |
| 616 | |
| 617 | /** |
Jorim Jaggi | 225d3b5 | 2015-04-01 11:18:57 -0700 | [diff] [blame] | 618 | * Window type: Starting window for voice interaction layer. |
| 619 | * @hide |
| 620 | */ |
| 621 | public static final int TYPE_VOICE_INTERACTION_STARTING = FIRST_SYSTEM_WINDOW+33; |
| 622 | |
| 623 | /** |
Filip Gruszczynski | 466f321 | 2015-09-21 17:57:57 -0700 | [diff] [blame] | 624 | * Window for displaying a handle used for resizing docked stacks. This window is owned |
| 625 | * by the system process. |
| 626 | * @hide |
| 627 | */ |
| 628 | public static final int TYPE_DOCK_DIVIDER = FIRST_SYSTEM_WINDOW+34; |
| 629 | |
| 630 | /** |
Jason Monk | 8f7f318 | 2015-11-18 16:35:14 -0500 | [diff] [blame] | 631 | * Window type: like {@link #TYPE_APPLICATION_ATTACHED_DIALOG}, but used |
| 632 | * by Quick Settings Tiles. |
| 633 | * @hide |
| 634 | */ |
| 635 | public static final int TYPE_QS_DIALOG = FIRST_SYSTEM_WINDOW+35; |
| 636 | |
| 637 | /** |
Muyuan Li | 6ca619f | 2016-03-08 13:30:42 -0800 | [diff] [blame] | 638 | * Window type: shares similar characteristics with {@link #TYPE_DREAM}. The layer is |
| 639 | * reserved for screenshot region selection. |
| 640 | * @hide |
| 641 | */ |
| 642 | public static final int TYPE_SCREENSHOT = FIRST_SYSTEM_WINDOW + 36; |
| 643 | |
| 644 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 645 | * End of types of system windows. |
| 646 | */ |
| 647 | public static final int LAST_SYSTEM_WINDOW = 2999; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 648 | |
Mathias Agopian | d211230 | 2010-12-07 19:38:17 -0800 | [diff] [blame] | 649 | /** @deprecated this is ignored, this value is set automatically when needed. */ |
| 650 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 651 | public static final int MEMORY_TYPE_NORMAL = 0; |
Mathias Agopian | d211230 | 2010-12-07 19:38:17 -0800 | [diff] [blame] | 652 | /** @deprecated this is ignored, this value is set automatically when needed. */ |
Mathias Agopian | 317a628 | 2009-08-13 17:29:02 -0700 | [diff] [blame] | 653 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 654 | public static final int MEMORY_TYPE_HARDWARE = 1; |
Mathias Agopian | d211230 | 2010-12-07 19:38:17 -0800 | [diff] [blame] | 655 | /** @deprecated this is ignored, this value is set automatically when needed. */ |
Mathias Agopian | 317a628 | 2009-08-13 17:29:02 -0700 | [diff] [blame] | 656 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 657 | public static final int MEMORY_TYPE_GPU = 2; |
Mathias Agopian | d211230 | 2010-12-07 19:38:17 -0800 | [diff] [blame] | 658 | /** @deprecated this is ignored, this value is set automatically when needed. */ |
| 659 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 660 | public static final int MEMORY_TYPE_PUSH_BUFFERS = 3; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 661 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 662 | /** |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 663 | * @deprecated this is ignored |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 664 | */ |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 665 | @Deprecated |
| 666 | public int memoryType; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 667 | |
Mike Lockwood | ef73162 | 2010-01-27 17:51:34 -0500 | [diff] [blame] | 668 | /** Window flag: as long as this window is visible to the user, allow |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 669 | * the lock screen to activate while the screen is on. |
| 670 | * This can be used independently, or in combination with |
Christopher Tate | 95f7850 | 2010-01-29 15:57:34 -0800 | [diff] [blame] | 671 | * {@link #FLAG_KEEP_SCREEN_ON} and/or {@link #FLAG_SHOW_WHEN_LOCKED} */ |
Mike Lockwood | ef73162 | 2010-01-27 17:51:34 -0500 | [diff] [blame] | 672 | public static final int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001; |
| 673 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 674 | /** Window flag: everything behind this window will be dimmed. |
| 675 | * Use {@link #dimAmount} to control the amount of dim. */ |
| 676 | public static final int FLAG_DIM_BEHIND = 0x00000002; |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 677 | |
| 678 | /** Window flag: blur everything behind this window. |
| 679 | * @deprecated Blurring is no longer supported. */ |
| 680 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 681 | public static final int FLAG_BLUR_BEHIND = 0x00000004; |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 682 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 683 | /** Window flag: this window won't ever get key input focus, so the |
| 684 | * user can not send key or other button events to it. Those will |
| 685 | * instead go to whatever focusable window is behind it. This flag |
| 686 | * will also enable {@link #FLAG_NOT_TOUCH_MODAL} whether or not that |
| 687 | * is explicitly set. |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 688 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 689 | * <p>Setting this flag also implies that the window will not need to |
| 690 | * interact with |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 691 | * a soft input method, so it will be Z-ordered and positioned |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 692 | * independently of any active input method (typically this means it |
| 693 | * gets Z-ordered on top of the input method, so it can use the full |
| 694 | * screen for its content and cover the input method if needed. You |
| 695 | * can use {@link #FLAG_ALT_FOCUSABLE_IM} to modify this behavior. */ |
| 696 | public static final int FLAG_NOT_FOCUSABLE = 0x00000008; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 697 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 698 | /** Window flag: this window can never receive touch events. */ |
| 699 | public static final int FLAG_NOT_TOUCHABLE = 0x00000010; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 700 | |
John Spurlock | 33291d8 | 2013-03-13 14:45:14 -0400 | [diff] [blame] | 701 | /** Window flag: even when this window is focusable (its |
| 702 | * {@link #FLAG_NOT_FOCUSABLE} is not set), allow any pointer events |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 703 | * outside of the window to be sent to the windows behind it. Otherwise |
| 704 | * it will consume all pointer events itself, regardless of whether they |
| 705 | * are inside of the window. */ |
| 706 | public static final int FLAG_NOT_TOUCH_MODAL = 0x00000020; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 707 | |
John Spurlock | 33291d8 | 2013-03-13 14:45:14 -0400 | [diff] [blame] | 708 | /** Window flag: when set, if the device is asleep when the touch |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 709 | * screen is pressed, you will receive this first touch event. Usually |
| 710 | * the first touch event is consumed by the system since the user can |
| 711 | * not see what they are pressing on. |
Jeff Brown | 037c33e | 2014-04-09 00:31:55 -0700 | [diff] [blame] | 712 | * |
| 713 | * @deprecated This flag has no effect. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 714 | */ |
Jeff Brown | 037c33e | 2014-04-09 00:31:55 -0700 | [diff] [blame] | 715 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 716 | public static final int FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 717 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 718 | /** Window flag: as long as this window is visible to the user, keep |
| 719 | * the device's screen turned on and bright. */ |
| 720 | public static final int FLAG_KEEP_SCREEN_ON = 0x00000080; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 721 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 722 | /** Window flag: place the window within the entire screen, ignoring |
John Spurlock | 33291d8 | 2013-03-13 14:45:14 -0400 | [diff] [blame] | 723 | * decorations around the border (such as the status bar). The |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 724 | * window must correctly position its contents to take the screen |
| 725 | * decoration into account. This flag is normally set for you |
| 726 | * by Window as described in {@link Window#setFlags}. */ |
| 727 | public static final int FLAG_LAYOUT_IN_SCREEN = 0x00000100; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 728 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 729 | /** Window flag: allow window to extend outside of the screen. */ |
| 730 | public static final int FLAG_LAYOUT_NO_LIMITS = 0x00000200; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 731 | |
Dianne Hackborn | 1bf1af6 | 2013-02-25 16:48:53 -0800 | [diff] [blame] | 732 | /** |
John Spurlock | 33291d8 | 2013-03-13 14:45:14 -0400 | [diff] [blame] | 733 | * Window flag: hide all screen decorations (such as the status bar) while |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 734 | * this window is displayed. This allows the window to use the entire |
| 735 | * display space for itself -- the status bar will be hidden when |
Chet Haase | 45c89c2 | 2013-04-29 16:04:40 -0700 | [diff] [blame] | 736 | * an app window with this flag set is on the top layer. A fullscreen window |
| 737 | * will ignore a value of {@link #SOFT_INPUT_ADJUST_RESIZE} for the window's |
| 738 | * {@link #softInputMode} field; the window will stay fullscreen |
| 739 | * and will not resize. |
Dianne Hackborn | 1bf1af6 | 2013-02-25 16:48:53 -0800 | [diff] [blame] | 740 | * |
| 741 | * <p>This flag can be controlled in your theme through the |
| 742 | * {@link android.R.attr#windowFullscreen} attribute; this attribute |
| 743 | * is automatically set for you in the standard fullscreen themes |
| 744 | * such as {@link android.R.style#Theme_NoTitleBar_Fullscreen}, |
| 745 | * {@link android.R.style#Theme_Black_NoTitleBar_Fullscreen}, |
| 746 | * {@link android.R.style#Theme_Light_NoTitleBar_Fullscreen}, |
| 747 | * {@link android.R.style#Theme_Holo_NoActionBar_Fullscreen}, |
| 748 | * {@link android.R.style#Theme_Holo_Light_NoActionBar_Fullscreen}, |
| 749 | * {@link android.R.style#Theme_DeviceDefault_NoActionBar_Fullscreen}, and |
| 750 | * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_Fullscreen}.</p> |
| 751 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 752 | public static final int FLAG_FULLSCREEN = 0x00000400; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 753 | |
John Spurlock | 33291d8 | 2013-03-13 14:45:14 -0400 | [diff] [blame] | 754 | /** Window flag: override {@link #FLAG_FULLSCREEN} and force the |
| 755 | * screen decorations (such as the status bar) to be shown. */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 756 | public static final int FLAG_FORCE_NOT_FULLSCREEN = 0x00000800; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 757 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 758 | /** Window flag: turn on dithering when compositing this window to |
Jeff Brown | 3cc321e | 2012-07-16 16:04:23 -0700 | [diff] [blame] | 759 | * the screen. |
| 760 | * @deprecated This flag is no longer used. */ |
| 761 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 762 | public static final int FLAG_DITHER = 0x00001000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 763 | |
John Spurlock | 33291d8 | 2013-03-13 14:45:14 -0400 | [diff] [blame] | 764 | /** Window flag: treat the content of the window as secure, preventing |
Jeff Brown | f0681b3 | 2012-10-23 17:35:57 -0700 | [diff] [blame] | 765 | * it from appearing in screenshots or from being viewed on non-secure |
| 766 | * displays. |
| 767 | * |
| 768 | * <p>See {@link android.view.Display#FLAG_SECURE} for more details about |
| 769 | * secure surfaces and secure displays. |
| 770 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 771 | public static final int FLAG_SECURE = 0x00002000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 772 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 773 | /** Window flag: a special mode where the layout parameters are used |
| 774 | * to perform scaling of the surface when it is composited to the |
| 775 | * screen. */ |
| 776 | public static final int FLAG_SCALED = 0x00004000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 777 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 778 | /** Window flag: intended for windows that will often be used when the user is |
| 779 | * holding the screen against their face, it will aggressively filter the event |
| 780 | * stream to prevent unintended presses in this situation that may not be |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 781 | * desired for a particular window, when such an event stream is detected, the |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 782 | * application will receive a CANCEL motion event to indicate this so applications |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 783 | * can handle this accordingly by taking no action on the event |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 784 | * until the finger is released. */ |
| 785 | public static final int FLAG_IGNORE_CHEEK_PRESSES = 0x00008000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 786 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 787 | /** Window flag: a special option only for use in combination with |
| 788 | * {@link #FLAG_LAYOUT_IN_SCREEN}. When requesting layout in the |
| 789 | * screen your window may appear on top of or behind screen decorations |
| 790 | * such as the status bar. By also including this flag, the window |
| 791 | * manager will report the inset rectangle needed to ensure your |
| 792 | * content is not covered by screen decorations. This flag is normally |
| 793 | * set for you by Window as described in {@link Window#setFlags}.*/ |
| 794 | public static final int FLAG_LAYOUT_INSET_DECOR = 0x00010000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 795 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 796 | /** Window flag: invert the state of {@link #FLAG_NOT_FOCUSABLE} with |
| 797 | * respect to how this window interacts with the current method. That |
| 798 | * is, if FLAG_NOT_FOCUSABLE is set and this flag is set, then the |
| 799 | * window will behave as if it needs to interact with the input method |
| 800 | * and thus be placed behind/away from it; if FLAG_NOT_FOCUSABLE is |
| 801 | * not set and this flag is set, then the window will behave as if it |
| 802 | * doesn't need to interact with the input method and can be placed |
| 803 | * to use more space and cover the input method. |
| 804 | */ |
| 805 | public static final int FLAG_ALT_FOCUSABLE_IM = 0x00020000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 806 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 807 | /** Window flag: if you have set {@link #FLAG_NOT_TOUCH_MODAL}, you |
| 808 | * can set this flag to receive a single special MotionEvent with |
| 809 | * the action |
| 810 | * {@link MotionEvent#ACTION_OUTSIDE MotionEvent.ACTION_OUTSIDE} for |
| 811 | * touches that occur outside of your window. Note that you will not |
| 812 | * receive the full down/move/up gesture, only the location of the |
| 813 | * first down as an ACTION_OUTSIDE. |
| 814 | */ |
| 815 | public static final int FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 816 | |
Suchi Amalapurapu | d1a9337 | 2009-05-14 17:54:31 -0700 | [diff] [blame] | 817 | /** Window flag: special flag to let windows be shown when the screen |
| 818 | * is locked. This will let application windows take precedence over |
| 819 | * key guard or any other lock screens. Can be used with |
| 820 | * {@link #FLAG_KEEP_SCREEN_ON} to turn screen on and display windows |
Dianne Hackborn | 9bfb707 | 2009-09-22 11:37:40 -0700 | [diff] [blame] | 821 | * directly before showing the key guard window. Can be used with |
| 822 | * {@link #FLAG_DISMISS_KEYGUARD} to automatically fully dismisss |
| 823 | * non-secure keyguards. This flag only applies to the top-most |
| 824 | * full-screen window. |
Dianne Hackborn | 4c62fc0 | 2009-08-08 20:40:27 -0700 | [diff] [blame] | 825 | */ |
Suchi Amalapurapu | d1a9337 | 2009-05-14 17:54:31 -0700 | [diff] [blame] | 826 | public static final int FLAG_SHOW_WHEN_LOCKED = 0x00080000; |
| 827 | |
Dianne Hackborn | 4c62fc0 | 2009-08-08 20:40:27 -0700 | [diff] [blame] | 828 | /** Window flag: ask that the system wallpaper be shown behind |
| 829 | * your window. The window surface must be translucent to be able |
| 830 | * to actually see the wallpaper behind it; this flag just ensures |
| 831 | * that the wallpaper surface will be there if this window actually |
| 832 | * has translucent regions. |
Dianne Hackborn | 1bf1af6 | 2013-02-25 16:48:53 -0800 | [diff] [blame] | 833 | * |
| 834 | * <p>This flag can be controlled in your theme through the |
| 835 | * {@link android.R.attr#windowShowWallpaper} attribute; this attribute |
| 836 | * is automatically set for you in the standard wallpaper themes |
| 837 | * such as {@link android.R.style#Theme_Wallpaper}, |
| 838 | * {@link android.R.style#Theme_Wallpaper_NoTitleBar}, |
| 839 | * {@link android.R.style#Theme_Wallpaper_NoTitleBar_Fullscreen}, |
| 840 | * {@link android.R.style#Theme_Holo_Wallpaper}, |
| 841 | * {@link android.R.style#Theme_Holo_Wallpaper_NoTitleBar}, |
| 842 | * {@link android.R.style#Theme_DeviceDefault_Wallpaper}, and |
| 843 | * {@link android.R.style#Theme_DeviceDefault_Wallpaper_NoTitleBar}.</p> |
Dianne Hackborn | 4c62fc0 | 2009-08-08 20:40:27 -0700 | [diff] [blame] | 844 | */ |
| 845 | public static final int FLAG_SHOW_WALLPAPER = 0x00100000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 846 | |
Dianne Hackborn | 93e462b | 2009-09-15 22:50:40 -0700 | [diff] [blame] | 847 | /** Window flag: when set as a window is being added or made |
| 848 | * visible, once the window has been shown then the system will |
| 849 | * poke the power manager's user activity (as if the user had woken |
| 850 | * up the device) to turn the screen on. */ |
| 851 | public static final int FLAG_TURN_SCREEN_ON = 0x00200000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 852 | |
Dianne Hackborn | 9bfb707 | 2009-09-22 11:37:40 -0700 | [diff] [blame] | 853 | /** Window flag: when set the window will cause the keyguard to |
| 854 | * be dismissed, only if it is not a secure lock keyguard. Because such |
| 855 | * a keyguard is not needed for security, it will never re-appear if |
| 856 | * the user navigates to another window (in contrast to |
| 857 | * {@link #FLAG_SHOW_WHEN_LOCKED}, which will only temporarily |
| 858 | * hide both secure and non-secure keyguards but ensure they reappear |
| 859 | * when the user moves to another UI that doesn't hide them). |
| 860 | * If the keyguard is currently active and is secure (requires an |
| 861 | * unlock pattern) than the user will still need to confirm it before |
| 862 | * seeing this window, unless {@link #FLAG_SHOW_WHEN_LOCKED} has |
Daniel Sandler | ae069f7 | 2010-06-17 21:56:26 -0400 | [diff] [blame] | 863 | * also been set. |
| 864 | */ |
Dianne Hackborn | 9bfb707 | 2009-09-22 11:37:40 -0700 | [diff] [blame] | 865 | public static final int FLAG_DISMISS_KEYGUARD = 0x00400000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 866 | |
Jeff Brown | 01ce2e9 | 2010-09-26 22:20:12 -0700 | [diff] [blame] | 867 | /** Window flag: when set the window will accept for touch events |
| 868 | * outside of its bounds to be sent to other windows that also |
| 869 | * support split touch. When this flag is not set, the first pointer |
| 870 | * that goes down determines the window to which all subsequent touches |
| 871 | * go until all pointers go up. When this flag is set, each pointer |
| 872 | * (not necessarily the first) that goes down determines the window |
| 873 | * to which all subsequent touches of that pointer will go until that |
| 874 | * pointer goes up thereby enabling touches with multiple pointers |
| 875 | * to be split across multiple windows. |
Dianne Hackborn | d9b3b7e | 2010-11-16 18:22:49 -0800 | [diff] [blame] | 876 | */ |
Jeff Brown | 01ce2e9 | 2010-09-26 22:20:12 -0700 | [diff] [blame] | 877 | public static final int FLAG_SPLIT_TOUCH = 0x00800000; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 878 | |
Dianne Hackborn | d9b3b7e | 2010-11-16 18:22:49 -0800 | [diff] [blame] | 879 | /** |
Romain Guy | 72f0a27 | 2011-01-09 16:01:46 -0800 | [diff] [blame] | 880 | * <p>Indicates whether this window should be hardware accelerated. |
| 881 | * Requesting hardware acceleration does not guarantee it will happen.</p> |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 882 | * |
Romain Guy | 72f0a27 | 2011-01-09 16:01:46 -0800 | [diff] [blame] | 883 | * <p>This flag can be controlled programmatically <em>only</em> to enable |
| 884 | * hardware acceleration. To enable hardware acceleration for a given |
| 885 | * window programmatically, do the following:</p> |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 886 | * |
Romain Guy | 72f0a27 | 2011-01-09 16:01:46 -0800 | [diff] [blame] | 887 | * <pre> |
| 888 | * Window w = activity.getWindow(); // in Activity's onCreate() for instance |
| 889 | * w.setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, |
| 890 | * WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); |
| 891 | * </pre> |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 892 | * |
Romain Guy | 72f0a27 | 2011-01-09 16:01:46 -0800 | [diff] [blame] | 893 | * <p>It is important to remember that this flag <strong>must</strong> |
| 894 | * be set before setting the content view of your activity or dialog.</p> |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 895 | * |
Romain Guy | 72f0a27 | 2011-01-09 16:01:46 -0800 | [diff] [blame] | 896 | * <p>This flag cannot be used to disable hardware acceleration after it |
| 897 | * was enabled in your manifest using |
| 898 | * {@link android.R.attr#hardwareAccelerated}. If you need to selectively |
| 899 | * and programmatically disable hardware acceleration (for automated testing |
| 900 | * for instance), make sure it is turned off in your manifest and enable it |
| 901 | * on your activity or dialog when you need it instead, using the method |
| 902 | * described above.</p> |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 903 | * |
Romain Guy | 72f0a27 | 2011-01-09 16:01:46 -0800 | [diff] [blame] | 904 | * <p>This flag is automatically set by the system if the |
| 905 | * {@link android.R.attr#hardwareAccelerated android:hardwareAccelerated} |
| 906 | * XML attribute is set to true on an activity or on the application.</p> |
Dianne Hackborn | d9b3b7e | 2010-11-16 18:22:49 -0800 | [diff] [blame] | 907 | */ |
| 908 | public static final int FLAG_HARDWARE_ACCELERATED = 0x01000000; |
Daniel Sandler | 611fae4 | 2010-06-17 10:45:00 -0400 | [diff] [blame] | 909 | |
Dianne Hackborn | 1bf1af6 | 2013-02-25 16:48:53 -0800 | [diff] [blame] | 910 | /** |
| 911 | * Window flag: allow window contents to extend in to the screen's |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 912 | * overscan area, if there is one. The window should still correctly |
| 913 | * position its contents to take the overscan area into account. |
Dianne Hackborn | 1bf1af6 | 2013-02-25 16:48:53 -0800 | [diff] [blame] | 914 | * |
| 915 | * <p>This flag can be controlled in your theme through the |
| 916 | * {@link android.R.attr#windowOverscan} attribute; this attribute |
| 917 | * is automatically set for you in the standard overscan themes |
Ying Wang | 4e0eb22 | 2013-04-18 20:39:48 -0700 | [diff] [blame] | 918 | * such as |
Dianne Hackborn | 1bf1af6 | 2013-02-25 16:48:53 -0800 | [diff] [blame] | 919 | * {@link android.R.style#Theme_Holo_NoActionBar_Overscan}, |
| 920 | * {@link android.R.style#Theme_Holo_Light_NoActionBar_Overscan}, |
| 921 | * {@link android.R.style#Theme_DeviceDefault_NoActionBar_Overscan}, and |
| 922 | * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_Overscan}.</p> |
| 923 | * |
| 924 | * <p>When this flag is enabled for a window, its normal content may be obscured |
| 925 | * to some degree by the overscan region of the display. To ensure key parts of |
| 926 | * that content are visible to the user, you can use |
| 927 | * {@link View#setFitsSystemWindows(boolean) View.setFitsSystemWindows(boolean)} |
| 928 | * to set the point in the view hierarchy where the appropriate offsets should |
| 929 | * be applied. (This can be done either by directly calling this function, using |
| 930 | * the {@link android.R.attr#fitsSystemWindows} attribute in your view hierarchy, |
| 931 | * or implementing you own {@link View#fitSystemWindows(android.graphics.Rect) |
| 932 | * View.fitSystemWindows(Rect)} method).</p> |
| 933 | * |
| 934 | * <p>This mechanism for positioning content elements is identical to its equivalent |
| 935 | * use with layout and {@link View#setSystemUiVisibility(int) |
| 936 | * View.setSystemUiVisibility(int)}; here is an example layout that will correctly |
| 937 | * position its UI elements with this overscan flag is set:</p> |
| 938 | * |
| 939 | * {@sample development/samples/ApiDemos/res/layout/overscan_activity.xml complete} |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 940 | */ |
| 941 | public static final int FLAG_LAYOUT_IN_OVERSCAN = 0x02000000; |
| 942 | |
John Spurlock | bd95740 | 2013-10-03 11:38:39 -0400 | [diff] [blame] | 943 | /** |
| 944 | * Window flag: request a translucent status bar with minimal system-provided |
| 945 | * background protection. |
| 946 | * |
| 947 | * <p>This flag can be controlled in your theme through the |
| 948 | * {@link android.R.attr#windowTranslucentStatus} attribute; this attribute |
| 949 | * is automatically set for you in the standard translucent decor themes |
| 950 | * such as |
| 951 | * {@link android.R.style#Theme_Holo_NoActionBar_TranslucentDecor}, |
| 952 | * {@link android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor}, |
| 953 | * {@link android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor}, and |
| 954 | * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor}.</p> |
| 955 | * |
| 956 | * <p>When this flag is enabled for a window, it automatically sets |
| 957 | * the system UI visibility flags {@link View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and |
| 958 | * {@link View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}.</p> |
| 959 | */ |
| 960 | public static final int FLAG_TRANSLUCENT_STATUS = 0x04000000; |
| 961 | |
| 962 | /** |
| 963 | * Window flag: request a translucent navigation bar with minimal system-provided |
| 964 | * background protection. |
| 965 | * |
| 966 | * <p>This flag can be controlled in your theme through the |
| 967 | * {@link android.R.attr#windowTranslucentNavigation} attribute; this attribute |
| 968 | * is automatically set for you in the standard translucent decor themes |
| 969 | * such as |
| 970 | * {@link android.R.style#Theme_Holo_NoActionBar_TranslucentDecor}, |
| 971 | * {@link android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor}, |
| 972 | * {@link android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor}, and |
| 973 | * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor}.</p> |
| 974 | * |
| 975 | * <p>When this flag is enabled for a window, it automatically sets |
| 976 | * the system UI visibility flags {@link View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and |
| 977 | * {@link View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}.</p> |
| 978 | */ |
| 979 | public static final int FLAG_TRANSLUCENT_NAVIGATION = 0x08000000; |
| 980 | |
Adam Lesinski | 6a591f5 | 2013-10-01 18:11:17 -0700 | [diff] [blame] | 981 | /** |
| 982 | * Flag for a window in local focus mode. |
| 983 | * Window in local focus mode can control focus independent of window manager using |
| 984 | * {@link Window#setLocalFocus(boolean, boolean)}. |
| 985 | * Usually window in this mode will not get touch/key events from window manager, but will |
| 986 | * get events only via local injection using {@link Window#injectInputEvent(InputEvent)}. |
| 987 | */ |
| 988 | public static final int FLAG_LOCAL_FOCUS_MODE = 0x10000000; |
| 989 | |
Jeff Brown | 98db5fa | 2011-06-08 15:37:10 -0700 | [diff] [blame] | 990 | /** Window flag: Enable touches to slide out of a window into neighboring |
| 991 | * windows in mid-gesture instead of being captured for the duration of |
| 992 | * the gesture. |
| 993 | * |
| 994 | * This flag changes the behavior of touch focus for this window only. |
| 995 | * Touches can slide out of the window but they cannot necessarily slide |
| 996 | * back in (unless the other window with touch focus permits it). |
| 997 | * |
| 998 | * {@hide} |
| 999 | */ |
Adam Lesinski | 6a591f5 | 2013-10-01 18:11:17 -0700 | [diff] [blame] | 1000 | public static final int FLAG_SLIPPERY = 0x20000000; |
Jeff Brown | 98db5fa | 2011-06-08 15:37:10 -0700 | [diff] [blame] | 1001 | |
Daniel Sandler | e02d808 | 2010-10-08 15:13:22 -0400 | [diff] [blame] | 1002 | /** |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1003 | * Window flag: When requesting layout with an attached window, the attached window may |
| 1004 | * overlap with the screen decorations of the parent window such as the navigation bar. By |
| 1005 | * including this flag, the window manager will layout the attached window within the decor |
| 1006 | * frame of the parent window such that it doesn't overlap with screen decorations. |
Daniel Sandler | e02d808 | 2010-10-08 15:13:22 -0400 | [diff] [blame] | 1007 | */ |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1008 | public static final int FLAG_LAYOUT_ATTACHED_IN_DECOR = 0x40000000; |
Daniel Sandler | e02d808 | 2010-10-08 15:13:22 -0400 | [diff] [blame] | 1009 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1010 | /** |
Adrian Roos | 217ccd2 | 2014-05-09 14:29:04 +0200 | [diff] [blame] | 1011 | * Flag indicating that this Window is responsible for drawing the background for the |
| 1012 | * system bars. If set, the system bars are drawn with a transparent background and the |
| 1013 | * corresponding areas in this window are filled with the colors specified in |
| 1014 | * {@link Window#getStatusBarColor()} and {@link Window#getNavigationBarColor()}. |
| 1015 | */ |
| 1016 | public static final int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS = 0x80000000; |
| 1017 | |
| 1018 | /** |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1019 | * Various behavioral options/flags. Default is none. |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1020 | * |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1021 | * @see #FLAG_ALLOW_LOCK_WHILE_SCREEN_ON |
| 1022 | * @see #FLAG_DIM_BEHIND |
| 1023 | * @see #FLAG_NOT_FOCUSABLE |
| 1024 | * @see #FLAG_NOT_TOUCHABLE |
| 1025 | * @see #FLAG_NOT_TOUCH_MODAL |
| 1026 | * @see #FLAG_TOUCHABLE_WHEN_WAKING |
| 1027 | * @see #FLAG_KEEP_SCREEN_ON |
| 1028 | * @see #FLAG_LAYOUT_IN_SCREEN |
| 1029 | * @see #FLAG_LAYOUT_NO_LIMITS |
| 1030 | * @see #FLAG_FULLSCREEN |
| 1031 | * @see #FLAG_FORCE_NOT_FULLSCREEN |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1032 | * @see #FLAG_SECURE |
| 1033 | * @see #FLAG_SCALED |
| 1034 | * @see #FLAG_IGNORE_CHEEK_PRESSES |
| 1035 | * @see #FLAG_LAYOUT_INSET_DECOR |
| 1036 | * @see #FLAG_ALT_FOCUSABLE_IM |
| 1037 | * @see #FLAG_WATCH_OUTSIDE_TOUCH |
| 1038 | * @see #FLAG_SHOW_WHEN_LOCKED |
| 1039 | * @see #FLAG_SHOW_WALLPAPER |
| 1040 | * @see #FLAG_TURN_SCREEN_ON |
| 1041 | * @see #FLAG_DISMISS_KEYGUARD |
| 1042 | * @see #FLAG_SPLIT_TOUCH |
| 1043 | * @see #FLAG_HARDWARE_ACCELERATED |
keunyoung | 30f420f | 2013-08-02 14:23:10 -0700 | [diff] [blame] | 1044 | * @see #FLAG_LOCAL_FOCUS_MODE |
Adrian Roos | 217ccd2 | 2014-05-09 14:29:04 +0200 | [diff] [blame] | 1045 | * @see #FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1046 | */ |
| 1047 | @ViewDebug.ExportedProperty(flagMapping = { |
| 1048 | @ViewDebug.FlagToString(mask = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, equals = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, |
| 1049 | name = "FLAG_ALLOW_LOCK_WHILE_SCREEN_ON"), |
| 1050 | @ViewDebug.FlagToString(mask = FLAG_DIM_BEHIND, equals = FLAG_DIM_BEHIND, |
| 1051 | name = "FLAG_DIM_BEHIND"), |
| 1052 | @ViewDebug.FlagToString(mask = FLAG_BLUR_BEHIND, equals = FLAG_BLUR_BEHIND, |
| 1053 | name = "FLAG_BLUR_BEHIND"), |
| 1054 | @ViewDebug.FlagToString(mask = FLAG_NOT_FOCUSABLE, equals = FLAG_NOT_FOCUSABLE, |
| 1055 | name = "FLAG_NOT_FOCUSABLE"), |
| 1056 | @ViewDebug.FlagToString(mask = FLAG_NOT_TOUCHABLE, equals = FLAG_NOT_TOUCHABLE, |
| 1057 | name = "FLAG_NOT_TOUCHABLE"), |
| 1058 | @ViewDebug.FlagToString(mask = FLAG_NOT_TOUCH_MODAL, equals = FLAG_NOT_TOUCH_MODAL, |
| 1059 | name = "FLAG_NOT_TOUCH_MODAL"), |
| 1060 | @ViewDebug.FlagToString(mask = FLAG_TOUCHABLE_WHEN_WAKING, equals = FLAG_TOUCHABLE_WHEN_WAKING, |
| 1061 | name = "FLAG_TOUCHABLE_WHEN_WAKING"), |
| 1062 | @ViewDebug.FlagToString(mask = FLAG_KEEP_SCREEN_ON, equals = FLAG_KEEP_SCREEN_ON, |
| 1063 | name = "FLAG_KEEP_SCREEN_ON"), |
| 1064 | @ViewDebug.FlagToString(mask = FLAG_LAYOUT_IN_SCREEN, equals = FLAG_LAYOUT_IN_SCREEN, |
| 1065 | name = "FLAG_LAYOUT_IN_SCREEN"), |
| 1066 | @ViewDebug.FlagToString(mask = FLAG_LAYOUT_NO_LIMITS, equals = FLAG_LAYOUT_NO_LIMITS, |
| 1067 | name = "FLAG_LAYOUT_NO_LIMITS"), |
| 1068 | @ViewDebug.FlagToString(mask = FLAG_FULLSCREEN, equals = FLAG_FULLSCREEN, |
| 1069 | name = "FLAG_FULLSCREEN"), |
| 1070 | @ViewDebug.FlagToString(mask = FLAG_FORCE_NOT_FULLSCREEN, equals = FLAG_FORCE_NOT_FULLSCREEN, |
| 1071 | name = "FLAG_FORCE_NOT_FULLSCREEN"), |
| 1072 | @ViewDebug.FlagToString(mask = FLAG_DITHER, equals = FLAG_DITHER, |
| 1073 | name = "FLAG_DITHER"), |
| 1074 | @ViewDebug.FlagToString(mask = FLAG_SECURE, equals = FLAG_SECURE, |
| 1075 | name = "FLAG_SECURE"), |
| 1076 | @ViewDebug.FlagToString(mask = FLAG_SCALED, equals = FLAG_SCALED, |
| 1077 | name = "FLAG_SCALED"), |
| 1078 | @ViewDebug.FlagToString(mask = FLAG_IGNORE_CHEEK_PRESSES, equals = FLAG_IGNORE_CHEEK_PRESSES, |
| 1079 | name = "FLAG_IGNORE_CHEEK_PRESSES"), |
| 1080 | @ViewDebug.FlagToString(mask = FLAG_LAYOUT_INSET_DECOR, equals = FLAG_LAYOUT_INSET_DECOR, |
| 1081 | name = "FLAG_LAYOUT_INSET_DECOR"), |
| 1082 | @ViewDebug.FlagToString(mask = FLAG_ALT_FOCUSABLE_IM, equals = FLAG_ALT_FOCUSABLE_IM, |
| 1083 | name = "FLAG_ALT_FOCUSABLE_IM"), |
| 1084 | @ViewDebug.FlagToString(mask = FLAG_WATCH_OUTSIDE_TOUCH, equals = FLAG_WATCH_OUTSIDE_TOUCH, |
| 1085 | name = "FLAG_WATCH_OUTSIDE_TOUCH"), |
| 1086 | @ViewDebug.FlagToString(mask = FLAG_SHOW_WHEN_LOCKED, equals = FLAG_SHOW_WHEN_LOCKED, |
| 1087 | name = "FLAG_SHOW_WHEN_LOCKED"), |
| 1088 | @ViewDebug.FlagToString(mask = FLAG_SHOW_WALLPAPER, equals = FLAG_SHOW_WALLPAPER, |
| 1089 | name = "FLAG_SHOW_WALLPAPER"), |
| 1090 | @ViewDebug.FlagToString(mask = FLAG_TURN_SCREEN_ON, equals = FLAG_TURN_SCREEN_ON, |
| 1091 | name = "FLAG_TURN_SCREEN_ON"), |
| 1092 | @ViewDebug.FlagToString(mask = FLAG_DISMISS_KEYGUARD, equals = FLAG_DISMISS_KEYGUARD, |
| 1093 | name = "FLAG_DISMISS_KEYGUARD"), |
| 1094 | @ViewDebug.FlagToString(mask = FLAG_SPLIT_TOUCH, equals = FLAG_SPLIT_TOUCH, |
| 1095 | name = "FLAG_SPLIT_TOUCH"), |
| 1096 | @ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, equals = FLAG_HARDWARE_ACCELERATED, |
keunyoung | 30f420f | 2013-08-02 14:23:10 -0700 | [diff] [blame] | 1097 | name = "FLAG_HARDWARE_ACCELERATED"), |
| 1098 | @ViewDebug.FlagToString(mask = FLAG_LOCAL_FOCUS_MODE, equals = FLAG_LOCAL_FOCUS_MODE, |
John Spurlock | bd95740 | 2013-10-03 11:38:39 -0400 | [diff] [blame] | 1099 | name = "FLAG_LOCAL_FOCUS_MODE"), |
| 1100 | @ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_STATUS, equals = FLAG_TRANSLUCENT_STATUS, |
| 1101 | name = "FLAG_TRANSLUCENT_STATUS"), |
| 1102 | @ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_NAVIGATION, equals = FLAG_TRANSLUCENT_NAVIGATION, |
Adrian Roos | 217ccd2 | 2014-05-09 14:29:04 +0200 | [diff] [blame] | 1103 | name = "FLAG_TRANSLUCENT_NAVIGATION"), |
| 1104 | @ViewDebug.FlagToString(mask = FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, equals = FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, |
| 1105 | name = "FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS") |
Jon Miranda | 4597e98 | 2014-07-29 07:25:49 -0700 | [diff] [blame] | 1106 | }, formatToHexString = true) |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1107 | public int flags; |
| 1108 | |
| 1109 | /** |
John Reck | 61375a8 | 2014-09-18 19:27:48 +0000 | [diff] [blame] | 1110 | * If the window has requested hardware acceleration, but this is not |
| 1111 | * allowed in the process it is in, then still render it as if it is |
| 1112 | * hardware accelerated. This is used for the starting preview windows |
| 1113 | * in the system process, which don't need to have the overhead of |
| 1114 | * hardware acceleration (they are just a static rendering), but should |
| 1115 | * be rendered as such to match the actual window of the app even if it |
| 1116 | * is hardware accelerated. |
| 1117 | * Even if the window isn't hardware accelerated, still do its rendering |
| 1118 | * as if it was. |
| 1119 | * Like {@link #FLAG_HARDWARE_ACCELERATED} except for trusted system windows |
| 1120 | * that need hardware acceleration (e.g. LockScreen), where hardware acceleration |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1121 | * is generally disabled. This flag must be specified in addition to |
John Reck | 61375a8 | 2014-09-18 19:27:48 +0000 | [diff] [blame] | 1122 | * {@link #FLAG_HARDWARE_ACCELERATED} to enable hardware acceleration for system |
| 1123 | * windows. |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1124 | * |
John Reck | 61375a8 | 2014-09-18 19:27:48 +0000 | [diff] [blame] | 1125 | * @hide |
| 1126 | */ |
| 1127 | public static final int PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED = 0x00000001; |
| 1128 | |
| 1129 | /** |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1130 | * In the system process, we globally do not use hardware acceleration |
Ken Wakasa | f76a50c | 2012-03-09 19:56:35 +0900 | [diff] [blame] | 1131 | * because there are many threads doing UI there and they conflict. |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1132 | * If certain parts of the UI that really do want to use hardware |
| 1133 | * acceleration, this flag can be set to force it. This is basically |
| 1134 | * for the lock screen. Anyone else using it, you are probably wrong. |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1135 | * |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1136 | * @hide |
| 1137 | */ |
| 1138 | public static final int PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED = 0x00000002; |
| 1139 | |
| 1140 | /** |
Chet Haase | a8e5a2b | 2011-10-28 13:18:16 -0700 | [diff] [blame] | 1141 | * By default, wallpapers are sent new offsets when the wallpaper is scrolled. Wallpapers |
Ken Wakasa | f76a50c | 2012-03-09 19:56:35 +0900 | [diff] [blame] | 1142 | * may elect to skip these notifications if they are not doing anything productive with |
Chet Haase | a8e5a2b | 2011-10-28 13:18:16 -0700 | [diff] [blame] | 1143 | * them (they do not affect the wallpaper scrolling operation) by calling |
| 1144 | * {@link |
| 1145 | * android.service.wallpaper.WallpaperService.Engine#setOffsetNotificationsEnabled(boolean)}. |
| 1146 | * |
| 1147 | * @hide |
| 1148 | */ |
| 1149 | public static final int PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS = 0x00000004; |
| 1150 | |
Craig Mautner | 88400d3 | 2012-09-30 12:35:45 -0700 | [diff] [blame] | 1151 | /** In a multiuser system if this flag is set and the owner is a system process then this |
| 1152 | * window will appear on all user screens. This overrides the default behavior of window |
| 1153 | * types that normally only appear on the owning user's screen. Refer to each window type |
| 1154 | * to determine its default behavior. |
| 1155 | * |
| 1156 | * {@hide} */ |
| 1157 | public static final int PRIVATE_FLAG_SHOW_FOR_ALL_USERS = 0x00000010; |
| 1158 | |
Dianne Hackborn | 73ab6a4 | 2011-12-13 11:16:23 -0800 | [diff] [blame] | 1159 | /** |
Dianne Hackborn | 1c5383c | 2013-04-15 15:07:21 -0700 | [diff] [blame] | 1160 | * Never animate position changes of the window. |
| 1161 | * |
| 1162 | * {@hide} */ |
| 1163 | public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040; |
| 1164 | |
Adam Lesinski | 6a591f5 | 2013-10-01 18:11:17 -0700 | [diff] [blame] | 1165 | /** Window flag: special flag to limit the size of the window to be |
| 1166 | * original size ([320x480] x density). Used to create window for applications |
| 1167 | * running under compatibility mode. |
| 1168 | * |
| 1169 | * {@hide} */ |
| 1170 | public static final int PRIVATE_FLAG_COMPATIBLE_WINDOW = 0x00000080; |
| 1171 | |
| 1172 | /** Window flag: a special option intended for system dialogs. When |
| 1173 | * this flag is set, the window will demand focus unconditionally when |
| 1174 | * it is created. |
| 1175 | * {@hide} */ |
| 1176 | public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; |
| 1177 | |
John Spurlock | 3f7cd51 | 2013-10-07 12:25:09 -0400 | [diff] [blame] | 1178 | /** Window flag: maintain the previous translucent decor state when this window |
John Spurlock | bd95740 | 2013-10-03 11:38:39 -0400 | [diff] [blame] | 1179 | * becomes top-most. |
| 1180 | * {@hide} */ |
| 1181 | public static final int PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR = 0x00000200; |
| 1182 | |
Dianne Hackborn | 1c5383c | 2013-04-15 15:07:21 -0700 | [diff] [blame] | 1183 | /** |
Jorim Jaggi | 380ecb8 | 2014-03-14 17:25:20 +0100 | [diff] [blame] | 1184 | * Flag whether the current window is a keyguard window, meaning that it will hide all other |
| 1185 | * windows behind it except for windows with flag {@link #FLAG_SHOW_WHEN_LOCKED} set. |
| 1186 | * Further, this can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. |
| 1187 | * {@hide} |
| 1188 | */ |
| 1189 | public static final int PRIVATE_FLAG_KEYGUARD = 0x00000400; |
| 1190 | |
| 1191 | /** |
Filip Gruszczynski | b8c0694 | 2014-12-04 15:02:18 -0800 | [diff] [blame] | 1192 | * Flag that prevents the wallpaper behind the current window from receiving touch events. |
| 1193 | * |
| 1194 | * {@hide} |
| 1195 | */ |
| 1196 | public static final int PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS = 0x00000800; |
| 1197 | |
| 1198 | /** |
Selim Cinek | 4a4a2bddc | 2015-05-07 12:50:19 -0700 | [diff] [blame] | 1199 | * Flag to force the status bar window to be visible all the time. If the bar is hidden when |
| 1200 | * this flag is set it will be shown again and the bar will have a transparent background. |
| 1201 | * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. |
| 1202 | * |
| 1203 | * {@hide} |
| 1204 | */ |
| 1205 | public static final int PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT = 0x00001000; |
| 1206 | |
| 1207 | /** |
Robert Carr | 64aadd0 | 2015-11-06 13:54:20 -0800 | [diff] [blame] | 1208 | * Flag indicating that the x, y, width, and height members should be |
Filip Gruszczynski | 1a4dfe5 | 2015-11-15 10:58:57 -0800 | [diff] [blame] | 1209 | * ignored (and thus their previous value preserved). For example |
Robert Carr | 64aadd0 | 2015-11-06 13:54:20 -0800 | [diff] [blame] | 1210 | * because they are being managed externally through repositionChild. |
| 1211 | * |
| 1212 | * {@hide} |
| 1213 | */ |
| 1214 | public static final int PRIVATE_FLAG_PRESERVE_GEOMETRY = 0x00002000; |
| 1215 | |
Filip Gruszczynski | 1a4dfe5 | 2015-11-15 10:58:57 -0800 | [diff] [blame] | 1216 | /** |
| 1217 | * Flag that will make window ignore app visibility and instead depend purely on the decor |
| 1218 | * view visibility for determining window visibility. This is used by recents to keep |
| 1219 | * drawing after it launches an app. |
| 1220 | * @hide |
| 1221 | */ |
| 1222 | public static final int PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY = 0x00004000; |
| 1223 | |
Robert Carr | a1eb439 | 2015-12-10 12:43:51 -0800 | [diff] [blame] | 1224 | /** |
| 1225 | * Flag to indicate that this window is not expected to be replaced across |
| 1226 | * configuration change triggered activity relaunches. In general the WindowManager |
| 1227 | * expects Windows to be replaced after relaunch, and thus it will preserve their surfaces |
| 1228 | * until the replacement is ready to show in order to prevent visual glitch. However |
| 1229 | * some windows, such as PopupWindows expect to be cleared across configuration change, |
| 1230 | * and thus should hint to the WindowManager that it should not wait for a replacement. |
| 1231 | * @hide |
| 1232 | */ |
| 1233 | public static final int PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH = 0x00008000; |
Robert Carr | 64aadd0 | 2015-11-06 13:54:20 -0800 | [diff] [blame] | 1234 | |
| 1235 | /** |
Wale Ogunwale | 8216eb2 | 2015-12-18 10:42:42 -0800 | [diff] [blame] | 1236 | * Flag to indicate that this child window should always be laid-out in the parent |
| 1237 | * frame regardless of the current windowing mode configuration. |
| 1238 | * @hide |
| 1239 | */ |
| 1240 | public static final int PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME = 0x00010000; |
| 1241 | |
| 1242 | /** |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1243 | * Control flags that are private to the platform. |
| 1244 | * @hide |
| 1245 | */ |
| 1246 | public int privateFlags; |
| 1247 | |
| 1248 | /** |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1249 | * Value for {@link #needsMenuKey} for a window that has not explicitly specified if it |
| 1250 | * needs {@link #NEEDS_MENU_SET_TRUE} or doesn't need {@link #NEEDS_MENU_SET_FALSE} a menu |
| 1251 | * key. For this case, we should look at windows behind it to determine the appropriate |
| 1252 | * value. |
| 1253 | * |
| 1254 | * @hide |
| 1255 | */ |
| 1256 | public static final int NEEDS_MENU_UNSET = 0; |
| 1257 | |
| 1258 | /** |
| 1259 | * Value for {@link #needsMenuKey} for a window that has explicitly specified it needs a |
| 1260 | * menu key. |
| 1261 | * |
| 1262 | * @hide |
| 1263 | */ |
| 1264 | public static final int NEEDS_MENU_SET_TRUE = 1; |
| 1265 | |
| 1266 | /** |
| 1267 | * Value for {@link #needsMenuKey} for a window that has explicitly specified it doesn't |
| 1268 | * needs a menu key. |
| 1269 | * |
| 1270 | * @hide |
| 1271 | */ |
| 1272 | public static final int NEEDS_MENU_SET_FALSE = 2; |
| 1273 | |
| 1274 | /** |
| 1275 | * State variable for a window belonging to an activity that responds to |
| 1276 | * {@link KeyEvent#KEYCODE_MENU} and therefore needs a Menu key. For devices where Menu is a |
| 1277 | * physical button this variable is ignored, but on devices where the Menu key is drawn in |
| 1278 | * software it may be hidden unless this variable is set to {@link #NEEDS_MENU_SET_TRUE}. |
| 1279 | * |
| 1280 | * (Note that Action Bars, when available, are the preferred way to offer additional |
| 1281 | * functions otherwise accessed via an options menu.) |
| 1282 | * |
| 1283 | * {@hide} |
| 1284 | */ |
| 1285 | public int needsMenuKey = NEEDS_MENU_UNSET; |
| 1286 | |
| 1287 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1288 | * Given a particular set of window manager flags, determine whether |
| 1289 | * such a window may be a target for an input method when it has |
| 1290 | * focus. In particular, this checks the |
| 1291 | * {@link #FLAG_NOT_FOCUSABLE} and {@link #FLAG_ALT_FOCUSABLE_IM} |
| 1292 | * flags and returns true if the combination of the two corresponds |
| 1293 | * to a window that needs to be behind the input method so that the |
| 1294 | * user can type into it. |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1295 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1296 | * @param flags The current window manager flags. |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1297 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1298 | * @return Returns true if such a window should be behind/interact |
| 1299 | * with an input method, false if not. |
| 1300 | */ |
| 1301 | public static boolean mayUseInputMethod(int flags) { |
| 1302 | switch (flags&(FLAG_NOT_FOCUSABLE|FLAG_ALT_FOCUSABLE_IM)) { |
| 1303 | case 0: |
| 1304 | case FLAG_NOT_FOCUSABLE|FLAG_ALT_FOCUSABLE_IM: |
| 1305 | return true; |
| 1306 | } |
| 1307 | return false; |
| 1308 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1309 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1310 | /** |
| 1311 | * Mask for {@link #softInputMode} of the bits that determine the |
| 1312 | * desired visibility state of the soft input area for this window. |
| 1313 | */ |
| 1314 | public static final int SOFT_INPUT_MASK_STATE = 0x0f; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1315 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1316 | /** |
| 1317 | * Visibility state for {@link #softInputMode}: no state has been specified. |
| 1318 | */ |
| 1319 | public static final int SOFT_INPUT_STATE_UNSPECIFIED = 0; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1320 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1321 | /** |
| 1322 | * Visibility state for {@link #softInputMode}: please don't change the state of |
| 1323 | * the soft input area. |
| 1324 | */ |
| 1325 | public static final int SOFT_INPUT_STATE_UNCHANGED = 1; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1326 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1327 | /** |
| 1328 | * Visibility state for {@link #softInputMode}: please hide any soft input |
| 1329 | * area when normally appropriate (when the user is navigating |
| 1330 | * forward to your window). |
| 1331 | */ |
| 1332 | public static final int SOFT_INPUT_STATE_HIDDEN = 2; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1333 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1334 | /** |
| 1335 | * Visibility state for {@link #softInputMode}: please always hide any |
| 1336 | * soft input area when this window receives focus. |
| 1337 | */ |
| 1338 | public static final int SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1339 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1340 | /** |
| 1341 | * Visibility state for {@link #softInputMode}: please show the soft |
| 1342 | * input area when normally appropriate (when the user is navigating |
| 1343 | * forward to your window). |
| 1344 | */ |
| 1345 | public static final int SOFT_INPUT_STATE_VISIBLE = 4; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1346 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1347 | /** |
| 1348 | * Visibility state for {@link #softInputMode}: please always make the |
| 1349 | * soft input area visible when this window receives input focus. |
| 1350 | */ |
| 1351 | public static final int SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1352 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1353 | /** |
| 1354 | * Mask for {@link #softInputMode} of the bits that determine the |
| 1355 | * way that the window should be adjusted to accommodate the soft |
| 1356 | * input window. |
| 1357 | */ |
| 1358 | public static final int SOFT_INPUT_MASK_ADJUST = 0xf0; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1359 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1360 | /** Adjustment option for {@link #softInputMode}: nothing specified. |
| 1361 | * The system will try to pick one or |
| 1362 | * the other depending on the contents of the window. |
| 1363 | */ |
| 1364 | public static final int SOFT_INPUT_ADJUST_UNSPECIFIED = 0x00; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1365 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1366 | /** Adjustment option for {@link #softInputMode}: set to allow the |
| 1367 | * window to be resized when an input |
| 1368 | * method is shown, so that its contents are not covered by the input |
Scott Main | f10e633 | 2010-06-11 09:03:22 -0700 | [diff] [blame] | 1369 | * method. This can <em>not</em> be combined with |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1370 | * {@link #SOFT_INPUT_ADJUST_PAN}; if |
| 1371 | * neither of these are set, then the system will try to pick one or |
Chet Haase | 45c89c2 | 2013-04-29 16:04:40 -0700 | [diff] [blame] | 1372 | * the other depending on the contents of the window. If the window's |
| 1373 | * layout parameter flags include {@link #FLAG_FULLSCREEN}, this |
| 1374 | * value for {@link #softInputMode} will be ignored; the window will |
| 1375 | * not resize, but will stay fullscreen. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1376 | */ |
| 1377 | public static final int SOFT_INPUT_ADJUST_RESIZE = 0x10; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1378 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1379 | /** Adjustment option for {@link #softInputMode}: set to have a window |
| 1380 | * pan when an input method is |
| 1381 | * shown, so it doesn't need to deal with resizing but just panned |
| 1382 | * by the framework to ensure the current input focus is visible. This |
Scott Main | f10e633 | 2010-06-11 09:03:22 -0700 | [diff] [blame] | 1383 | * can <em>not</em> be combined with {@link #SOFT_INPUT_ADJUST_RESIZE}; if |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1384 | * neither of these are set, then the system will try to pick one or |
| 1385 | * the other depending on the contents of the window. |
| 1386 | */ |
| 1387 | public static final int SOFT_INPUT_ADJUST_PAN = 0x20; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1388 | |
Dianne Hackborn | dea3ef7 | 2010-10-28 14:24:22 -0700 | [diff] [blame] | 1389 | /** Adjustment option for {@link #softInputMode}: set to have a window |
| 1390 | * not adjust for a shown input method. The window will not be resized, |
| 1391 | * and it will not be panned to make its focus visible. |
| 1392 | */ |
| 1393 | public static final int SOFT_INPUT_ADJUST_NOTHING = 0x30; |
| 1394 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1395 | /** |
| 1396 | * Bit for {@link #softInputMode}: set when the user has navigated |
| 1397 | * forward to the window. This is normally set automatically for |
| 1398 | * you by the system, though you may want to set it in certain cases |
| 1399 | * when you are displaying a window yourself. This flag will always |
| 1400 | * be cleared automatically after the window is displayed. |
| 1401 | */ |
| 1402 | public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION = 0x100; |
Mike Lockwood | fb73f79 | 2009-11-20 11:31:18 -0500 | [diff] [blame] | 1403 | |
| 1404 | /** |
Gilles Debunne | be2c4f9 | 2011-01-17 15:14:32 -0800 | [diff] [blame] | 1405 | * Desired operating mode for any soft input area. May be any combination |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1406 | * of: |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1407 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1408 | * <ul> |
| 1409 | * <li> One of the visibility states |
| 1410 | * {@link #SOFT_INPUT_STATE_UNSPECIFIED}, {@link #SOFT_INPUT_STATE_UNCHANGED}, |
| 1411 | * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}, or |
| 1412 | * {@link #SOFT_INPUT_STATE_VISIBLE}. |
| 1413 | * <li> One of the adjustment options |
| 1414 | * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED}, |
| 1415 | * {@link #SOFT_INPUT_ADJUST_RESIZE}, or |
| 1416 | * {@link #SOFT_INPUT_ADJUST_PAN}. |
Dianne Hackborn | 1bf1af6 | 2013-02-25 16:48:53 -0800 | [diff] [blame] | 1417 | * </ul> |
| 1418 | * |
| 1419 | * |
| 1420 | * <p>This flag can be controlled in your theme through the |
| 1421 | * {@link android.R.attr#windowSoftInputMode} attribute.</p> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1422 | */ |
| 1423 | public int softInputMode; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1424 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1425 | /** |
Dianne Hackborn | 8eb2e24 | 2010-11-01 12:31:24 -0700 | [diff] [blame] | 1426 | * Placement of window within the screen as per {@link Gravity}. Both |
| 1427 | * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int, |
| 1428 | * android.graphics.Rect) Gravity.apply} and |
| 1429 | * {@link Gravity#applyDisplay(int, android.graphics.Rect, android.graphics.Rect) |
| 1430 | * Gravity.applyDisplay} are used during window layout, with this value |
| 1431 | * given as the desired gravity. For example you can specify |
| 1432 | * {@link Gravity#DISPLAY_CLIP_HORIZONTAL Gravity.DISPLAY_CLIP_HORIZONTAL} and |
| 1433 | * {@link Gravity#DISPLAY_CLIP_VERTICAL Gravity.DISPLAY_CLIP_VERTICAL} here |
| 1434 | * to control the behavior of |
| 1435 | * {@link Gravity#applyDisplay(int, android.graphics.Rect, android.graphics.Rect) |
| 1436 | * Gravity.applyDisplay}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1437 | * |
| 1438 | * @see Gravity |
| 1439 | */ |
| 1440 | public int gravity; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1441 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1442 | /** |
| 1443 | * The horizontal margin, as a percentage of the container's width, |
Dianne Hackborn | 8eb2e24 | 2010-11-01 12:31:24 -0700 | [diff] [blame] | 1444 | * between the container and the widget. See |
| 1445 | * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int, |
| 1446 | * android.graphics.Rect) Gravity.apply} for how this is used. This |
| 1447 | * field is added with {@link #x} to supply the <var>xAdj</var> parameter. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1448 | */ |
| 1449 | public float horizontalMargin; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1450 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1451 | /** |
| 1452 | * The vertical margin, as a percentage of the container's height, |
Dianne Hackborn | 8eb2e24 | 2010-11-01 12:31:24 -0700 | [diff] [blame] | 1453 | * between the container and the widget. See |
| 1454 | * {@link Gravity#apply(int, int, int, android.graphics.Rect, int, int, |
| 1455 | * android.graphics.Rect) Gravity.apply} for how this is used. This |
| 1456 | * field is added with {@link #y} to supply the <var>yAdj</var> parameter. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1457 | */ |
| 1458 | public float verticalMargin; |
Alan Viverette | ccb11e1 | 2014-07-08 16:04:02 -0700 | [diff] [blame] | 1459 | |
| 1460 | /** |
| 1461 | * Positive insets between the drawing surface and window content. |
| 1462 | * |
| 1463 | * @hide |
| 1464 | */ |
Alan Viverette | 3aa1ffb | 2014-10-30 12:22:08 -0700 | [diff] [blame] | 1465 | public final Rect surfaceInsets = new Rect(); |
Alan Viverette | 5435a30 | 2015-01-29 10:25:34 -0800 | [diff] [blame] | 1466 | |
| 1467 | /** |
| 1468 | * Whether the surface insets have been manually set. When set to |
| 1469 | * {@code false}, the view root will automatically determine the |
| 1470 | * appropriate surface insets. |
| 1471 | * |
| 1472 | * @see #surfaceInsets |
| 1473 | * @hide |
| 1474 | */ |
| 1475 | public boolean hasManualSurfaceInsets; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1476 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1477 | /** |
| 1478 | * The desired bitmap format. May be one of the constants in |
| 1479 | * {@link android.graphics.PixelFormat}. Default is OPAQUE. |
| 1480 | */ |
| 1481 | public int format; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1482 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1483 | /** |
| 1484 | * A style resource defining the animations to use for this window. |
| 1485 | * This must be a system resource; it can not be an application resource |
| 1486 | * because the window manager does not have access to applications. |
| 1487 | */ |
| 1488 | public int windowAnimations; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1489 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1490 | /** |
| 1491 | * An alpha value to apply to this entire window. |
| 1492 | * An alpha of 1.0 means fully opaque and 0.0 means fully transparent |
| 1493 | */ |
| 1494 | public float alpha = 1.0f; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1495 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1496 | /** |
| 1497 | * When {@link #FLAG_DIM_BEHIND} is set, this is the amount of dimming |
| 1498 | * to apply. Range is from 1.0 for completely opaque to 0.0 for no |
| 1499 | * dim. |
| 1500 | */ |
| 1501 | public float dimAmount = 1.0f; |
Dianne Hackborn | dea3ef7 | 2010-10-28 14:24:22 -0700 | [diff] [blame] | 1502 | |
| 1503 | /** |
| 1504 | * Default value for {@link #screenBrightness} and {@link #buttonBrightness} |
| 1505 | * indicating that the brightness value is not overridden for this window |
| 1506 | * and normal brightness policy should be used. |
| 1507 | */ |
| 1508 | public static final float BRIGHTNESS_OVERRIDE_NONE = -1.0f; |
| 1509 | |
| 1510 | /** |
| 1511 | * Value for {@link #screenBrightness} and {@link #buttonBrightness} |
| 1512 | * indicating that the screen or button backlight brightness should be set |
| 1513 | * to the lowest value when this window is in front. |
| 1514 | */ |
| 1515 | public static final float BRIGHTNESS_OVERRIDE_OFF = 0.0f; |
| 1516 | |
| 1517 | /** |
| 1518 | * Value for {@link #screenBrightness} and {@link #buttonBrightness} |
| 1519 | * indicating that the screen or button backlight brightness should be set |
| 1520 | * to the hightest value when this window is in front. |
| 1521 | */ |
| 1522 | public static final float BRIGHTNESS_OVERRIDE_FULL = 1.0f; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1523 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1524 | /** |
| 1525 | * This can be used to override the user's preferred brightness of |
| 1526 | * the screen. A value of less than 0, the default, means to use the |
| 1527 | * preferred screen brightness. 0 to 1 adjusts the brightness from |
| 1528 | * dark to full bright. |
| 1529 | */ |
Mike Lockwood | fb73f79 | 2009-11-20 11:31:18 -0500 | [diff] [blame] | 1530 | public float screenBrightness = BRIGHTNESS_OVERRIDE_NONE; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1531 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1532 | /** |
Mike Lockwood | fb73f79 | 2009-11-20 11:31:18 -0500 | [diff] [blame] | 1533 | * This can be used to override the standard behavior of the button and |
| 1534 | * keyboard backlights. A value of less than 0, the default, means to |
| 1535 | * use the standard backlight behavior. 0 to 1 adjusts the brightness |
| 1536 | * from dark to full bright. |
| 1537 | */ |
| 1538 | public float buttonBrightness = BRIGHTNESS_OVERRIDE_NONE; |
| 1539 | |
| 1540 | /** |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1541 | * Value for {@link #rotationAnimation} to define the animation used to |
| 1542 | * specify that this window will rotate in or out following a rotation. |
| 1543 | */ |
| 1544 | public static final int ROTATION_ANIMATION_ROTATE = 0; |
| 1545 | |
| 1546 | /** |
| 1547 | * Value for {@link #rotationAnimation} to define the animation used to |
| 1548 | * specify that this window will fade in or out following a rotation. |
| 1549 | */ |
| 1550 | public static final int ROTATION_ANIMATION_CROSSFADE = 1; |
| 1551 | |
| 1552 | /** |
| 1553 | * Value for {@link #rotationAnimation} to define the animation used to |
| 1554 | * specify that this window will immediately disappear or appear following |
| 1555 | * a rotation. |
| 1556 | */ |
| 1557 | public static final int ROTATION_ANIMATION_JUMPCUT = 2; |
| 1558 | |
| 1559 | /** |
Craig Mautner | bdcc9a5 | 2013-04-19 13:06:53 -0700 | [diff] [blame] | 1560 | * Define the exit and entry animations used on this window when the device is rotated. |
| 1561 | * This only has an affect if the incoming and outgoing topmost |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1562 | * opaque windows have the #FLAG_FULLSCREEN bit set and are not covered |
Craig Mautner | bdcc9a5 | 2013-04-19 13:06:53 -0700 | [diff] [blame] | 1563 | * by other windows. All other situations default to the |
| 1564 | * {@link #ROTATION_ANIMATION_ROTATE} behavior. |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1565 | * |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1566 | * @see #ROTATION_ANIMATION_ROTATE |
| 1567 | * @see #ROTATION_ANIMATION_CROSSFADE |
| 1568 | * @see #ROTATION_ANIMATION_JUMPCUT |
| 1569 | */ |
| 1570 | public int rotationAnimation = ROTATION_ANIMATION_ROTATE; |
| 1571 | |
| 1572 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1573 | * Identifier for this window. This will usually be filled in for |
| 1574 | * you. |
| 1575 | */ |
| 1576 | public IBinder token = null; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1577 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1578 | /** |
| 1579 | * Name of the package owning this window. |
| 1580 | */ |
| 1581 | public String packageName = null; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1582 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1583 | /** |
| 1584 | * Specific orientation value for a window. |
| 1585 | * May be any of the same values allowed |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1586 | * for {@link android.content.pm.ActivityInfo#screenOrientation}. |
| 1587 | * If not set, a default value of |
| 1588 | * {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1589 | * will be used. |
| 1590 | */ |
| 1591 | public int screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1592 | |
| 1593 | /** |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 1594 | * The preferred refresh rate for the window. |
| 1595 | * |
| 1596 | * This must be one of the supported refresh rates obtained for the display(s) the window |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1597 | * is on. The selected refresh rate will be applied to the display's default mode. |
| 1598 | * |
| 1599 | * This value is ignored if {@link #preferredDisplayModeId} is set. |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 1600 | * |
| 1601 | * @see Display#getSupportedRefreshRates() |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1602 | * @deprecated use {@link #preferredDisplayModeId} instead |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 1603 | */ |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1604 | @Deprecated |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 1605 | public float preferredRefreshRate; |
| 1606 | |
| 1607 | /** |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1608 | * Id of the preferred display mode for the window. |
| 1609 | * <p> |
| 1610 | * This must be one of the supported modes obtained for the display(s) the window is on. |
| 1611 | * A value of {@code 0} means no preference. |
| 1612 | * |
| 1613 | * @see Display#getSupportedModes() |
| 1614 | * @see Display.Mode#getModeId() |
| 1615 | */ |
| 1616 | public int preferredDisplayModeId; |
| 1617 | |
| 1618 | /** |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1619 | * Control the visibility of the status bar. |
Joe Onorato | 14782f7 | 2011-01-25 19:53:17 -0800 | [diff] [blame] | 1620 | * |
| 1621 | * @see View#STATUS_BAR_VISIBLE |
| 1622 | * @see View#STATUS_BAR_HIDDEN |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1623 | */ |
| 1624 | public int systemUiVisibility; |
| 1625 | |
| 1626 | /** |
Joe Onorato | 14782f7 | 2011-01-25 19:53:17 -0800 | [diff] [blame] | 1627 | * @hide |
| 1628 | * The ui visibility as requested by the views in this hierarchy. |
| 1629 | * the combined value should be systemUiVisibility | subtreeSystemUiVisibility. |
| 1630 | */ |
| 1631 | public int subtreeSystemUiVisibility; |
| 1632 | |
| 1633 | /** |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1634 | * Get callbacks about the system ui visibility changing. |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1635 | * |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1636 | * TODO: Maybe there should be a bitfield of optional callbacks that we need. |
| 1637 | * |
| 1638 | * @hide |
| 1639 | */ |
| 1640 | public boolean hasSystemUiListeners; |
| 1641 | |
Jeff Brown | 474dcb5 | 2011-06-14 20:22:50 -0700 | [diff] [blame] | 1642 | /** |
| 1643 | * When this window has focus, disable touch pad pointer gesture processing. |
| 1644 | * The window will receive raw position updates from the touch pad instead |
| 1645 | * of pointer movements and synthetic touch events. |
| 1646 | * |
| 1647 | * @hide |
| 1648 | */ |
| 1649 | public static final int INPUT_FEATURE_DISABLE_POINTER_GESTURES = 0x00000001; |
| 1650 | |
| 1651 | /** |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 1652 | * Does not construct an input channel for this window. The channel will therefore |
| 1653 | * be incapable of receiving input. |
| 1654 | * |
| 1655 | * @hide |
| 1656 | */ |
| 1657 | public static final int INPUT_FEATURE_NO_INPUT_CHANNEL = 0x00000002; |
| 1658 | |
| 1659 | /** |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 1660 | * When this window has focus, does not call user activity for all input events so |
| 1661 | * the application will have to do it itself. Should only be used by |
| 1662 | * the keyguard and phone app. |
| 1663 | * <p> |
| 1664 | * Should only be used by the keyguard and phone app. |
| 1665 | * </p> |
| 1666 | * |
| 1667 | * @hide |
| 1668 | */ |
| 1669 | public static final int INPUT_FEATURE_DISABLE_USER_ACTIVITY = 0x00000004; |
| 1670 | |
| 1671 | /** |
Jeff Brown | 474dcb5 | 2011-06-14 20:22:50 -0700 | [diff] [blame] | 1672 | * Control special features of the input subsystem. |
| 1673 | * |
Craig Mautner | bdcc9a5 | 2013-04-19 13:06:53 -0700 | [diff] [blame] | 1674 | * @see #INPUT_FEATURE_DISABLE_POINTER_GESTURES |
Jeff Brown | cc4f7db | 2011-08-30 20:34:48 -0700 | [diff] [blame] | 1675 | * @see #INPUT_FEATURE_NO_INPUT_CHANNEL |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 1676 | * @see #INPUT_FEATURE_DISABLE_USER_ACTIVITY |
Jeff Brown | 474dcb5 | 2011-06-14 20:22:50 -0700 | [diff] [blame] | 1677 | * @hide |
| 1678 | */ |
| 1679 | public int inputFeatures; |
| 1680 | |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 1681 | /** |
| 1682 | * Sets the number of milliseconds before the user activity timeout occurs |
| 1683 | * when this window has focus. A value of -1 uses the standard timeout. |
| 1684 | * A value of 0 uses the minimum support display timeout. |
| 1685 | * <p> |
| 1686 | * This property can only be used to reduce the user specified display timeout; |
| 1687 | * it can never make the timeout longer than it normally would be. |
| 1688 | * </p><p> |
| 1689 | * Should only be used by the keyguard and phone app. |
| 1690 | * </p> |
| 1691 | * |
| 1692 | * @hide |
| 1693 | */ |
| 1694 | public long userActivityTimeout = -1; |
| 1695 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1696 | public LayoutParams() { |
Romain Guy | 980a938 | 2010-01-08 15:06:28 -0800 | [diff] [blame] | 1697 | super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1698 | type = TYPE_APPLICATION; |
| 1699 | format = PixelFormat.OPAQUE; |
| 1700 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1701 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1702 | public LayoutParams(int _type) { |
Romain Guy | 980a938 | 2010-01-08 15:06:28 -0800 | [diff] [blame] | 1703 | super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1704 | type = _type; |
| 1705 | format = PixelFormat.OPAQUE; |
| 1706 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1707 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1708 | public LayoutParams(int _type, int _flags) { |
Romain Guy | 980a938 | 2010-01-08 15:06:28 -0800 | [diff] [blame] | 1709 | super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1710 | type = _type; |
| 1711 | flags = _flags; |
| 1712 | format = PixelFormat.OPAQUE; |
| 1713 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1714 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1715 | public LayoutParams(int _type, int _flags, int _format) { |
Romain Guy | 980a938 | 2010-01-08 15:06:28 -0800 | [diff] [blame] | 1716 | super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1717 | type = _type; |
| 1718 | flags = _flags; |
| 1719 | format = _format; |
| 1720 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1721 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1722 | public LayoutParams(int w, int h, int _type, int _flags, int _format) { |
| 1723 | super(w, h); |
| 1724 | type = _type; |
| 1725 | flags = _flags; |
| 1726 | format = _format; |
| 1727 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1728 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1729 | public LayoutParams(int w, int h, int xpos, int ypos, int _type, |
| 1730 | int _flags, int _format) { |
| 1731 | super(w, h); |
| 1732 | x = xpos; |
| 1733 | y = ypos; |
| 1734 | type = _type; |
| 1735 | flags = _flags; |
| 1736 | format = _format; |
| 1737 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1738 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1739 | public final void setTitle(CharSequence title) { |
| 1740 | if (null == title) |
| 1741 | title = ""; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1742 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1743 | mTitle = TextUtils.stringOrSpannedString(title); |
| 1744 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1745 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1746 | public final CharSequence getTitle() { |
Wale Ogunwale | b6e2ead | 2016-02-15 08:28:47 -0800 | [diff] [blame] | 1747 | return mTitle != null ? mTitle : ""; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1748 | } |
Bryce Lee | 53b9fbd | 2015-02-06 12:06:34 -0800 | [diff] [blame] | 1749 | |
| 1750 | /** @hide */ |
| 1751 | @SystemApi |
| 1752 | public final void setUserActivityTimeout(long timeout) { |
| 1753 | userActivityTimeout = timeout; |
| 1754 | } |
| 1755 | |
| 1756 | /** @hide */ |
| 1757 | @SystemApi |
| 1758 | public final long getUserActivityTimeout() { |
| 1759 | return userActivityTimeout; |
| 1760 | } |
| 1761 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1762 | public int describeContents() { |
| 1763 | return 0; |
| 1764 | } |
| 1765 | |
| 1766 | public void writeToParcel(Parcel out, int parcelableFlags) { |
| 1767 | out.writeInt(width); |
| 1768 | out.writeInt(height); |
| 1769 | out.writeInt(x); |
| 1770 | out.writeInt(y); |
| 1771 | out.writeInt(type); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1772 | out.writeInt(flags); |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1773 | out.writeInt(privateFlags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1774 | out.writeInt(softInputMode); |
| 1775 | out.writeInt(gravity); |
| 1776 | out.writeFloat(horizontalMargin); |
| 1777 | out.writeFloat(verticalMargin); |
| 1778 | out.writeInt(format); |
| 1779 | out.writeInt(windowAnimations); |
| 1780 | out.writeFloat(alpha); |
| 1781 | out.writeFloat(dimAmount); |
| 1782 | out.writeFloat(screenBrightness); |
Mike Lockwood | fb73f79 | 2009-11-20 11:31:18 -0500 | [diff] [blame] | 1783 | out.writeFloat(buttonBrightness); |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1784 | out.writeInt(rotationAnimation); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1785 | out.writeStrongBinder(token); |
| 1786 | out.writeString(packageName); |
| 1787 | TextUtils.writeToParcel(mTitle, out, parcelableFlags); |
| 1788 | out.writeInt(screenOrientation); |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 1789 | out.writeFloat(preferredRefreshRate); |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1790 | out.writeInt(preferredDisplayModeId); |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1791 | out.writeInt(systemUiVisibility); |
Joe Onorato | 14782f7 | 2011-01-25 19:53:17 -0800 | [diff] [blame] | 1792 | out.writeInt(subtreeSystemUiVisibility); |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1793 | out.writeInt(hasSystemUiListeners ? 1 : 0); |
Jeff Brown | 474dcb5 | 2011-06-14 20:22:50 -0700 | [diff] [blame] | 1794 | out.writeInt(inputFeatures); |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 1795 | out.writeLong(userActivityTimeout); |
Alan Viverette | 49a22e8 | 2014-07-12 20:01:27 -0700 | [diff] [blame] | 1796 | out.writeInt(surfaceInsets.left); |
| 1797 | out.writeInt(surfaceInsets.top); |
| 1798 | out.writeInt(surfaceInsets.right); |
| 1799 | out.writeInt(surfaceInsets.bottom); |
Alan Viverette | 5435a30 | 2015-01-29 10:25:34 -0800 | [diff] [blame] | 1800 | out.writeInt(hasManualSurfaceInsets ? 1 : 0); |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1801 | out.writeInt(needsMenuKey); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1802 | } |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1803 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1804 | public static final Parcelable.Creator<LayoutParams> CREATOR |
| 1805 | = new Parcelable.Creator<LayoutParams>() { |
| 1806 | public LayoutParams createFromParcel(Parcel in) { |
| 1807 | return new LayoutParams(in); |
| 1808 | } |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1809 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1810 | public LayoutParams[] newArray(int size) { |
| 1811 | return new LayoutParams[size]; |
| 1812 | } |
| 1813 | }; |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1814 | |
| 1815 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1816 | public LayoutParams(Parcel in) { |
| 1817 | width = in.readInt(); |
| 1818 | height = in.readInt(); |
| 1819 | x = in.readInt(); |
| 1820 | y = in.readInt(); |
| 1821 | type = in.readInt(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1822 | flags = in.readInt(); |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1823 | privateFlags = in.readInt(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1824 | softInputMode = in.readInt(); |
| 1825 | gravity = in.readInt(); |
| 1826 | horizontalMargin = in.readFloat(); |
| 1827 | verticalMargin = in.readFloat(); |
| 1828 | format = in.readInt(); |
| 1829 | windowAnimations = in.readInt(); |
| 1830 | alpha = in.readFloat(); |
| 1831 | dimAmount = in.readFloat(); |
| 1832 | screenBrightness = in.readFloat(); |
Mike Lockwood | fb73f79 | 2009-11-20 11:31:18 -0500 | [diff] [blame] | 1833 | buttonBrightness = in.readFloat(); |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1834 | rotationAnimation = in.readInt(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1835 | token = in.readStrongBinder(); |
| 1836 | packageName = in.readString(); |
| 1837 | mTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in); |
| 1838 | screenOrientation = in.readInt(); |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 1839 | preferredRefreshRate = in.readFloat(); |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1840 | preferredDisplayModeId = in.readInt(); |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1841 | systemUiVisibility = in.readInt(); |
Joe Onorato | 14782f7 | 2011-01-25 19:53:17 -0800 | [diff] [blame] | 1842 | subtreeSystemUiVisibility = in.readInt(); |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1843 | hasSystemUiListeners = in.readInt() != 0; |
Jeff Brown | 474dcb5 | 2011-06-14 20:22:50 -0700 | [diff] [blame] | 1844 | inputFeatures = in.readInt(); |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 1845 | userActivityTimeout = in.readLong(); |
Alan Viverette | 49a22e8 | 2014-07-12 20:01:27 -0700 | [diff] [blame] | 1846 | surfaceInsets.left = in.readInt(); |
| 1847 | surfaceInsets.top = in.readInt(); |
| 1848 | surfaceInsets.right = in.readInt(); |
| 1849 | surfaceInsets.bottom = in.readInt(); |
Alan Viverette | 5435a30 | 2015-01-29 10:25:34 -0800 | [diff] [blame] | 1850 | hasManualSurfaceInsets = in.readInt() != 0; |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1851 | needsMenuKey = in.readInt(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1852 | } |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1853 | |
Romain Guy | 7299807 | 2009-06-22 11:09:20 -0700 | [diff] [blame] | 1854 | @SuppressWarnings({"PointlessBitwiseExpression"}) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1855 | public static final int LAYOUT_CHANGED = 1<<0; |
| 1856 | public static final int TYPE_CHANGED = 1<<1; |
| 1857 | public static final int FLAGS_CHANGED = 1<<2; |
| 1858 | public static final int FORMAT_CHANGED = 1<<3; |
| 1859 | public static final int ANIMATION_CHANGED = 1<<4; |
| 1860 | public static final int DIM_AMOUNT_CHANGED = 1<<5; |
| 1861 | public static final int TITLE_CHANGED = 1<<6; |
| 1862 | public static final int ALPHA_CHANGED = 1<<7; |
| 1863 | public static final int MEMORY_TYPE_CHANGED = 1<<8; |
| 1864 | public static final int SOFT_INPUT_MODE_CHANGED = 1<<9; |
| 1865 | public static final int SCREEN_ORIENTATION_CHANGED = 1<<10; |
| 1866 | public static final int SCREEN_BRIGHTNESS_CHANGED = 1<<11; |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1867 | public static final int ROTATION_ANIMATION_CHANGED = 1<<12; |
Mike Lockwood | fb73f79 | 2009-11-20 11:31:18 -0500 | [diff] [blame] | 1868 | /** {@hide} */ |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1869 | public static final int BUTTON_BRIGHTNESS_CHANGED = 1<<13; |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1870 | /** {@hide} */ |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1871 | public static final int SYSTEM_UI_VISIBILITY_CHANGED = 1<<14; |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 1872 | /** {@hide} */ |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1873 | public static final int SYSTEM_UI_LISTENER_CHANGED = 1<<15; |
Jeff Brown | 474dcb5 | 2011-06-14 20:22:50 -0700 | [diff] [blame] | 1874 | /** {@hide} */ |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1875 | public static final int INPUT_FEATURES_CHANGED = 1<<16; |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1876 | /** {@hide} */ |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1877 | public static final int PRIVATE_FLAGS_CHANGED = 1<<17; |
Romain Guy | f21c9b0 | 2011-09-06 16:56:54 -0700 | [diff] [blame] | 1878 | /** {@hide} */ |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1879 | public static final int USER_ACTIVITY_TIMEOUT_CHANGED = 1<<18; |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 1880 | /** {@hide} */ |
John Spurlock | bd95740 | 2013-10-03 11:38:39 -0400 | [diff] [blame] | 1881 | public static final int TRANSLUCENT_FLAGS_CHANGED = 1<<19; |
| 1882 | /** {@hide} */ |
Alan Viverette | 49a22e8 | 2014-07-12 20:01:27 -0700 | [diff] [blame] | 1883 | public static final int SURFACE_INSETS_CHANGED = 1<<20; |
Alan Viverette | ccb11e1 | 2014-07-08 16:04:02 -0700 | [diff] [blame] | 1884 | /** {@hide} */ |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 1885 | public static final int PREFERRED_REFRESH_RATE_CHANGED = 1 << 21; |
| 1886 | /** {@hide} */ |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1887 | public static final int NEEDS_MENU_KEY_CHANGED = 1 << 22; |
| 1888 | /** {@hide} */ |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1889 | public static final int PREFERRED_DISPLAY_MODE_ID = 1 << 23; |
| 1890 | /** {@hide} */ |
Romain Guy | f21c9b0 | 2011-09-06 16:56:54 -0700 | [diff] [blame] | 1891 | public static final int EVERYTHING_CHANGED = 0xffffffff; |
| 1892 | |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 1893 | // internal buffer to backup/restore parameters under compatibility mode. |
| 1894 | private int[] mCompatibilityParamsBackup = null; |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1895 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1896 | public final int copyFrom(LayoutParams o) { |
| 1897 | int changes = 0; |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 1898 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1899 | if (width != o.width) { |
| 1900 | width = o.width; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1901 | changes |= LAYOUT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1902 | } |
| 1903 | if (height != o.height) { |
| 1904 | height = o.height; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1905 | changes |= LAYOUT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1906 | } |
| 1907 | if (x != o.x) { |
| 1908 | x = o.x; |
| 1909 | changes |= LAYOUT_CHANGED; |
| 1910 | } |
| 1911 | if (y != o.y) { |
| 1912 | y = o.y; |
| 1913 | changes |= LAYOUT_CHANGED; |
| 1914 | } |
| 1915 | if (horizontalWeight != o.horizontalWeight) { |
| 1916 | horizontalWeight = o.horizontalWeight; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1917 | changes |= LAYOUT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1918 | } |
| 1919 | if (verticalWeight != o.verticalWeight) { |
| 1920 | verticalWeight = o.verticalWeight; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1921 | changes |= LAYOUT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1922 | } |
| 1923 | if (horizontalMargin != o.horizontalMargin) { |
| 1924 | horizontalMargin = o.horizontalMargin; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1925 | changes |= LAYOUT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1926 | } |
| 1927 | if (verticalMargin != o.verticalMargin) { |
| 1928 | verticalMargin = o.verticalMargin; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1929 | changes |= LAYOUT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1930 | } |
| 1931 | if (type != o.type) { |
| 1932 | type = o.type; |
| 1933 | changes |= TYPE_CHANGED; |
| 1934 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1935 | if (flags != o.flags) { |
John Spurlock | bd95740 | 2013-10-03 11:38:39 -0400 | [diff] [blame] | 1936 | final int diff = flags ^ o.flags; |
| 1937 | if ((diff & (FLAG_TRANSLUCENT_STATUS | FLAG_TRANSLUCENT_NAVIGATION)) != 0) { |
| 1938 | changes |= TRANSLUCENT_FLAGS_CHANGED; |
| 1939 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1940 | flags = o.flags; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1941 | changes |= FLAGS_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1942 | } |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 1943 | if (privateFlags != o.privateFlags) { |
| 1944 | privateFlags = o.privateFlags; |
| 1945 | changes |= PRIVATE_FLAGS_CHANGED; |
| 1946 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1947 | if (softInputMode != o.softInputMode) { |
| 1948 | softInputMode = o.softInputMode; |
| 1949 | changes |= SOFT_INPUT_MODE_CHANGED; |
| 1950 | } |
| 1951 | if (gravity != o.gravity) { |
| 1952 | gravity = o.gravity; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1953 | changes |= LAYOUT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1954 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1955 | if (format != o.format) { |
| 1956 | format = o.format; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 1957 | changes |= FORMAT_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1958 | } |
| 1959 | if (windowAnimations != o.windowAnimations) { |
| 1960 | windowAnimations = o.windowAnimations; |
| 1961 | changes |= ANIMATION_CHANGED; |
| 1962 | } |
| 1963 | if (token == null) { |
| 1964 | // NOTE: token only copied if the recipient doesn't |
| 1965 | // already have one. |
| 1966 | token = o.token; |
| 1967 | } |
| 1968 | if (packageName == null) { |
| 1969 | // NOTE: packageName only copied if the recipient doesn't |
| 1970 | // already have one. |
| 1971 | packageName = o.packageName; |
| 1972 | } |
Wale Ogunwale | 1f240c9 | 2016-02-22 18:04:58 -0800 | [diff] [blame] | 1973 | if (!Objects.equals(mTitle, o.mTitle) && o.mTitle != null) { |
Wale Ogunwale | b6e2ead | 2016-02-15 08:28:47 -0800 | [diff] [blame] | 1974 | // NOTE: mTitle only copied if the originator set one. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1975 | mTitle = o.mTitle; |
| 1976 | changes |= TITLE_CHANGED; |
| 1977 | } |
| 1978 | if (alpha != o.alpha) { |
| 1979 | alpha = o.alpha; |
| 1980 | changes |= ALPHA_CHANGED; |
| 1981 | } |
| 1982 | if (dimAmount != o.dimAmount) { |
| 1983 | dimAmount = o.dimAmount; |
| 1984 | changes |= DIM_AMOUNT_CHANGED; |
| 1985 | } |
| 1986 | if (screenBrightness != o.screenBrightness) { |
| 1987 | screenBrightness = o.screenBrightness; |
| 1988 | changes |= SCREEN_BRIGHTNESS_CHANGED; |
| 1989 | } |
Mike Lockwood | fb73f79 | 2009-11-20 11:31:18 -0500 | [diff] [blame] | 1990 | if (buttonBrightness != o.buttonBrightness) { |
| 1991 | buttonBrightness = o.buttonBrightness; |
| 1992 | changes |= BUTTON_BRIGHTNESS_CHANGED; |
| 1993 | } |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 1994 | if (rotationAnimation != o.rotationAnimation) { |
| 1995 | rotationAnimation = o.rotationAnimation; |
| 1996 | changes |= ROTATION_ANIMATION_CHANGED; |
| 1997 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 1998 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1999 | if (screenOrientation != o.screenOrientation) { |
| 2000 | screenOrientation = o.screenOrientation; |
Chet Haase | 40e0383 | 2011-10-06 08:34:13 -0700 | [diff] [blame] | 2001 | changes |= SCREEN_ORIENTATION_CHANGED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2002 | } |
Romain Guy | 529b60a | 2010-08-03 18:05:47 -0700 | [diff] [blame] | 2003 | |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 2004 | if (preferredRefreshRate != o.preferredRefreshRate) { |
| 2005 | preferredRefreshRate = o.preferredRefreshRate; |
| 2006 | changes |= PREFERRED_REFRESH_RATE_CHANGED; |
| 2007 | } |
| 2008 | |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 2009 | if (preferredDisplayModeId != o.preferredDisplayModeId) { |
| 2010 | preferredDisplayModeId = o.preferredDisplayModeId; |
| 2011 | changes |= PREFERRED_DISPLAY_MODE_ID; |
| 2012 | } |
| 2013 | |
Joe Onorato | 14782f7 | 2011-01-25 19:53:17 -0800 | [diff] [blame] | 2014 | if (systemUiVisibility != o.systemUiVisibility |
| 2015 | || subtreeSystemUiVisibility != o.subtreeSystemUiVisibility) { |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 2016 | systemUiVisibility = o.systemUiVisibility; |
Joe Onorato | 14782f7 | 2011-01-25 19:53:17 -0800 | [diff] [blame] | 2017 | subtreeSystemUiVisibility = o.subtreeSystemUiVisibility; |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 2018 | changes |= SYSTEM_UI_VISIBILITY_CHANGED; |
| 2019 | } |
| 2020 | |
| 2021 | if (hasSystemUiListeners != o.hasSystemUiListeners) { |
| 2022 | hasSystemUiListeners = o.hasSystemUiListeners; |
| 2023 | changes |= SYSTEM_UI_LISTENER_CHANGED; |
| 2024 | } |
| 2025 | |
Jeff Brown | 474dcb5 | 2011-06-14 20:22:50 -0700 | [diff] [blame] | 2026 | if (inputFeatures != o.inputFeatures) { |
| 2027 | inputFeatures = o.inputFeatures; |
| 2028 | changes |= INPUT_FEATURES_CHANGED; |
| 2029 | } |
| 2030 | |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 2031 | if (userActivityTimeout != o.userActivityTimeout) { |
| 2032 | userActivityTimeout = o.userActivityTimeout; |
| 2033 | changes |= USER_ACTIVITY_TIMEOUT_CHANGED; |
| 2034 | } |
| 2035 | |
Alan Viverette | 49a22e8 | 2014-07-12 20:01:27 -0700 | [diff] [blame] | 2036 | if (!surfaceInsets.equals(o.surfaceInsets)) { |
| 2037 | surfaceInsets.set(o.surfaceInsets); |
| 2038 | changes |= SURFACE_INSETS_CHANGED; |
Alan Viverette | ccb11e1 | 2014-07-08 16:04:02 -0700 | [diff] [blame] | 2039 | } |
| 2040 | |
Alan Viverette | 5435a30 | 2015-01-29 10:25:34 -0800 | [diff] [blame] | 2041 | if (hasManualSurfaceInsets != o.hasManualSurfaceInsets) { |
| 2042 | hasManualSurfaceInsets = o.hasManualSurfaceInsets; |
| 2043 | changes |= SURFACE_INSETS_CHANGED; |
| 2044 | } |
| 2045 | |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 2046 | if (needsMenuKey != o.needsMenuKey) { |
| 2047 | needsMenuKey = o.needsMenuKey; |
| 2048 | changes |= NEEDS_MENU_KEY_CHANGED; |
| 2049 | } |
| 2050 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2051 | return changes; |
| 2052 | } |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 2053 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2054 | @Override |
| 2055 | public String debug(String output) { |
| 2056 | output += "Contents of " + this + ":"; |
| 2057 | Log.d("Debug", output); |
| 2058 | output = super.debug(""); |
| 2059 | Log.d("Debug", output); |
| 2060 | Log.d("Debug", ""); |
| 2061 | Log.d("Debug", "WindowManager.LayoutParams={title=" + mTitle + "}"); |
| 2062 | return ""; |
| 2063 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 2064 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2065 | @Override |
| 2066 | public String toString() { |
| 2067 | StringBuilder sb = new StringBuilder(256); |
| 2068 | sb.append("WM.LayoutParams{"); |
| 2069 | sb.append("("); |
| 2070 | sb.append(x); |
| 2071 | sb.append(','); |
| 2072 | sb.append(y); |
| 2073 | sb.append(")("); |
Romain Guy | 980a938 | 2010-01-08 15:06:28 -0800 | [diff] [blame] | 2074 | sb.append((width== MATCH_PARENT ?"fill":(width==WRAP_CONTENT?"wrap":width))); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2075 | sb.append('x'); |
Romain Guy | 980a938 | 2010-01-08 15:06:28 -0800 | [diff] [blame] | 2076 | sb.append((height== MATCH_PARENT ?"fill":(height==WRAP_CONTENT?"wrap":height))); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2077 | sb.append(")"); |
Dianne Hackborn | 8eb2e24 | 2010-11-01 12:31:24 -0700 | [diff] [blame] | 2078 | if (horizontalMargin != 0) { |
| 2079 | sb.append(" hm="); |
| 2080 | sb.append(horizontalMargin); |
| 2081 | } |
| 2082 | if (verticalMargin != 0) { |
| 2083 | sb.append(" vm="); |
| 2084 | sb.append(verticalMargin); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2085 | } |
| 2086 | if (gravity != 0) { |
| 2087 | sb.append(" gr=#"); |
| 2088 | sb.append(Integer.toHexString(gravity)); |
| 2089 | } |
Dianne Hackborn | 8eb2e24 | 2010-11-01 12:31:24 -0700 | [diff] [blame] | 2090 | if (softInputMode != 0) { |
| 2091 | sb.append(" sim=#"); |
| 2092 | sb.append(Integer.toHexString(softInputMode)); |
| 2093 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2094 | sb.append(" ty="); |
| 2095 | sb.append(type); |
| 2096 | sb.append(" fl=#"); |
| 2097 | sb.append(Integer.toHexString(flags)); |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 2098 | if (privateFlags != 0) { |
Adam Lesinski | 95c4297 | 2013-10-02 10:13:27 -0700 | [diff] [blame] | 2099 | if ((privateFlags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) { |
| 2100 | sb.append(" compatible=true"); |
| 2101 | } |
Dianne Hackborn | 5d927c2 | 2011-09-02 12:22:18 -0700 | [diff] [blame] | 2102 | sb.append(" pfl=0x").append(Integer.toHexString(privateFlags)); |
| 2103 | } |
Dianne Hackborn | a44abeb | 2011-08-08 19:24:01 -0700 | [diff] [blame] | 2104 | if (format != PixelFormat.OPAQUE) { |
| 2105 | sb.append(" fmt="); |
| 2106 | sb.append(format); |
| 2107 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2108 | if (windowAnimations != 0) { |
| 2109 | sb.append(" wanim=0x"); |
| 2110 | sb.append(Integer.toHexString(windowAnimations)); |
| 2111 | } |
| 2112 | if (screenOrientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) { |
| 2113 | sb.append(" or="); |
| 2114 | sb.append(screenOrientation); |
| 2115 | } |
Dianne Hackborn | 8eb2e24 | 2010-11-01 12:31:24 -0700 | [diff] [blame] | 2116 | if (alpha != 1.0f) { |
| 2117 | sb.append(" alpha="); |
| 2118 | sb.append(alpha); |
| 2119 | } |
| 2120 | if (screenBrightness != BRIGHTNESS_OVERRIDE_NONE) { |
| 2121 | sb.append(" sbrt="); |
| 2122 | sb.append(screenBrightness); |
| 2123 | } |
| 2124 | if (buttonBrightness != BRIGHTNESS_OVERRIDE_NONE) { |
| 2125 | sb.append(" bbrt="); |
| 2126 | sb.append(buttonBrightness); |
| 2127 | } |
Craig Mautner | 3c17437 | 2013-02-21 17:54:37 -0800 | [diff] [blame] | 2128 | if (rotationAnimation != ROTATION_ANIMATION_ROTATE) { |
| 2129 | sb.append(" rotAnim="); |
| 2130 | sb.append(rotationAnimation); |
| 2131 | } |
Michael Wright | 3f145a2 | 2014-07-22 19:46:03 -0700 | [diff] [blame] | 2132 | if (preferredRefreshRate != 0) { |
| 2133 | sb.append(" preferredRefreshRate="); |
| 2134 | sb.append(preferredRefreshRate); |
| 2135 | } |
P.Y. Laligand | b3b9eb3 | 2015-05-11 15:02:07 -0700 | [diff] [blame] | 2136 | if (preferredDisplayModeId != 0) { |
| 2137 | sb.append(" preferredDisplayMode="); |
| 2138 | sb.append(preferredDisplayModeId); |
| 2139 | } |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 2140 | if (systemUiVisibility != 0) { |
| 2141 | sb.append(" sysui=0x"); |
| 2142 | sb.append(Integer.toHexString(systemUiVisibility)); |
| 2143 | } |
Joe Onorato | 14782f7 | 2011-01-25 19:53:17 -0800 | [diff] [blame] | 2144 | if (subtreeSystemUiVisibility != 0) { |
| 2145 | sb.append(" vsysui=0x"); |
| 2146 | sb.append(Integer.toHexString(subtreeSystemUiVisibility)); |
| 2147 | } |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 2148 | if (hasSystemUiListeners) { |
| 2149 | sb.append(" sysuil="); |
| 2150 | sb.append(hasSystemUiListeners); |
| 2151 | } |
Dianne Hackborn | a44abeb | 2011-08-08 19:24:01 -0700 | [diff] [blame] | 2152 | if (inputFeatures != 0) { |
| 2153 | sb.append(" if=0x").append(Integer.toHexString(inputFeatures)); |
| 2154 | } |
Jeff Brown | 1e3b98d | 2012-09-30 18:58:59 -0700 | [diff] [blame] | 2155 | if (userActivityTimeout >= 0) { |
| 2156 | sb.append(" userActivityTimeout=").append(userActivityTimeout); |
| 2157 | } |
Andreas Gampe | 007cfa7 | 2015-03-15 14:19:43 -0700 | [diff] [blame] | 2158 | if (surfaceInsets.left != 0 || surfaceInsets.top != 0 || surfaceInsets.right != 0 || |
Andreas Gampe | 1109006 | 2015-03-16 09:45:34 -0700 | [diff] [blame] | 2159 | surfaceInsets.bottom != 0 || hasManualSurfaceInsets) { |
Alan Viverette | 49a22e8 | 2014-07-12 20:01:27 -0700 | [diff] [blame] | 2160 | sb.append(" surfaceInsets=").append(surfaceInsets); |
Alan Viverette | 5435a30 | 2015-01-29 10:25:34 -0800 | [diff] [blame] | 2161 | if (hasManualSurfaceInsets) { |
| 2162 | sb.append(" (manual)"); |
| 2163 | } |
Alan Viverette | ccb11e1 | 2014-07-08 16:04:02 -0700 | [diff] [blame] | 2164 | } |
Wale Ogunwale | 393b1c1 | 2014-10-18 16:22:01 -0700 | [diff] [blame] | 2165 | if (needsMenuKey != NEEDS_MENU_UNSET) { |
| 2166 | sb.append(" needsMenuKey="); |
| 2167 | sb.append(needsMenuKey); |
| 2168 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2169 | sb.append('}'); |
| 2170 | return sb.toString(); |
| 2171 | } |
Mitsuru Oshima | 8d11267 | 2009-04-27 12:01:23 -0700 | [diff] [blame] | 2172 | |
Mitsuru Oshima | 3d91492 | 2009-05-13 22:29:15 -0700 | [diff] [blame] | 2173 | /** |
| 2174 | * Scale the layout params' coordinates and size. |
Mitsuru Oshima | 64f5934 | 2009-06-21 00:03:11 -0700 | [diff] [blame] | 2175 | * @hide |
Mitsuru Oshima | 3d91492 | 2009-05-13 22:29:15 -0700 | [diff] [blame] | 2176 | */ |
Mitsuru Oshima | 64f5934 | 2009-06-21 00:03:11 -0700 | [diff] [blame] | 2177 | public void scale(float scale) { |
Mitsuru Oshima | 61324e5 | 2009-07-21 15:40:36 -0700 | [diff] [blame] | 2178 | x = (int) (x * scale + 0.5f); |
| 2179 | y = (int) (y * scale + 0.5f); |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 2180 | if (width > 0) { |
Mitsuru Oshima | 61324e5 | 2009-07-21 15:40:36 -0700 | [diff] [blame] | 2181 | width = (int) (width * scale + 0.5f); |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 2182 | } |
| 2183 | if (height > 0) { |
Mitsuru Oshima | 61324e5 | 2009-07-21 15:40:36 -0700 | [diff] [blame] | 2184 | height = (int) (height * scale + 0.5f); |
Mitsuru Oshima | 8d11267 | 2009-04-27 12:01:23 -0700 | [diff] [blame] | 2185 | } |
| 2186 | } |
| 2187 | |
Mitsuru Oshima | 3d91492 | 2009-05-13 22:29:15 -0700 | [diff] [blame] | 2188 | /** |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 2189 | * Backup the layout parameters used in compatibility mode. |
| 2190 | * @see LayoutParams#restore() |
Mitsuru Oshima | 3d91492 | 2009-05-13 22:29:15 -0700 | [diff] [blame] | 2191 | */ |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 2192 | void backup() { |
| 2193 | int[] backup = mCompatibilityParamsBackup; |
| 2194 | if (backup == null) { |
Mitsuru Oshima | 64f5934 | 2009-06-21 00:03:11 -0700 | [diff] [blame] | 2195 | // we backup 4 elements, x, y, width, height |
| 2196 | backup = mCompatibilityParamsBackup = new int[4]; |
Mitsuru Oshima | 3d91492 | 2009-05-13 22:29:15 -0700 | [diff] [blame] | 2197 | } |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 2198 | backup[0] = x; |
| 2199 | backup[1] = y; |
| 2200 | backup[2] = width; |
| 2201 | backup[3] = height; |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 2202 | } |
| 2203 | |
| 2204 | /** |
| 2205 | * Restore the layout params' coordinates, size and gravity |
| 2206 | * @see LayoutParams#backup() |
| 2207 | */ |
| 2208 | void restore() { |
| 2209 | int[] backup = mCompatibilityParamsBackup; |
| 2210 | if (backup != null) { |
| 2211 | x = backup[0]; |
| 2212 | y = backup[1]; |
| 2213 | width = backup[2]; |
Mitsuru Oshima | 3d91492 | 2009-05-13 22:29:15 -0700 | [diff] [blame] | 2214 | height = backup[3]; |
| 2215 | } |
| 2216 | } |
| 2217 | |
Wale Ogunwale | b6e2ead | 2016-02-15 08:28:47 -0800 | [diff] [blame] | 2218 | private CharSequence mTitle = null; |
Siva Velusamy | 0d857b9 | 2015-04-22 10:23:56 -0700 | [diff] [blame] | 2219 | |
| 2220 | /** @hide */ |
| 2221 | @Override |
| 2222 | protected void encodeProperties(@NonNull ViewHierarchyEncoder encoder) { |
| 2223 | super.encodeProperties(encoder); |
| 2224 | |
| 2225 | encoder.addProperty("x", x); |
| 2226 | encoder.addProperty("y", y); |
| 2227 | encoder.addProperty("horizontalWeight", horizontalWeight); |
| 2228 | encoder.addProperty("verticalWeight", verticalWeight); |
| 2229 | encoder.addProperty("type", type); |
| 2230 | encoder.addProperty("flags", flags); |
| 2231 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2232 | } |
| 2233 | } |