| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.view; |
| 18 |
|
| 19 |
import static android.content.pm.ActivityInfo.COLOR_MODE_DEFAULT; |
| 20 |
import static android.view.View.STATUS_BAR_DISABLE_BACK; |
| 21 |
import static android.view.View.STATUS_BAR_DISABLE_CLOCK; |
| 22 |
import static android.view.View.STATUS_BAR_DISABLE_EXPAND; |
| 23 |
import static android.view.View.STATUS_BAR_DISABLE_HOME; |
| 24 |
import static android.view.View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS; |
| 25 |
import static android.view.View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS; |
| 26 |
import static android.view.View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER; |
| 27 |
import static android.view.View.STATUS_BAR_DISABLE_RECENT; |
| 28 |
import static android.view.View.STATUS_BAR_DISABLE_SEARCH; |
| 29 |
import static android.view.View.STATUS_BAR_DISABLE_SYSTEM_INFO; |
| 30 |
import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN; |
| 31 |
import static android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; |
| 32 |
import static android.view.View.SYSTEM_UI_FLAG_IMMERSIVE; |
| 33 |
import static android.view.View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; |
| 34 |
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; |
| 35 |
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; |
| 36 |
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_STABLE; |
| 37 |
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR; |
| 38 |
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; |
| 39 |
import static android.view.View.SYSTEM_UI_FLAG_LOW_PROFILE; |
| 40 |
import static android.view.View.SYSTEM_UI_FLAG_VISIBLE; |
| 41 |
import static android.view.WindowInsets.Side.BOTTOM; |
| 42 |
import static android.view.WindowInsets.Side.LEFT; |
| 43 |
import static android.view.WindowInsets.Side.RIGHT; |
| 44 |
import static android.view.WindowInsets.Side.TOP; |
| 45 |
import static android.view.WindowInsets.Type.CAPTION_BAR; |
| 46 |
import static android.view.WindowInsets.Type.IME; |
| 47 |
import static android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES; |
| 48 |
import static android.view.WindowInsets.Type.NAVIGATION_BARS; |
| 49 |
import static android.view.WindowInsets.Type.STATUS_BARS; |
| 50 |
import static android.view.WindowInsets.Type.SYSTEM_GESTURES; |
| 51 |
import static android.view.WindowInsets.Type.TAPPABLE_ELEMENT; |
| 52 |
import static android.view.WindowInsets.Type.WINDOW_DECOR; |
| 53 |
import static android.view.WindowLayoutParamsProto.ALPHA; |
| 54 |
import static android.view.WindowLayoutParamsProto.APPEARANCE; |
| 55 |
import static android.view.WindowLayoutParamsProto.BEHAVIOR; |
| 56 |
import static android.view.WindowLayoutParamsProto.BUTTON_BRIGHTNESS; |
| 57 |
import static android.view.WindowLayoutParamsProto.COLOR_MODE; |
| 58 |
import static android.view.WindowLayoutParamsProto.FIT_IGNORE_VISIBILITY; |
| 59 |
import static android.view.WindowLayoutParamsProto.FIT_INSETS_SIDES; |
| 60 |
import static android.view.WindowLayoutParamsProto.FIT_INSETS_TYPES; |
| 61 |
import static android.view.WindowLayoutParamsProto.FLAGS; |
| 62 |
import static android.view.WindowLayoutParamsProto.FORMAT; |
| 63 |
import static android.view.WindowLayoutParamsProto.GRAVITY; |
| 64 |
import static android.view.WindowLayoutParamsProto.HAS_SYSTEM_UI_LISTENERS; |
| 65 |
import static android.view.WindowLayoutParamsProto.HEIGHT; |
| 66 |
import static android.view.WindowLayoutParamsProto.HORIZONTAL_MARGIN; |
| 67 |
import static android.view.WindowLayoutParamsProto.INPUT_FEATURE_FLAGS; |
| 68 |
import static android.view.WindowLayoutParamsProto.PREFERRED_REFRESH_RATE; |
| 69 |
import static android.view.WindowLayoutParamsProto.PRIVATE_FLAGS; |
| 70 |
import static android.view.WindowLayoutParamsProto.ROTATION_ANIMATION; |
| 71 |
import static android.view.WindowLayoutParamsProto.SCREEN_BRIGHTNESS; |
| 72 |
import static android.view.WindowLayoutParamsProto.SOFT_INPUT_MODE; |
| 73 |
import static android.view.WindowLayoutParamsProto.SUBTREE_SYSTEM_UI_VISIBILITY_FLAGS; |
| 74 |
import static android.view.WindowLayoutParamsProto.SYSTEM_UI_VISIBILITY_FLAGS; |
| 75 |
import static android.view.WindowLayoutParamsProto.TYPE; |
| 76 |
import static android.view.WindowLayoutParamsProto.USER_ACTIVITY_TIMEOUT; |
| 77 |
import static android.view.WindowLayoutParamsProto.VERTICAL_MARGIN; |
| 78 |
import static android.view.WindowLayoutParamsProto.WIDTH; |
| 79 |
import static android.view.WindowLayoutParamsProto.WINDOW_ANIMATIONS; |
| 80 |
import static android.view.WindowLayoutParamsProto.X; |
| 81 |
import static android.view.WindowLayoutParamsProto.Y; |
| 82 |
|
| 83 |
import android.Manifest.permission; |
| 84 |
import android.annotation.CallbackExecutor; |
| 85 |
import android.annotation.IntDef; |
| 86 |
import android.annotation.IntRange; |
| 87 |
import android.annotation.NonNull; |
| 88 |
import android.annotation.Nullable; |
| 89 |
import android.annotation.RequiresPermission; |
| 90 |
import android.annotation.SystemApi; |
| 91 |
import android.annotation.SystemService; |
| 92 |
import android.annotation.TestApi; |
| 93 |
import android.app.KeyguardManager; |
| 94 |
import android.app.Presentation; |
| 95 |
import android.compat.annotation.UnsupportedAppUsage; |
| 96 |
import android.content.ClipData; |
| 97 |
import android.content.Context; |
| 98 |
import android.content.pm.ActivityInfo; |
| 99 |
import android.content.res.Configuration; |
| 100 |
import android.graphics.Bitmap; |
| 101 |
import android.graphics.PixelFormat; |
| 102 |
import android.graphics.Point; |
| 103 |
import android.graphics.Rect; |
| 104 |
import android.graphics.Region; |
| 105 |
import android.os.Build; |
| 106 |
import android.os.Bundle; |
| 107 |
import android.os.IBinder; |
| 108 |
import android.os.Parcel; |
| 109 |
import android.os.Parcelable; |
| 110 |
import android.text.TextUtils; |
| 111 |
import android.util.Log; |
| 112 |
import android.util.proto.ProtoOutputStream; |
| 113 |
import android.view.Gravity.GravityFlags; |
| 114 |
import android.view.View.OnApplyWindowInsetsListener; |
| 115 |
import android.view.WindowInsets.Side; |
| 116 |
import android.view.WindowInsets.Side.InsetsSide; |
| 117 |
import android.view.WindowInsets.Type; |
| 118 |
import android.view.WindowInsets.Type.InsetsType; |
| 119 |
import android.view.accessibility.AccessibilityNodeInfo; |
| 120 |
import android.window.TaskFpsCallback; |
| 121 |
|
| 122 |
import java.lang.annotation.Retention; |
| 123 |
import java.lang.annotation.RetentionPolicy; |
| 124 |
import java.util.ArrayList; |
| 125 |
import java.util.Arrays; |
| 126 |
import java.util.List; |
| 127 |
import java.util.Objects; |
| 128 |
import java.util.Set; |
| 129 |
import java.util.concurrent.Executor; |
| 130 |
import java.util.function.Consumer; |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
@SystemService(Context.WINDOW_SERVICE) |
| 145 |
public interface WindowManager extends ViewManager { |
| 146 |
|
| 147 |
|
| 148 |
int DOCKED_INVALID = -1; |
| 149 |
|
| 150 |
int DOCKED_LEFT = 1; |
| 151 |
|
| 152 |
int DOCKED_TOP = 2; |
| 153 |
|
| 154 |
int DOCKED_RIGHT = 3; |
| 155 |
|
| 156 |
int DOCKED_BOTTOM = 4; |
| 157 |
|
| 158 |
|
| 159 |
String INPUT_CONSUMER_PIP = "pip_input_consumer"; |
| 160 |
|
| 161 |
String INPUT_CONSUMER_NAVIGATION = "nav_input_consumer"; |
| 162 |
|
| 163 |
String INPUT_CONSUMER_WALLPAPER = "wallpaper_input_consumer"; |
| 164 |
|
| 165 |
String INPUT_CONSUMER_RECENTS_ANIMATION = "recents_animation_input_consumer"; |
| 166 |
|
| 167 |
|
| 168 |
int SHELL_ROOT_LAYER_DIVIDER = 0; |
| 169 |
|
| 170 |
int SHELL_ROOT_LAYER_PIP = 1; |
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
@IntDef(prefix = { "SHELL_ROOT_LAYER_" }, value = { |
| 177 |
SHELL_ROOT_LAYER_DIVIDER, |
| 178 |
SHELL_ROOT_LAYER_PIP |
| 179 |
}) |
| 180 |
@Retention(RetentionPolicy.SOURCE) |
| 181 |
@interface ShellRootLayer {} |
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
int TRANSIT_OLD_UNSET = -1; |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
int TRANSIT_OLD_NONE = 0; |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
int TRANSIT_OLD_ACTIVITY_OPEN = 6; |
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
int TRANSIT_OLD_ACTIVITY_CLOSE = 7; |
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
int TRANSIT_OLD_TASK_OPEN = 8; |
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
int TRANSIT_OLD_TASK_CLOSE = 9; |
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
int TRANSIT_OLD_TASK_TO_FRONT = 10; |
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
int TRANSIT_OLD_TASK_TO_BACK = 11; |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
int TRANSIT_OLD_WALLPAPER_CLOSE = 12; |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
int TRANSIT_OLD_WALLPAPER_OPEN = 13; |
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
int TRANSIT_OLD_WALLPAPER_INTRA_OPEN = 14; |
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
int TRANSIT_OLD_WALLPAPER_INTRA_CLOSE = 15; |
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
int TRANSIT_OLD_TASK_OPEN_BEHIND = 16; |
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
int TRANSIT_OLD_ACTIVITY_RELAUNCH = 18; |
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
int TRANSIT_OLD_KEYGUARD_GOING_AWAY = 20; |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
int TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21; |
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
int TRANSIT_OLD_KEYGUARD_OCCLUDE = 22; |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
int TRANSIT_OLD_KEYGUARD_OCCLUDE_BY_DREAM = 33; |
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
int TRANSIT_OLD_KEYGUARD_UNOCCLUDE = 23; |
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
int TRANSIT_OLD_TRANSLUCENT_ACTIVITY_OPEN = 24; |
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
int TRANSIT_OLD_TRANSLUCENT_ACTIVITY_CLOSE = 25; |
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
int TRANSIT_OLD_CRASHING_ACTIVITY_CLOSE = 26; |
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
int TRANSIT_OLD_TASK_CHANGE_WINDOWING_MODE = 27; |
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
int TRANSIT_OLD_TASK_FRAGMENT_OPEN = 28; |
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
int TRANSIT_OLD_TASK_FRAGMENT_CLOSE = 29; |
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
int TRANSIT_OLD_TASK_FRAGMENT_CHANGE = 30; |
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
int TRANSIT_OLD_DREAM_ACTIVITY_OPEN = 31; |
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
int TRANSIT_OLD_DREAM_ACTIVITY_CLOSE = 32; |
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
@IntDef(prefix = { "TRANSIT_OLD_" }, value = { |
| 364 |
TRANSIT_OLD_UNSET, |
| 365 |
TRANSIT_OLD_NONE, |
| 366 |
TRANSIT_OLD_ACTIVITY_OPEN, |
| 367 |
TRANSIT_OLD_ACTIVITY_CLOSE, |
| 368 |
TRANSIT_OLD_TASK_OPEN, |
| 369 |
TRANSIT_OLD_TASK_CLOSE, |
| 370 |
TRANSIT_OLD_TASK_TO_FRONT, |
| 371 |
TRANSIT_OLD_TASK_TO_BACK, |
| 372 |
TRANSIT_OLD_WALLPAPER_CLOSE, |
| 373 |
TRANSIT_OLD_WALLPAPER_OPEN, |
| 374 |
TRANSIT_OLD_WALLPAPER_INTRA_OPEN, |
| 375 |
TRANSIT_OLD_WALLPAPER_INTRA_CLOSE, |
| 376 |
TRANSIT_OLD_TASK_OPEN_BEHIND, |
| 377 |
TRANSIT_OLD_ACTIVITY_RELAUNCH, |
| 378 |
TRANSIT_OLD_KEYGUARD_GOING_AWAY, |
| 379 |
TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER, |
| 380 |
TRANSIT_OLD_KEYGUARD_OCCLUDE, |
| 381 |
TRANSIT_OLD_KEYGUARD_UNOCCLUDE, |
| 382 |
TRANSIT_OLD_TRANSLUCENT_ACTIVITY_OPEN, |
| 383 |
TRANSIT_OLD_TRANSLUCENT_ACTIVITY_CLOSE, |
| 384 |
TRANSIT_OLD_CRASHING_ACTIVITY_CLOSE, |
| 385 |
TRANSIT_OLD_TASK_CHANGE_WINDOWING_MODE, |
| 386 |
TRANSIT_OLD_TASK_FRAGMENT_OPEN, |
| 387 |
TRANSIT_OLD_TASK_FRAGMENT_CLOSE, |
| 388 |
TRANSIT_OLD_TASK_FRAGMENT_CHANGE, |
| 389 |
TRANSIT_OLD_DREAM_ACTIVITY_OPEN, |
| 390 |
TRANSIT_OLD_DREAM_ACTIVITY_CLOSE |
| 391 |
}) |
| 392 |
@Retention(RetentionPolicy.SOURCE) |
| 393 |
@interface TransitionOldType {} |
| 394 |
|
| 395 |
|
| 396 |
int TRANSIT_NONE = 0; |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
int TRANSIT_OPEN = 1; |
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
int TRANSIT_CLOSE = 2; |
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
int TRANSIT_TO_FRONT = 3; |
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
int TRANSIT_TO_BACK = 4; |
| 417 |
|
| 418 |
int TRANSIT_RELAUNCH = 5; |
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
int TRANSIT_CHANGE = 6; |
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
@Deprecated |
| 432 |
int TRANSIT_KEYGUARD_GOING_AWAY = 7; |
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
int TRANSIT_KEYGUARD_OCCLUDE = 8; |
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
int TRANSIT_KEYGUARD_UNOCCLUDE = 9; |
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
int TRANSIT_PIP = 10; |
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
int TRANSIT_WAKE = 11; |
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
int TRANSIT_FIRST_CUSTOM = 12; |
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
@IntDef(prefix = { "TRANSIT_" }, value = { |
| 468 |
TRANSIT_NONE, |
| 469 |
TRANSIT_OPEN, |
| 470 |
TRANSIT_CLOSE, |
| 471 |
TRANSIT_TO_FRONT, |
| 472 |
TRANSIT_TO_BACK, |
| 473 |
TRANSIT_RELAUNCH, |
| 474 |
TRANSIT_CHANGE, |
| 475 |
TRANSIT_KEYGUARD_GOING_AWAY, |
| 476 |
TRANSIT_KEYGUARD_OCCLUDE, |
| 477 |
TRANSIT_KEYGUARD_UNOCCLUDE, |
| 478 |
TRANSIT_PIP, |
| 479 |
TRANSIT_WAKE, |
| 480 |
TRANSIT_FIRST_CUSTOM |
| 481 |
}) |
| 482 |
@Retention(RetentionPolicy.SOURCE) |
| 483 |
@interface TransitionType {} |
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE = 0x1; |
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION = 0x2; |
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER = 0x4; |
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY_SUBTLE_ANIMATION = 0x8; |
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT = 0x16; |
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
int TRANSIT_FLAG_APP_CRASHED = 0x10; |
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
int TRANSIT_FLAG_OPEN_BEHIND = 0x20; |
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
int TRANSIT_FLAG_KEYGUARD_LOCKED = 0x40; |
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
int TRANSIT_FLAG_IS_RECENTS = 0x80; |
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY = 0x100; |
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
@IntDef(flag = true, prefix = { "TRANSIT_FLAG_" }, value = { |
| 552 |
TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE, |
| 553 |
TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION, |
| 554 |
TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER, |
| 555 |
TRANSIT_FLAG_KEYGUARD_GOING_AWAY_SUBTLE_ANIMATION, |
| 556 |
TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT, |
| 557 |
TRANSIT_FLAG_APP_CRASHED, |
| 558 |
TRANSIT_FLAG_OPEN_BEHIND, |
| 559 |
TRANSIT_FLAG_KEYGUARD_LOCKED, |
| 560 |
TRANSIT_FLAG_IS_RECENTS, |
| 561 |
TRANSIT_FLAG_KEYGUARD_GOING_AWAY |
| 562 |
}) |
| 563 |
@Retention(RetentionPolicy.SOURCE) |
| 564 |
@interface TransitionFlags {} |
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
int REMOVE_CONTENT_MODE_UNDEFINED = 0; |
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
int REMOVE_CONTENT_MODE_MOVE_TO_PRIMARY = 1; |
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
|
| 584 |
int REMOVE_CONTENT_MODE_DESTROY = 2; |
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
@IntDef(prefix = { "REMOVE_CONTENT_MODE_" }, value = { |
| 590 |
REMOVE_CONTENT_MODE_UNDEFINED, |
| 591 |
REMOVE_CONTENT_MODE_MOVE_TO_PRIMARY, |
| 592 |
REMOVE_CONTENT_MODE_DESTROY, |
| 593 |
}) |
| 594 |
@interface RemoveContentMode {} |
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
|
| 599 |
|
| 600 |
@TestApi |
| 601 |
int DISPLAY_IME_POLICY_LOCAL = 0; |
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
@TestApi |
| 608 |
int DISPLAY_IME_POLICY_FALLBACK_DISPLAY = 1; |
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
@TestApi |
| 618 |
int DISPLAY_IME_POLICY_HIDE = 2; |
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
@IntDef({ |
| 624 |
DISPLAY_IME_POLICY_LOCAL, |
| 625 |
DISPLAY_IME_POLICY_FALLBACK_DISPLAY, |
| 626 |
DISPLAY_IME_POLICY_HIDE, |
| 627 |
}) |
| 628 |
@interface DisplayImePolicy {} |
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
public static class BadTokenException extends RuntimeException { |
| 636 |
public BadTokenException() { |
| 637 |
} |
| 638 |
|
| 639 |
public BadTokenException(String name) { |
| 640 |
super(name); |
| 641 |
} |
| 642 |
} |
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
public static class InvalidDisplayException extends RuntimeException { |
| 649 |
public InvalidDisplayException() { |
| 650 |
} |
| 651 |
|
| 652 |
public InvalidDisplayException(String name) { |
| 653 |
super(name); |
| 654 |
} |
| 655 |
} |
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
|
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
@Deprecated |
| 676 |
public Display getDefaultDisplay(); |
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
public void removeViewImmediate(View view); |
| 687 |
|
| 688 |
|
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
|
| 695 |
|
| 696 |
|
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
|
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
default @NonNull WindowMetrics getCurrentWindowMetrics() { |
| 709 |
throw new UnsupportedOperationException(); |
| 710 |
} |
| 711 |
|
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
|
| 717 |
|
| 718 |
|
| 719 |
|
| 720 |
|
| 721 |
|
| 722 |
|
| 723 |
|
| 724 |
|
| 725 |
|
| 726 |
|
| 727 |
|
| 728 |
|
| 729 |
|
| 730 |
|
| 731 |
|
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
|
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
default @NonNull WindowMetrics getMaximumWindowMetrics() { |
| 742 |
throw new UnsupportedOperationException(); |
| 743 |
} |
| 744 |
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
|
| 749 |
|
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
|
| 754 |
|
| 755 |
default @NonNull Set<WindowMetrics> getPossibleMaximumWindowMetrics(int displayId) { |
| 756 |
throw new UnsupportedOperationException(); |
| 757 |
} |
| 758 |
|
| 759 |
|
| 760 |
|
| 761 |
|
| 762 |
|
| 763 |
|
| 764 |
public interface KeyboardShortcutsReceiver { |
| 765 |
|
| 766 |
|
| 767 |
|
| 768 |
|
| 769 |
|
| 770 |
void onKeyboardShortcutsReceived(List<KeyboardShortcutGroup> result); |
| 771 |
} |
| 772 |
|
| 773 |
|
| 774 |
|
| 775 |
|
| 776 |
|
| 777 |
int TAKE_SCREENSHOT_FULLSCREEN = 1; |
| 778 |
|
| 779 |
|
| 780 |
|
| 781 |
|
| 782 |
|
| 783 |
int TAKE_SCREENSHOT_PROVIDED_IMAGE = 3; |
| 784 |
|
| 785 |
|
| 786 |
|
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
@IntDef({TAKE_SCREENSHOT_FULLSCREEN, |
| 791 |
TAKE_SCREENSHOT_PROVIDED_IMAGE}) |
| 792 |
@interface ScreenshotType {} |
| 793 |
|
| 794 |
|
| 795 |
|
| 796 |
|
| 797 |
|
| 798 |
|
| 799 |
@IntDef({ScreenshotSource.SCREENSHOT_GLOBAL_ACTIONS, |
| 800 |
ScreenshotSource.SCREENSHOT_KEY_CHORD, |
| 801 |
ScreenshotSource.SCREENSHOT_KEY_OTHER, |
| 802 |
ScreenshotSource.SCREENSHOT_OVERVIEW, |
| 803 |
ScreenshotSource.SCREENSHOT_ACCESSIBILITY_ACTIONS, |
| 804 |
ScreenshotSource.SCREENSHOT_OTHER, |
| 805 |
ScreenshotSource.SCREENSHOT_VENDOR_GESTURE}) |
| 806 |
@interface ScreenshotSource { |
| 807 |
int SCREENSHOT_GLOBAL_ACTIONS = 0; |
| 808 |
int SCREENSHOT_KEY_CHORD = 1; |
| 809 |
int SCREENSHOT_KEY_OTHER = 2; |
| 810 |
int SCREENSHOT_OVERVIEW = 3; |
| 811 |
int SCREENSHOT_ACCESSIBILITY_ACTIONS = 4; |
| 812 |
int SCREENSHOT_OTHER = 5; |
| 813 |
int SCREENSHOT_VENDOR_GESTURE = 6; |
| 814 |
} |
| 815 |
|
| 816 |
|
| 817 |
|
| 818 |
|
| 819 |
|
| 820 |
|
| 821 |
|
| 822 |
|
| 823 |
|
| 824 |
|
| 825 |
|
| 826 |
|
| 827 |
|
| 828 |
|
| 829 |
|
| 830 |
|
| 831 |
|
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
|
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
String PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION = |
| 853 |
"android.window.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION"; |
| 854 |
|
| 855 |
|
| 856 |
|
| 857 |
|
| 858 |
public static final String PARCEL_KEY_SHORTCUTS_ARRAY = "shortcuts_array"; |
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
|
| 867 |
public void requestAppKeyboardShortcuts(final KeyboardShortcutsReceiver receiver, int deviceId); |
| 868 |
|
| 869 |
|
| 870 |
|
| 871 |
|
| 872 |
|
| 873 |
|
| 874 |
|
| 875 |
|
| 876 |
|
| 877 |
@SystemApi |
| 878 |
@RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) |
| 879 |
public Region getCurrentImeTouchRegion(); |
| 880 |
|
| 881 |
|
| 882 |
|
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
@TestApi |
| 892 |
default void setShouldShowWithInsecureKeyguard(int displayId, boolean shouldShow) { |
| 893 |
} |
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
|
| 898 |
|
| 899 |
|
| 900 |
|
| 901 |
|
| 902 |
|
| 903 |
|
| 904 |
|
| 905 |
|
| 906 |
@TestApi |
| 907 |
default void setShouldShowSystemDecors(int displayId, boolean shouldShow) { |
| 908 |
} |
| 909 |
|
| 910 |
|
| 911 |
|
| 912 |
|
| 913 |
|
| 914 |
|
| 915 |
|
| 916 |
|
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
@TestApi |
| 921 |
default boolean shouldShowSystemDecors(int displayId) { |
| 922 |
return false; |
| 923 |
} |
| 924 |
|
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
|
| 929 |
|
| 930 |
|
| 931 |
|
| 932 |
@TestApi |
| 933 |
default void setDisplayImePolicy(int displayId, @DisplayImePolicy int imePolicy) { |
| 934 |
} |
| 935 |
|
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
|
| 940 |
|
| 941 |
|
| 942 |
|
| 943 |
@TestApi |
| 944 |
default @DisplayImePolicy int getDisplayImePolicy(int displayId) { |
| 945 |
return DISPLAY_IME_POLICY_FALLBACK_DISPLAY; |
| 946 |
} |
| 947 |
|
| 948 |
|
| 949 |
|
| 950 |
|
| 951 |
|
| 952 |
|
| 953 |
|
| 954 |
|
| 955 |
|
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
|
| 960 |
|
| 961 |
|
| 962 |
|
| 963 |
|
| 964 |
|
| 965 |
|
| 966 |
default boolean isCrossWindowBlurEnabled() { |
| 967 |
return false; |
| 968 |
} |
| 969 |
|
| 970 |
|
| 971 |
|
| 972 |
|
| 973 |
|
| 974 |
|
| 975 |
|
| 976 |
|
| 977 |
|
| 978 |
|
| 979 |
|
| 980 |
|
| 981 |
|
| 982 |
|
| 983 |
|
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
|
| 988 |
|
| 989 |
|
| 990 |
|
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
|
| 995 |
|
| 996 |
default void addCrossWindowBlurEnabledListener(@NonNull Consumer<Boolean> listener) { |
| 997 |
} |
| 998 |
|
| 999 |
|
| 1000 |
|
| 1001 |
|
| 1002 |
|
| 1003 |
|
| 1004 |
|
| 1005 |
|
| 1006 |
|
| 1007 |
|
| 1008 |
|
| 1009 |
|
| 1010 |
|
| 1011 |
|
| 1012 |
|
| 1013 |
|
| 1014 |
|
| 1015 |
|
| 1016 |
|
| 1017 |
|
| 1018 |
|
| 1019 |
|
| 1020 |
|
| 1021 |
|
| 1022 |
|
| 1023 |
|
| 1024 |
default void addCrossWindowBlurEnabledListener(@NonNull @CallbackExecutor Executor executor, |
| 1025 |
@NonNull Consumer<Boolean> listener) { |
| 1026 |
} |
| 1027 |
|
| 1028 |
|
| 1029 |
|
| 1030 |
|
| 1031 |
|
| 1032 |
|
| 1033 |
|
| 1034 |
|
| 1035 |
default void removeCrossWindowBlurEnabledListener(@NonNull Consumer<Boolean> listener) { |
| 1036 |
} |
| 1037 |
|
| 1038 |
|
| 1039 |
|
| 1040 |
|
| 1041 |
static String transitTypeToString(@TransitionType int type) { |
| 1042 |
switch (type) { |
| 1043 |
case TRANSIT_NONE: return "NONE"; |
| 1044 |
case TRANSIT_OPEN: return "OPEN"; |
| 1045 |
case TRANSIT_CLOSE: return "CLOSE"; |
| 1046 |
case TRANSIT_TO_FRONT: return "TO_FRONT"; |
| 1047 |
case TRANSIT_TO_BACK: return "TO_BACK"; |
| 1048 |
case TRANSIT_RELAUNCH: return "RELAUNCH"; |
| 1049 |
case TRANSIT_CHANGE: return "CHANGE"; |
| 1050 |
case TRANSIT_KEYGUARD_GOING_AWAY: return "KEYGUARD_GOING_AWAY"; |
| 1051 |
case TRANSIT_KEYGUARD_OCCLUDE: return "KEYGUARD_OCCLUDE"; |
| 1052 |
case TRANSIT_KEYGUARD_UNOCCLUDE: return "KEYGUARD_UNOCCLUDE"; |
| 1053 |
case TRANSIT_PIP: return "PIP"; |
| 1054 |
case TRANSIT_WAKE: return "WAKE"; |
| 1055 |
case TRANSIT_FIRST_CUSTOM: return "FIRST_CUSTOM"; |
| 1056 |
default: |
| 1057 |
if (type > TRANSIT_FIRST_CUSTOM) { |
| 1058 |
return "FIRST_CUSTOM+" + (type - TRANSIT_FIRST_CUSTOM); |
| 1059 |
} |
| 1060 |
return "UNKNOWN(" + type + ")"; |
| 1061 |
} |
| 1062 |
} |
| 1063 |
|
| 1064 |
|
| 1065 |
|
| 1066 |
|
| 1067 |
|
| 1068 |
static float fixScale(float scale) { |
| 1069 |
return Math.max(Math.min(scale, 20), 0); |
| 1070 |
} |
| 1071 |
|
| 1072 |
public static class LayoutParams extends ViewGroup.LayoutParams implements Parcelable { |
| 1073 |
|
| 1074 |
|
| 1075 |
|
| 1076 |
|
| 1077 |
|
| 1078 |
@ViewDebug.ExportedProperty |
| 1079 |
public int x; |
| 1080 |
|
| 1081 |
|
| 1082 |
|
| 1083 |
|
| 1084 |
|
| 1085 |
|
| 1086 |
@ViewDebug.ExportedProperty |
| 1087 |
public int y; |
| 1088 |
|
| 1089 |
|
| 1090 |
|
| 1091 |
|
| 1092 |
|
| 1093 |
|
| 1094 |
|
| 1095 |
@ViewDebug.ExportedProperty |
| 1096 |
public float horizontalWeight; |
| 1097 |
|
| 1098 |
|
| 1099 |
|
| 1100 |
|
| 1101 |
|
| 1102 |
|
| 1103 |
|
| 1104 |
@ViewDebug.ExportedProperty |
| 1105 |
public float verticalWeight; |
| 1106 |
|
| 1107 |
|
| 1108 |
|
| 1109 |
|
| 1110 |
|
| 1111 |
|
| 1112 |
|
| 1113 |
|
| 1114 |
|
| 1115 |
|
| 1116 |
|
| 1117 |
|
| 1118 |
|
| 1119 |
|
| 1120 |
|
| 1121 |
|
| 1122 |
|
| 1123 |
|
| 1124 |
|
| 1125 |
|
| 1126 |
|
| 1127 |
|
| 1128 |
|
| 1129 |
|
| 1130 |
|
| 1131 |
|
| 1132 |
|
| 1133 |
|
| 1134 |
|
| 1135 |
|
| 1136 |
|
| 1137 |
|
| 1138 |
|
| 1139 |
|
| 1140 |
|
| 1141 |
|
| 1142 |
|
| 1143 |
|
| 1144 |
|
| 1145 |
|
| 1146 |
|
| 1147 |
|
| 1148 |
|
| 1149 |
|
| 1150 |
|
| 1151 |
@ViewDebug.ExportedProperty(mapping = { |
| 1152 |
@ViewDebug.IntToString(from = TYPE_BASE_APPLICATION, |
| 1153 |
to = "BASE_APPLICATION"), |
| 1154 |
@ViewDebug.IntToString(from = TYPE_APPLICATION, |
| 1155 |
to = "APPLICATION"), |
| 1156 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_STARTING, |
| 1157 |
to = "APPLICATION_STARTING"), |
| 1158 |
@ViewDebug.IntToString(from = TYPE_DRAWN_APPLICATION, |
| 1159 |
to = "DRAWN_APPLICATION"), |
| 1160 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_PANEL, |
| 1161 |
to = "APPLICATION_PANEL"), |
| 1162 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_MEDIA, |
| 1163 |
to = "APPLICATION_MEDIA"), |
| 1164 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_SUB_PANEL, |
| 1165 |
to = "APPLICATION_SUB_PANEL"), |
| 1166 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_ABOVE_SUB_PANEL, |
| 1167 |
to = "APPLICATION_ABOVE_SUB_PANEL"), |
| 1168 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_ATTACHED_DIALOG, |
| 1169 |
to = "APPLICATION_ATTACHED_DIALOG"), |
| 1170 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_MEDIA_OVERLAY, |
| 1171 |
to = "APPLICATION_MEDIA_OVERLAY"), |
| 1172 |
@ViewDebug.IntToString(from = TYPE_STATUS_BAR, |
| 1173 |
to = "STATUS_BAR"), |
| 1174 |
@ViewDebug.IntToString(from = TYPE_SEARCH_BAR, |
| 1175 |
to = "SEARCH_BAR"), |
| 1176 |
@ViewDebug.IntToString(from = TYPE_PHONE, |
| 1177 |
to = "PHONE"), |
| 1178 |
@ViewDebug.IntToString(from = TYPE_SYSTEM_ALERT, |
| 1179 |
to = "SYSTEM_ALERT"), |
| 1180 |
@ViewDebug.IntToString(from = TYPE_TOAST, |
| 1181 |
to = "TOAST"), |
| 1182 |
@ViewDebug.IntToString(from = TYPE_SYSTEM_OVERLAY, |
| 1183 |
to = "SYSTEM_OVERLAY"), |
| 1184 |
@ViewDebug.IntToString(from = TYPE_PRIORITY_PHONE, |
| 1185 |
to = "PRIORITY_PHONE"), |
| 1186 |
@ViewDebug.IntToString(from = TYPE_SYSTEM_DIALOG, |
| 1187 |
to = "SYSTEM_DIALOG"), |
| 1188 |
@ViewDebug.IntToString(from = TYPE_KEYGUARD_DIALOG, |
| 1189 |
to = "KEYGUARD_DIALOG"), |
| 1190 |
@ViewDebug.IntToString(from = TYPE_SYSTEM_ERROR, |
| 1191 |
to = "SYSTEM_ERROR"), |
| 1192 |
@ViewDebug.IntToString(from = TYPE_INPUT_METHOD, |
| 1193 |
to = "INPUT_METHOD"), |
| 1194 |
@ViewDebug.IntToString(from = TYPE_INPUT_METHOD_DIALOG, |
| 1195 |
to = "INPUT_METHOD_DIALOG"), |
| 1196 |
@ViewDebug.IntToString(from = TYPE_WALLPAPER, |
| 1197 |
to = "WALLPAPER"), |
| 1198 |
@ViewDebug.IntToString(from = TYPE_STATUS_BAR_PANEL, |
| 1199 |
to = "STATUS_BAR_PANEL"), |
| 1200 |
@ViewDebug.IntToString(from = TYPE_SECURE_SYSTEM_OVERLAY, |
| 1201 |
to = "SECURE_SYSTEM_OVERLAY"), |
| 1202 |
@ViewDebug.IntToString(from = TYPE_DRAG, |
| 1203 |
to = "DRAG"), |
| 1204 |
@ViewDebug.IntToString(from = TYPE_STATUS_BAR_SUB_PANEL, |
| 1205 |
to = "STATUS_BAR_SUB_PANEL"), |
| 1206 |
@ViewDebug.IntToString(from = TYPE_POINTER, |
| 1207 |
to = "POINTER"), |
| 1208 |
@ViewDebug.IntToString(from = TYPE_NAVIGATION_BAR, |
| 1209 |
to = "NAVIGATION_BAR"), |
| 1210 |
@ViewDebug.IntToString(from = TYPE_VOLUME_OVERLAY, |
| 1211 |
to = "VOLUME_OVERLAY"), |
| 1212 |
@ViewDebug.IntToString(from = TYPE_BOOT_PROGRESS, |
| 1213 |
to = "BOOT_PROGRESS"), |
| 1214 |
@ViewDebug.IntToString(from = TYPE_INPUT_CONSUMER, |
| 1215 |
to = "INPUT_CONSUMER"), |
| 1216 |
@ViewDebug.IntToString(from = TYPE_NAVIGATION_BAR_PANEL, |
| 1217 |
to = "NAVIGATION_BAR_PANEL"), |
| 1218 |
@ViewDebug.IntToString(from = TYPE_DISPLAY_OVERLAY, |
| 1219 |
to = "DISPLAY_OVERLAY"), |
| 1220 |
@ViewDebug.IntToString(from = TYPE_MAGNIFICATION_OVERLAY, |
| 1221 |
to = "MAGNIFICATION_OVERLAY"), |
| 1222 |
@ViewDebug.IntToString(from = TYPE_PRESENTATION, |
| 1223 |
to = "PRESENTATION"), |
| 1224 |
@ViewDebug.IntToString(from = TYPE_PRIVATE_PRESENTATION, |
| 1225 |
to = "PRIVATE_PRESENTATION"), |
| 1226 |
@ViewDebug.IntToString(from = TYPE_VOICE_INTERACTION, |
| 1227 |
to = "VOICE_INTERACTION"), |
| 1228 |
@ViewDebug.IntToString(from = TYPE_VOICE_INTERACTION_STARTING, |
| 1229 |
to = "VOICE_INTERACTION_STARTING"), |
| 1230 |
@ViewDebug.IntToString(from = TYPE_DOCK_DIVIDER, |
| 1231 |
to = "DOCK_DIVIDER"), |
| 1232 |
@ViewDebug.IntToString(from = TYPE_QS_DIALOG, |
| 1233 |
to = "QS_DIALOG"), |
| 1234 |
@ViewDebug.IntToString(from = TYPE_SCREENSHOT, |
| 1235 |
to = "SCREENSHOT"), |
| 1236 |
@ViewDebug.IntToString(from = TYPE_APPLICATION_OVERLAY, |
| 1237 |
to = "APPLICATION_OVERLAY") |
| 1238 |
}) |
| 1239 |
@WindowType |
| 1240 |
public int type; |
| 1241 |
|
| 1242 |
|
| 1243 |
|
| 1244 |
|
| 1245 |
public static final int FIRST_APPLICATION_WINDOW = 1; |
| 1246 |
|
| 1247 |
|
| 1248 |
|
| 1249 |
|
| 1250 |
|
| 1251 |
|
| 1252 |
|
| 1253 |
public static final int TYPE_BASE_APPLICATION = 1; |
| 1254 |
|
| 1255 |
|
| 1256 |
|
| 1257 |
|
| 1258 |
|
| 1259 |
|
| 1260 |
public static final int TYPE_APPLICATION = 2; |
| 1261 |
|
| 1262 |
|
| 1263 |
|
| 1264 |
|
| 1265 |
|
| 1266 |
|
| 1267 |
|
| 1268 |
|
| 1269 |
public static final int TYPE_APPLICATION_STARTING = 3; |
| 1270 |
|
| 1271 |
|
| 1272 |
|
| 1273 |
|
| 1274 |
|
| 1275 |
|
| 1276 |
public static final int TYPE_DRAWN_APPLICATION = 4; |
| 1277 |
|
| 1278 |
|
| 1279 |
|
| 1280 |
|
| 1281 |
public static final int LAST_APPLICATION_WINDOW = 99; |
| 1282 |
|
| 1283 |
|
| 1284 |
|
| 1285 |
|
| 1286 |
|
| 1287 |
|
| 1288 |
|
| 1289 |
public static final int FIRST_SUB_WINDOW = 1000; |
| 1290 |
|
| 1291 |
|
| 1292 |
|
| 1293 |
|
| 1294 |
|
| 1295 |
public static final int TYPE_APPLICATION_PANEL = FIRST_SUB_WINDOW; |
| 1296 |
|
| 1297 |
|
| 1298 |
|
| 1299 |
|
| 1300 |
|
| 1301 |
public static final int TYPE_APPLICATION_MEDIA = FIRST_SUB_WINDOW + 1; |
| 1302 |
|
| 1303 |
|
| 1304 |
|
| 1305 |
|
| 1306 |
|
| 1307 |
|
| 1308 |
public static final int TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW + 2; |
| 1309 |
|
| 1310 |
|
| 1311 |
|
| 1312 |
|
| 1313 |
|
| 1314 |
public static final int TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW + 3; |
| 1315 |
|
| 1316 |
|
| 1317 |
|
| 1318 |
|
| 1319 |
|
| 1320 |
|
| 1321 |
|
| 1322 |
|
| 1323 |
@UnsupportedAppUsage |
| 1324 |
public static final int TYPE_APPLICATION_MEDIA_OVERLAY = FIRST_SUB_WINDOW + 4; |
| 1325 |
|
| 1326 |
|
| 1327 |
|
| 1328 |
|
| 1329 |
|
| 1330 |
|
| 1331 |
|
| 1332 |
public static final int TYPE_APPLICATION_ABOVE_SUB_PANEL = FIRST_SUB_WINDOW + 5; |
| 1333 |
|
| 1334 |
|
| 1335 |
|
| 1336 |
|
| 1337 |
public static final int LAST_SUB_WINDOW = 1999; |
| 1338 |
|
| 1339 |
|
| 1340 |
|
| 1341 |
|
| 1342 |
|
| 1343 |
public static final int FIRST_SYSTEM_WINDOW = 2000; |
| 1344 |
|
| 1345 |
|
| 1346 |
|
| 1347 |
|
| 1348 |
|
| 1349 |
|
| 1350 |
|
| 1351 |
public static final int TYPE_STATUS_BAR = FIRST_SYSTEM_WINDOW; |
| 1352 |
|
| 1353 |
|
| 1354 |
|
| 1355 |
|
| 1356 |
|
| 1357 |
|
| 1358 |
public static final int TYPE_SEARCH_BAR = FIRST_SYSTEM_WINDOW+1; |
| 1359 |
|
| 1360 |
|
| 1361 |
|
| 1362 |
|
| 1363 |
|
| 1364 |
|
| 1365 |
|
| 1366 |
|
| 1367 |
|
| 1368 |
@Deprecated |
| 1369 |
public static final int TYPE_PHONE = FIRST_SYSTEM_WINDOW+2; |
| 1370 |
|
| 1371 |
|
| 1372 |
|
| 1373 |
|
| 1374 |
|
| 1375 |
|
| 1376 |
|
| 1377 |
@Deprecated |
| 1378 |
public static final int TYPE_SYSTEM_ALERT = FIRST_SYSTEM_WINDOW+3; |
| 1379 |
|
| 1380 |
|
| 1381 |
|
| 1382 |
|
| 1383 |
|
| 1384 |
|
| 1385 |
public static final int TYPE_KEYGUARD = FIRST_SYSTEM_WINDOW+4; |
| 1386 |
|
| 1387 |
|
| 1388 |
|
| 1389 |
|
| 1390 |
|
| 1391 |
|
| 1392 |
@Deprecated |
| 1393 |
public static final int TYPE_TOAST = FIRST_SYSTEM_WINDOW+5; |
| 1394 |
|
| 1395 |
|
| 1396 |
|
| 1397 |
|
| 1398 |
|
| 1399 |
|
| 1400 |
|
| 1401 |
|
| 1402 |
@Deprecated |
| 1403 |
public static final int TYPE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+6; |
| 1404 |
|
| 1405 |
|
| 1406 |
|
| 1407 |
|
| 1408 |
|
| 1409 |
|
| 1410 |
|
| 1411 |
|
| 1412 |
@Deprecated |
| 1413 |
public static final int TYPE_PRIORITY_PHONE = FIRST_SYSTEM_WINDOW+7; |
| 1414 |
|
| 1415 |
|
| 1416 |
|
| 1417 |
|
| 1418 |
|
| 1419 |
public static final int TYPE_SYSTEM_DIALOG = FIRST_SYSTEM_WINDOW+8; |
| 1420 |
|
| 1421 |
|
| 1422 |
|
| 1423 |
|
| 1424 |
|
| 1425 |
public static final int TYPE_KEYGUARD_DIALOG = FIRST_SYSTEM_WINDOW+9; |
| 1426 |
|
| 1427 |
|
| 1428 |
|
| 1429 |
|
| 1430 |
|
| 1431 |
|
| 1432 |
|
| 1433 |
@Deprecated |
| 1434 |
public static final int TYPE_SYSTEM_ERROR = FIRST_SYSTEM_WINDOW+10; |
| 1435 |
|
| 1436 |
|
| 1437 |
|
| 1438 |
|
| 1439 |
|
| 1440 |
|
| 1441 |
|
| 1442 |
public static final int TYPE_INPUT_METHOD = FIRST_SYSTEM_WINDOW+11; |
| 1443 |
|
| 1444 |
|
| 1445 |
|
| 1446 |
|
| 1447 |
|
| 1448 |
|
| 1449 |
public static final int TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12; |
| 1450 |
|
| 1451 |
|
| 1452 |
|
| 1453 |
|
| 1454 |
|
| 1455 |
|
| 1456 |
public static final int TYPE_WALLPAPER = FIRST_SYSTEM_WINDOW+13; |
| 1457 |
|
| 1458 |
|
| 1459 |
|
| 1460 |
|
| 1461 |
|
| 1462 |
|
| 1463 |
|
| 1464 |
public static final int TYPE_STATUS_BAR_PANEL = FIRST_SYSTEM_WINDOW+14; |
| 1465 |
|
| 1466 |
|
| 1467 |
|
| 1468 |
|
| 1469 |
|
| 1470 |
|
| 1471 |
|
| 1472 |
|
| 1473 |
|
| 1474 |
|
| 1475 |
|
| 1476 |
|
| 1477 |
|
| 1478 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 1479 |
public static final int TYPE_SECURE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+15; |
| 1480 |
|
| 1481 |
|
| 1482 |
|
| 1483 |
|
| 1484 |
|
| 1485 |
|
| 1486 |
|
| 1487 |
public static final int TYPE_DRAG = FIRST_SYSTEM_WINDOW+16; |
| 1488 |
|
| 1489 |
|
| 1490 |
|
| 1491 |
|
| 1492 |
|
| 1493 |
|
| 1494 |
|
| 1495 |
|
| 1496 |
public static final int TYPE_STATUS_BAR_SUB_PANEL = FIRST_SYSTEM_WINDOW+17; |
| 1497 |
|
| 1498 |
|
| 1499 |
|
| 1500 |
|
| 1501 |
|
| 1502 |
|
| 1503 |
public static final int TYPE_POINTER = FIRST_SYSTEM_WINDOW+18; |
| 1504 |
|
| 1505 |
|
| 1506 |
|
| 1507 |
|
| 1508 |
|
| 1509 |
|
| 1510 |
public static final int TYPE_NAVIGATION_BAR = FIRST_SYSTEM_WINDOW+19; |
| 1511 |
|
| 1512 |
|
| 1513 |
|
| 1514 |
|
| 1515 |
|
| 1516 |
|
| 1517 |
|
| 1518 |
public static final int TYPE_VOLUME_OVERLAY = FIRST_SYSTEM_WINDOW+20; |
| 1519 |
|
| 1520 |
|
| 1521 |
|
| 1522 |
|
| 1523 |
|
| 1524 |
|
| 1525 |
|
| 1526 |
public static final int TYPE_BOOT_PROGRESS = FIRST_SYSTEM_WINDOW+21; |
| 1527 |
|
| 1528 |
|
| 1529 |
|
| 1530 |
|
| 1531 |
|
| 1532 |
|
| 1533 |
public static final int TYPE_INPUT_CONSUMER = FIRST_SYSTEM_WINDOW+22; |
| 1534 |
|
| 1535 |
|
| 1536 |
|
| 1537 |
|
| 1538 |
|
| 1539 |
|
| 1540 |
public static final int TYPE_NAVIGATION_BAR_PANEL = FIRST_SYSTEM_WINDOW+24; |
| 1541 |
|
| 1542 |
|
| 1543 |
|
| 1544 |
|
| 1545 |
|
| 1546 |
|
| 1547 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 1548 |
public static final int TYPE_DISPLAY_OVERLAY = FIRST_SYSTEM_WINDOW+26; |
| 1549 |
|
| 1550 |
|
| 1551 |
|
| 1552 |
|
| 1553 |
|
| 1554 |
|
| 1555 |
|
| 1556 |
public static final int TYPE_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW+27; |
| 1557 |
|
| 1558 |
|
| 1559 |
|
| 1560 |
|
| 1561 |
|
| 1562 |
public static final int TYPE_PRIVATE_PRESENTATION = FIRST_SYSTEM_WINDOW+30; |
| 1563 |
|
| 1564 |
|
| 1565 |
|
| 1566 |
|
| 1567 |
|
| 1568 |
public static final int TYPE_VOICE_INTERACTION = FIRST_SYSTEM_WINDOW+31; |
| 1569 |
|
| 1570 |
|
| 1571 |
|
| 1572 |
|
| 1573 |
|
| 1574 |
|
| 1575 |
|
| 1576 |
|
| 1577 |
|
| 1578 |
|
| 1579 |
|
| 1580 |
|
| 1581 |
public static final int TYPE_ACCESSIBILITY_OVERLAY = FIRST_SYSTEM_WINDOW+32; |
| 1582 |
|
| 1583 |
|
| 1584 |
|
| 1585 |
|
| 1586 |
|
| 1587 |
public static final int TYPE_VOICE_INTERACTION_STARTING = FIRST_SYSTEM_WINDOW+33; |
| 1588 |
|
| 1589 |
|
| 1590 |
|
| 1591 |
|
| 1592 |
|
| 1593 |
|
| 1594 |
public static final int TYPE_DOCK_DIVIDER = FIRST_SYSTEM_WINDOW+34; |
| 1595 |
|
| 1596 |
|
| 1597 |
|
| 1598 |
|
| 1599 |
|
| 1600 |
|
| 1601 |
public static final int TYPE_QS_DIALOG = FIRST_SYSTEM_WINDOW+35; |
| 1602 |
|
| 1603 |
|
| 1604 |
|
| 1605 |
|
| 1606 |
|
| 1607 |
|
| 1608 |
|
| 1609 |
public static final int TYPE_SCREENSHOT = FIRST_SYSTEM_WINDOW + 36; |
| 1610 |
|
| 1611 |
|
| 1612 |
|
| 1613 |
|
| 1614 |
|
| 1615 |
|
| 1616 |
public static final int TYPE_PRESENTATION = FIRST_SYSTEM_WINDOW + 37; |
| 1617 |
|
| 1618 |
|
| 1619 |
|
| 1620 |
|
| 1621 |
|
| 1622 |
|
| 1623 |
|
| 1624 |
|
| 1625 |
|
| 1626 |
|
| 1627 |
|
| 1628 |
|
| 1629 |
|
| 1630 |
|
| 1631 |
|
| 1632 |
|
| 1633 |
public static final int TYPE_APPLICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 38; |
| 1634 |
|
| 1635 |
|
| 1636 |
|
| 1637 |
|
| 1638 |
|
| 1639 |
|
| 1640 |
public static final int TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 39; |
| 1641 |
|
| 1642 |
|
| 1643 |
|
| 1644 |
|
| 1645 |
|
| 1646 |
|
| 1647 |
|
| 1648 |
|
| 1649 |
public static final int TYPE_NOTIFICATION_SHADE = FIRST_SYSTEM_WINDOW + 40; |
| 1650 |
|
| 1651 |
|
| 1652 |
|
| 1653 |
|
| 1654 |
|
| 1655 |
|
| 1656 |
|
| 1657 |
public static final int TYPE_STATUS_BAR_ADDITIONAL = FIRST_SYSTEM_WINDOW + 41; |
| 1658 |
|
| 1659 |
|
| 1660 |
|
| 1661 |
|
| 1662 |
public static final int LAST_SYSTEM_WINDOW = 2999; |
| 1663 |
|
| 1664 |
|
| 1665 |
|
| 1666 |
|
| 1667 |
|
| 1668 |
public static final int INVALID_WINDOW_TYPE = -1; |
| 1669 |
|
| 1670 |
|
| 1671 |
|
| 1672 |
|
| 1673 |
@IntDef(prefix = "TYPE_", value = { |
| 1674 |
TYPE_BASE_APPLICATION, |
| 1675 |
TYPE_APPLICATION, |
| 1676 |
TYPE_APPLICATION_STARTING, |
| 1677 |
TYPE_DRAWN_APPLICATION, |
| 1678 |
TYPE_APPLICATION_PANEL, |
| 1679 |
TYPE_APPLICATION_MEDIA, |
| 1680 |
TYPE_APPLICATION_SUB_PANEL, |
| 1681 |
TYPE_APPLICATION_ATTACHED_DIALOG, |
| 1682 |
TYPE_APPLICATION_MEDIA_OVERLAY, |
| 1683 |
TYPE_APPLICATION_ABOVE_SUB_PANEL, |
| 1684 |
TYPE_STATUS_BAR, |
| 1685 |
TYPE_SEARCH_BAR, |
| 1686 |
TYPE_PHONE, |
| 1687 |
TYPE_SYSTEM_ALERT, |
| 1688 |
TYPE_KEYGUARD, |
| 1689 |
TYPE_TOAST, |
| 1690 |
TYPE_SYSTEM_OVERLAY, |
| 1691 |
TYPE_PRIORITY_PHONE, |
| 1692 |
TYPE_SYSTEM_DIALOG, |
| 1693 |
TYPE_KEYGUARD_DIALOG, |
| 1694 |
TYPE_SYSTEM_ERROR, |
| 1695 |
TYPE_INPUT_METHOD, |
| 1696 |
TYPE_INPUT_METHOD_DIALOG, |
| 1697 |
TYPE_WALLPAPER, |
| 1698 |
TYPE_STATUS_BAR_PANEL, |
| 1699 |
TYPE_SECURE_SYSTEM_OVERLAY, |
| 1700 |
TYPE_DRAG, |
| 1701 |
TYPE_STATUS_BAR_SUB_PANEL, |
| 1702 |
TYPE_POINTER, |
| 1703 |
TYPE_NAVIGATION_BAR, |
| 1704 |
TYPE_VOLUME_OVERLAY, |
| 1705 |
TYPE_BOOT_PROGRESS, |
| 1706 |
TYPE_INPUT_CONSUMER, |
| 1707 |
TYPE_NAVIGATION_BAR_PANEL, |
| 1708 |
TYPE_DISPLAY_OVERLAY, |
| 1709 |
TYPE_MAGNIFICATION_OVERLAY, |
| 1710 |
TYPE_PRIVATE_PRESENTATION, |
| 1711 |
TYPE_VOICE_INTERACTION, |
| 1712 |
TYPE_ACCESSIBILITY_OVERLAY, |
| 1713 |
TYPE_VOICE_INTERACTION_STARTING, |
| 1714 |
TYPE_DOCK_DIVIDER, |
| 1715 |
TYPE_QS_DIALOG, |
| 1716 |
TYPE_SCREENSHOT, |
| 1717 |
TYPE_PRESENTATION, |
| 1718 |
TYPE_APPLICATION_OVERLAY, |
| 1719 |
TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY, |
| 1720 |
TYPE_NOTIFICATION_SHADE, |
| 1721 |
TYPE_STATUS_BAR_ADDITIONAL |
| 1722 |
}) |
| 1723 |
@Retention(RetentionPolicy.SOURCE) |
| 1724 |
public @interface WindowType {} |
| 1725 |
|
| 1726 |
|
| 1727 |
|
| 1728 |
|
| 1729 |
|
| 1730 |
|
| 1731 |
|
| 1732 |
|
| 1733 |
public static boolean isSystemAlertWindowType(@WindowType int type) { |
| 1734 |
switch (type) { |
| 1735 |
case TYPE_PHONE: |
| 1736 |
case TYPE_PRIORITY_PHONE: |
| 1737 |
case TYPE_SYSTEM_ALERT: |
| 1738 |
case TYPE_SYSTEM_ERROR: |
| 1739 |
case TYPE_SYSTEM_OVERLAY: |
| 1740 |
case TYPE_APPLICATION_OVERLAY: |
| 1741 |
return true; |
| 1742 |
} |
| 1743 |
return false; |
| 1744 |
} |
| 1745 |
|
| 1746 |
|
| 1747 |
@Deprecated |
| 1748 |
public static final int MEMORY_TYPE_NORMAL = 0; |
| 1749 |
|
| 1750 |
@Deprecated |
| 1751 |
public static final int MEMORY_TYPE_HARDWARE = 1; |
| 1752 |
|
| 1753 |
@Deprecated |
| 1754 |
public static final int MEMORY_TYPE_GPU = 2; |
| 1755 |
|
| 1756 |
@Deprecated |
| 1757 |
public static final int MEMORY_TYPE_PUSH_BUFFERS = 3; |
| 1758 |
|
| 1759 |
|
| 1760 |
|
| 1761 |
|
| 1762 |
@Deprecated |
| 1763 |
public int memoryType; |
| 1764 |
|
| 1765 |
|
| 1766 |
|
| 1767 |
|
| 1768 |
|
| 1769 |
public static final int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001; |
| 1770 |
|
| 1771 |
|
| 1772 |
|
| 1773 |
public static final int FLAG_DIM_BEHIND = 0x00000002; |
| 1774 |
|
| 1775 |
|
| 1776 |
public static final int FLAG_BLUR_BEHIND = 0x00000004; |
| 1777 |
|
| 1778 |
|
| 1779 |
|
| 1780 |
|
| 1781 |
|
| 1782 |
|
| 1783 |
|
| 1784 |
|
| 1785 |
|
| 1786 |
|
| 1787 |
|
| 1788 |
|
| 1789 |
|
| 1790 |
|
| 1791 |
public static final int FLAG_NOT_FOCUSABLE = 0x00000008; |
| 1792 |
|
| 1793 |
|
| 1794 |
|
| 1795 |
|
| 1796 |
|
| 1797 |
|
| 1798 |
|
| 1799 |
|
| 1800 |
|
| 1801 |
|
| 1802 |
|
| 1803 |
|
| 1804 |
|
| 1805 |
|
| 1806 |
|
| 1807 |
|
| 1808 |
|
| 1809 |
|
| 1810 |
|
| 1811 |
|
| 1812 |
|
| 1813 |
|
| 1814 |
|
| 1815 |
|
| 1816 |
|
| 1817 |
|
| 1818 |
|
| 1819 |
|
| 1820 |
|
| 1821 |
|
| 1822 |
|
| 1823 |
|
| 1824 |
|
| 1825 |
|
| 1826 |
|
| 1827 |
|
| 1828 |
|
| 1829 |
|
| 1830 |
|
| 1831 |
|
| 1832 |
|
| 1833 |
|
| 1834 |
|
| 1835 |
|
| 1836 |
|
| 1837 |
|
| 1838 |
|
| 1839 |
|
| 1840 |
|
| 1841 |
|
| 1842 |
|
| 1843 |
|
| 1844 |
|
| 1845 |
|
| 1846 |
|
| 1847 |
|
| 1848 |
|
| 1849 |
|
| 1850 |
public static final int FLAG_NOT_TOUCHABLE = 0x00000010; |
| 1851 |
|
| 1852 |
|
| 1853 |
|
| 1854 |
|
| 1855 |
|
| 1856 |
|
| 1857 |
public static final int FLAG_NOT_TOUCH_MODAL = 0x00000020; |
| 1858 |
|
| 1859 |
|
| 1860 |
|
| 1861 |
|
| 1862 |
|
| 1863 |
|
| 1864 |
|
| 1865 |
|
| 1866 |
@Deprecated |
| 1867 |
public static final int FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040; |
| 1868 |
|
| 1869 |
|
| 1870 |
|
| 1871 |
public static final int FLAG_KEEP_SCREEN_ON = 0x00000080; |
| 1872 |
|
| 1873 |
|
| 1874 |
|
| 1875 |
|
| 1876 |
|
| 1877 |
|
| 1878 |
|
| 1879 |
|
| 1880 |
|
| 1881 |
public static final int FLAG_LAYOUT_IN_SCREEN = 0x00000100; |
| 1882 |
|
| 1883 |
|
| 1884 |
public static final int FLAG_LAYOUT_NO_LIMITS = 0x00000200; |
| 1885 |
|
| 1886 |
|
| 1887 |
|
| 1888 |
|
| 1889 |
|
| 1890 |
|
| 1891 |
|
| 1892 |
|
| 1893 |
|
| 1894 |
|
| 1895 |
|
| 1896 |
|
| 1897 |
|
| 1898 |
|
| 1899 |
|
| 1900 |
|
| 1901 |
|
| 1902 |
|
| 1903 |
|
| 1904 |
|
| 1905 |
|
| 1906 |
|
| 1907 |
|
| 1908 |
|
| 1909 |
@Deprecated |
| 1910 |
public static final int FLAG_FULLSCREEN = 0x00000400; |
| 1911 |
|
| 1912 |
|
| 1913 |
|
| 1914 |
|
| 1915 |
|
| 1916 |
|
| 1917 |
|
| 1918 |
|
| 1919 |
@Deprecated |
| 1920 |
public static final int FLAG_FORCE_NOT_FULLSCREEN = 0x00000800; |
| 1921 |
|
| 1922 |
|
| 1923 |
|
| 1924 |
|
| 1925 |
@Deprecated |
| 1926 |
public static final int FLAG_DITHER = 0x00001000; |
| 1927 |
|
| 1928 |
|
| 1929 |
|
| 1930 |
|
| 1931 |
|
| 1932 |
|
| 1933 |
|
| 1934 |
|
| 1935 |
public static final int FLAG_SECURE = 0x00002000; |
| 1936 |
|
| 1937 |
|
| 1938 |
|
| 1939 |
|
| 1940 |
public static final int FLAG_SCALED = 0x00004000; |
| 1941 |
|
| 1942 |
|
| 1943 |
|
| 1944 |
|
| 1945 |
|
| 1946 |
|
| 1947 |
|
| 1948 |
|
| 1949 |
public static final int FLAG_IGNORE_CHEEK_PRESSES = 0x00008000; |
| 1950 |
|
| 1951 |
|
| 1952 |
|
| 1953 |
|
| 1954 |
|
| 1955 |
|
| 1956 |
|
| 1957 |
|
| 1958 |
|
| 1959 |
|
| 1960 |
|
| 1961 |
|
| 1962 |
@Deprecated |
| 1963 |
public static final int FLAG_LAYOUT_INSET_DECOR = 0x00010000; |
| 1964 |
|
| 1965 |
|
| 1966 |
|
| 1967 |
|
| 1968 |
|
| 1969 |
|
| 1970 |
|
| 1971 |
|
| 1972 |
|
| 1973 |
|
| 1974 |
|
| 1975 |
|
| 1976 |
|
| 1977 |
|
| 1978 |
|
| 1979 |
|
| 1980 |
|
| 1981 |
|
| 1982 |
public static final int FLAG_ALT_FOCUSABLE_IM = 0x00020000; |
| 1983 |
|
| 1984 |
|
| 1985 |
|
| 1986 |
|
| 1987 |
|
| 1988 |
|
| 1989 |
|
| 1990 |
|
| 1991 |
|
| 1992 |
public static final int FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000; |
| 1993 |
|
| 1994 |
|
| 1995 |
|
| 1996 |
|
| 1997 |
|
| 1998 |
|
| 1999 |
|
| 2000 |
|
| 2001 |
|
| 2002 |
|
| 2003 |
|
| 2004 |
|
| 2005 |
|
| 2006 |
@Deprecated |
| 2007 |
public static final int FLAG_SHOW_WHEN_LOCKED = 0x00080000; |
| 2008 |
|
| 2009 |
|
| 2010 |
|
| 2011 |
|
| 2012 |
|
| 2013 |
|
| 2014 |
|
| 2015 |
|
| 2016 |
|
| 2017 |
|
| 2018 |
|
| 2019 |
|
| 2020 |
|
| 2021 |
|
| 2022 |
|
| 2023 |
|
| 2024 |
|
| 2025 |
|
| 2026 |
public static final int FLAG_SHOW_WALLPAPER = 0x00100000; |
| 2027 |
|
| 2028 |
|
| 2029 |
|
| 2030 |
|
| 2031 |
|
| 2032 |
|
| 2033 |
|
| 2034 |
|
| 2035 |
|
| 2036 |
@Deprecated |
| 2037 |
public static final int FLAG_TURN_SCREEN_ON = 0x00200000; |
| 2038 |
|
| 2039 |
|
| 2040 |
|
| 2041 |
|
| 2042 |
|
| 2043 |
|
| 2044 |
|
| 2045 |
|
| 2046 |
|
| 2047 |
|
| 2048 |
|
| 2049 |
|
| 2050 |
|
| 2051 |
|
| 2052 |
|
| 2053 |
|
| 2054 |
|
| 2055 |
|
| 2056 |
|
| 2057 |
|
| 2058 |
@Deprecated |
| 2059 |
public static final int FLAG_DISMISS_KEYGUARD = 0x00400000; |
| 2060 |
|
| 2061 |
|
| 2062 |
|
| 2063 |
|
| 2064 |
|
| 2065 |
|
| 2066 |
|
| 2067 |
|
| 2068 |
|
| 2069 |
|
| 2070 |
|
| 2071 |
public static final int FLAG_SPLIT_TOUCH = 0x00800000; |
| 2072 |
|
| 2073 |
|
| 2074 |
|
| 2075 |
|
| 2076 |
|
| 2077 |
|
| 2078 |
|
| 2079 |
|
| 2080 |
|
| 2081 |
|
| 2082 |
|
| 2083 |
|
| 2084 |
|
| 2085 |
|
| 2086 |
|
| 2087 |
|
| 2088 |
|
| 2089 |
|
| 2090 |
|
| 2091 |
|
| 2092 |
|
| 2093 |
|
| 2094 |
|
| 2095 |
|
| 2096 |
|
| 2097 |
|
| 2098 |
|
| 2099 |
|
| 2100 |
|
| 2101 |
|
| 2102 |
public static final int FLAG_HARDWARE_ACCELERATED = 0x01000000; |
| 2103 |
|
| 2104 |
|
| 2105 |
|
| 2106 |
|
| 2107 |
|
| 2108 |
|
| 2109 |
|
| 2110 |
|
| 2111 |
|
| 2112 |
|
| 2113 |
|
| 2114 |
|
| 2115 |
|
| 2116 |
|
| 2117 |
|
| 2118 |
|
| 2119 |
|
| 2120 |
|
| 2121 |
|
| 2122 |
|
| 2123 |
|
| 2124 |
|
| 2125 |
|
| 2126 |
|
| 2127 |
|
| 2128 |
|
| 2129 |
|
| 2130 |
|
| 2131 |
|
| 2132 |
|
| 2133 |
|
| 2134 |
|
| 2135 |
|
| 2136 |
|
| 2137 |
@Deprecated |
| 2138 |
public static final int FLAG_LAYOUT_IN_OVERSCAN = 0x02000000; |
| 2139 |
|
| 2140 |
|
| 2141 |
|
| 2142 |
|
| 2143 |
|
| 2144 |
|
| 2145 |
|
| 2146 |
|
| 2147 |
|
| 2148 |
|
| 2149 |
|
| 2150 |
|
| 2151 |
|
| 2152 |
|
| 2153 |
|
| 2154 |
|
| 2155 |
|
| 2156 |
|
| 2157 |
|
| 2158 |
|
| 2159 |
|
| 2160 |
|
| 2161 |
|
| 2162 |
|
| 2163 |
@Deprecated |
| 2164 |
public static final int FLAG_TRANSLUCENT_STATUS = 0x04000000; |
| 2165 |
|
| 2166 |
|
| 2167 |
|
| 2168 |
|
| 2169 |
|
| 2170 |
|
| 2171 |
|
| 2172 |
|
| 2173 |
|
| 2174 |
|
| 2175 |
|
| 2176 |
|
| 2177 |
|
| 2178 |
|
| 2179 |
|
| 2180 |
|
| 2181 |
|
| 2182 |
|
| 2183 |
|
| 2184 |
|
| 2185 |
|
| 2186 |
|
| 2187 |
|
| 2188 |
|
| 2189 |
|
| 2190 |
@Deprecated |
| 2191 |
public static final int FLAG_TRANSLUCENT_NAVIGATION = 0x08000000; |
| 2192 |
|
| 2193 |
|
| 2194 |
|
| 2195 |
|
| 2196 |
|
| 2197 |
|
| 2198 |
|
| 2199 |
|
| 2200 |
public static final int FLAG_LOCAL_FOCUS_MODE = 0x10000000; |
| 2201 |
|
| 2202 |
|
| 2203 |
|
| 2204 |
|
| 2205 |
|
| 2206 |
|
| 2207 |
|
| 2208 |
|
| 2209 |
|
| 2210 |
|
| 2211 |
|
| 2212 |
@UnsupportedAppUsage |
| 2213 |
@TestApi |
| 2214 |
public static final int FLAG_SLIPPERY = 0x20000000; |
| 2215 |
|
| 2216 |
|
| 2217 |
|
| 2218 |
|
| 2219 |
|
| 2220 |
|
| 2221 |
|
| 2222 |
|
| 2223 |
|
| 2224 |
|
| 2225 |
@Deprecated |
| 2226 |
public static final int FLAG_LAYOUT_ATTACHED_IN_DECOR = 0x40000000; |
| 2227 |
|
| 2228 |
|
| 2229 |
|
| 2230 |
|
| 2231 |
|
| 2232 |
|
| 2233 |
|
| 2234 |
public static final int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS = 0x80000000; |
| 2235 |
|
| 2236 |
|
| 2237 |
|
| 2238 |
|
| 2239 |
@IntDef(flag = true, prefix = "FLAG_", value = { |
| 2240 |
FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, |
| 2241 |
FLAG_DIM_BEHIND, |
| 2242 |
FLAG_BLUR_BEHIND, |
| 2243 |
FLAG_NOT_FOCUSABLE, |
| 2244 |
FLAG_NOT_TOUCHABLE, |
| 2245 |
FLAG_NOT_TOUCH_MODAL, |
| 2246 |
FLAG_TOUCHABLE_WHEN_WAKING, |
| 2247 |
FLAG_KEEP_SCREEN_ON, |
| 2248 |
FLAG_LAYOUT_IN_SCREEN, |
| 2249 |
FLAG_LAYOUT_NO_LIMITS, |
| 2250 |
FLAG_FULLSCREEN, |
| 2251 |
FLAG_FORCE_NOT_FULLSCREEN, |
| 2252 |
FLAG_DITHER, |
| 2253 |
FLAG_SECURE, |
| 2254 |
FLAG_SCALED, |
| 2255 |
FLAG_IGNORE_CHEEK_PRESSES, |
| 2256 |
FLAG_LAYOUT_INSET_DECOR, |
| 2257 |
FLAG_ALT_FOCUSABLE_IM, |
| 2258 |
FLAG_WATCH_OUTSIDE_TOUCH, |
| 2259 |
FLAG_SHOW_WHEN_LOCKED, |
| 2260 |
FLAG_SHOW_WALLPAPER, |
| 2261 |
FLAG_TURN_SCREEN_ON, |
| 2262 |
FLAG_DISMISS_KEYGUARD, |
| 2263 |
FLAG_SPLIT_TOUCH, |
| 2264 |
FLAG_HARDWARE_ACCELERATED, |
| 2265 |
FLAG_LAYOUT_IN_OVERSCAN, |
| 2266 |
FLAG_TRANSLUCENT_STATUS, |
| 2267 |
FLAG_TRANSLUCENT_NAVIGATION, |
| 2268 |
FLAG_LOCAL_FOCUS_MODE, |
| 2269 |
FLAG_SLIPPERY, |
| 2270 |
FLAG_LAYOUT_ATTACHED_IN_DECOR, |
| 2271 |
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, |
| 2272 |
}) |
| 2273 |
@Retention(RetentionPolicy.SOURCE) |
| 2274 |
public @interface Flags {} |
| 2275 |
|
| 2276 |
|
| 2277 |
|
| 2278 |
|
| 2279 |
|
| 2280 |
|
| 2281 |
|
| 2282 |
|
| 2283 |
|
| 2284 |
|
| 2285 |
|
| 2286 |
|
| 2287 |
|
| 2288 |
|
| 2289 |
|
| 2290 |
|
| 2291 |
|
| 2292 |
|
| 2293 |
|
| 2294 |
|
| 2295 |
|
| 2296 |
|
| 2297 |
|
| 2298 |
|
| 2299 |
|
| 2300 |
|
| 2301 |
|
| 2302 |
|
| 2303 |
|
| 2304 |
|
| 2305 |
@ViewDebug.ExportedProperty(flagMapping = { |
| 2306 |
@ViewDebug.FlagToString(mask = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, equals = FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, |
| 2307 |
name = "ALLOW_LOCK_WHILE_SCREEN_ON"), |
| 2308 |
@ViewDebug.FlagToString(mask = FLAG_DIM_BEHIND, equals = FLAG_DIM_BEHIND, |
| 2309 |
name = "DIM_BEHIND"), |
| 2310 |
@ViewDebug.FlagToString(mask = FLAG_BLUR_BEHIND, equals = FLAG_BLUR_BEHIND, |
| 2311 |
name = "BLUR_BEHIND"), |
| 2312 |
@ViewDebug.FlagToString(mask = FLAG_NOT_FOCUSABLE, equals = FLAG_NOT_FOCUSABLE, |
| 2313 |
name = "NOT_FOCUSABLE"), |
| 2314 |
@ViewDebug.FlagToString(mask = FLAG_NOT_TOUCHABLE, equals = FLAG_NOT_TOUCHABLE, |
| 2315 |
name = "NOT_TOUCHABLE"), |
| 2316 |
@ViewDebug.FlagToString(mask = FLAG_NOT_TOUCH_MODAL, equals = FLAG_NOT_TOUCH_MODAL, |
| 2317 |
name = "NOT_TOUCH_MODAL"), |
| 2318 |
@ViewDebug.FlagToString(mask = FLAG_TOUCHABLE_WHEN_WAKING, equals = FLAG_TOUCHABLE_WHEN_WAKING, |
| 2319 |
name = "TOUCHABLE_WHEN_WAKING"), |
| 2320 |
@ViewDebug.FlagToString(mask = FLAG_KEEP_SCREEN_ON, equals = FLAG_KEEP_SCREEN_ON, |
| 2321 |
name = "KEEP_SCREEN_ON"), |
| 2322 |
@ViewDebug.FlagToString(mask = FLAG_LAYOUT_IN_SCREEN, equals = FLAG_LAYOUT_IN_SCREEN, |
| 2323 |
name = "LAYOUT_IN_SCREEN"), |
| 2324 |
@ViewDebug.FlagToString(mask = FLAG_LAYOUT_NO_LIMITS, equals = FLAG_LAYOUT_NO_LIMITS, |
| 2325 |
name = "LAYOUT_NO_LIMITS"), |
| 2326 |
@ViewDebug.FlagToString(mask = FLAG_FULLSCREEN, equals = FLAG_FULLSCREEN, |
| 2327 |
name = "FULLSCREEN"), |
| 2328 |
@ViewDebug.FlagToString(mask = FLAG_FORCE_NOT_FULLSCREEN, equals = FLAG_FORCE_NOT_FULLSCREEN, |
| 2329 |
name = "FORCE_NOT_FULLSCREEN"), |
| 2330 |
@ViewDebug.FlagToString(mask = FLAG_DITHER, equals = FLAG_DITHER, |
| 2331 |
name = "DITHER"), |
| 2332 |
@ViewDebug.FlagToString(mask = FLAG_SECURE, equals = FLAG_SECURE, |
| 2333 |
name = "SECURE"), |
| 2334 |
@ViewDebug.FlagToString(mask = FLAG_SCALED, equals = FLAG_SCALED, |
| 2335 |
name = "SCALED"), |
| 2336 |
@ViewDebug.FlagToString(mask = FLAG_IGNORE_CHEEK_PRESSES, equals = FLAG_IGNORE_CHEEK_PRESSES, |
| 2337 |
name = "IGNORE_CHEEK_PRESSES"), |
| 2338 |
@ViewDebug.FlagToString(mask = FLAG_LAYOUT_INSET_DECOR, equals = FLAG_LAYOUT_INSET_DECOR, |
| 2339 |
name = "LAYOUT_INSET_DECOR"), |
| 2340 |
@ViewDebug.FlagToString(mask = FLAG_ALT_FOCUSABLE_IM, equals = FLAG_ALT_FOCUSABLE_IM, |
| 2341 |
name = "ALT_FOCUSABLE_IM"), |
| 2342 |
@ViewDebug.FlagToString(mask = FLAG_WATCH_OUTSIDE_TOUCH, equals = FLAG_WATCH_OUTSIDE_TOUCH, |
| 2343 |
name = "WATCH_OUTSIDE_TOUCH"), |
| 2344 |
@ViewDebug.FlagToString(mask = FLAG_SHOW_WHEN_LOCKED, equals = FLAG_SHOW_WHEN_LOCKED, |
| 2345 |
name = "SHOW_WHEN_LOCKED"), |
| 2346 |
@ViewDebug.FlagToString(mask = FLAG_SHOW_WALLPAPER, equals = FLAG_SHOW_WALLPAPER, |
| 2347 |
name = "SHOW_WALLPAPER"), |
| 2348 |
@ViewDebug.FlagToString(mask = FLAG_TURN_SCREEN_ON, equals = FLAG_TURN_SCREEN_ON, |
| 2349 |
name = "TURN_SCREEN_ON"), |
| 2350 |
@ViewDebug.FlagToString(mask = FLAG_DISMISS_KEYGUARD, equals = FLAG_DISMISS_KEYGUARD, |
| 2351 |
name = "DISMISS_KEYGUARD"), |
| 2352 |
@ViewDebug.FlagToString(mask = FLAG_SPLIT_TOUCH, equals = FLAG_SPLIT_TOUCH, |
| 2353 |
name = "SPLIT_TOUCH"), |
| 2354 |
@ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, equals = FLAG_HARDWARE_ACCELERATED, |
| 2355 |
name = "HARDWARE_ACCELERATED"), |
| 2356 |
@ViewDebug.FlagToString(mask = FLAG_LAYOUT_IN_OVERSCAN, equals = FLAG_LAYOUT_IN_OVERSCAN, |
| 2357 |
name = "LOCAL_FOCUS_MODE"), |
| 2358 |
@ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_STATUS, equals = FLAG_TRANSLUCENT_STATUS, |
| 2359 |
name = "TRANSLUCENT_STATUS"), |
| 2360 |
@ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_NAVIGATION, equals = FLAG_TRANSLUCENT_NAVIGATION, |
| 2361 |
name = "TRANSLUCENT_NAVIGATION"), |
| 2362 |
@ViewDebug.FlagToString(mask = FLAG_LOCAL_FOCUS_MODE, equals = FLAG_LOCAL_FOCUS_MODE, |
| 2363 |
name = "LOCAL_FOCUS_MODE"), |
| 2364 |
@ViewDebug.FlagToString(mask = FLAG_SLIPPERY, equals = FLAG_SLIPPERY, |
| 2365 |
name = "FLAG_SLIPPERY"), |
| 2366 |
@ViewDebug.FlagToString(mask = FLAG_LAYOUT_ATTACHED_IN_DECOR, equals = FLAG_LAYOUT_ATTACHED_IN_DECOR, |
| 2367 |
name = "FLAG_LAYOUT_ATTACHED_IN_DECOR"), |
| 2368 |
@ViewDebug.FlagToString(mask = FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, equals = FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, |
| 2369 |
name = "DRAWS_SYSTEM_BAR_BACKGROUNDS") |
| 2370 |
}, formatToHexString = true) |
| 2371 |
@Flags |
| 2372 |
public int flags; |
| 2373 |
|
| 2374 |
|
| 2375 |
|
| 2376 |
|
| 2377 |
|
| 2378 |
|
| 2379 |
|
| 2380 |
|
| 2381 |
|
| 2382 |
|
| 2383 |
public static final int PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED = 0x00000002; |
| 2384 |
|
| 2385 |
|
| 2386 |
|
| 2387 |
|
| 2388 |
|
| 2389 |
|
| 2390 |
|
| 2391 |
|
| 2392 |
|
| 2393 |
|
| 2394 |
public static final int PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS = 0x00000004; |
| 2395 |
|
| 2396 |
|
| 2397 |
|
| 2398 |
|
| 2399 |
|
| 2400 |
|
| 2401 |
|
| 2402 |
@RequiresPermission(permission.SYSTEM_APPLICATION_OVERLAY) |
| 2403 |
public static final int PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY = 0x00000008; |
| 2404 |
|
| 2405 |
|
| 2406 |
|
| 2407 |
|
| 2408 |
|
| 2409 |
|
| 2410 |
|
| 2411 |
@SystemApi |
| 2412 |
@RequiresPermission(permission.INTERNAL_SYSTEM_WINDOW) |
| 2413 |
public static final int SYSTEM_FLAG_SHOW_FOR_ALL_USERS = 0x00000010; |
| 2414 |
|
| 2415 |
|
| 2416 |
|
| 2417 |
|
| 2418 |
|
| 2419 |
|
| 2420 |
|
| 2421 |
public static final int PRIVATE_FLAG_UNRESTRICTED_GESTURE_EXCLUSION = 0x00000020; |
| 2422 |
|
| 2423 |
|
| 2424 |
|
| 2425 |
|
| 2426 |
|
| 2427 |
|
| 2428 |
@UnsupportedAppUsage |
| 2429 |
@TestApi |
| 2430 |
public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040; |
| 2431 |
|
| 2432 |
|
| 2433 |
|
| 2434 |
|
| 2435 |
|
| 2436 |
|
| 2437 |
public static final int PRIVATE_FLAG_COMPATIBLE_WINDOW = 0x00000080; |
| 2438 |
|
| 2439 |
|
| 2440 |
|
| 2441 |
|
| 2442 |
|
| 2443 |
public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; |
| 2444 |
|
| 2445 |
|
| 2446 |
|
| 2447 |
|
| 2448 |
|
| 2449 |
|
| 2450 |
public static final int PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS = 0x00000800; |
| 2451 |
|
| 2452 |
|
| 2453 |
|
| 2454 |
|
| 2455 |
|
| 2456 |
|
| 2457 |
|
| 2458 |
|
| 2459 |
public static final int PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR = 0x00001000; |
| 2460 |
|
| 2461 |
|
| 2462 |
|
| 2463 |
|
| 2464 |
|
| 2465 |
|
| 2466 |
|
| 2467 |
|
| 2468 |
|
| 2469 |
public static final int PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT = 0x00002000; |
| 2470 |
|
| 2471 |
|
| 2472 |
|
| 2473 |
|
| 2474 |
|
| 2475 |
|
| 2476 |
|
| 2477 |
public static final int PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY = 0x00004000; |
| 2478 |
|
| 2479 |
|
| 2480 |
|
| 2481 |
|
| 2482 |
|
| 2483 |
|
| 2484 |
|
| 2485 |
|
| 2486 |
|
| 2487 |
|
| 2488 |
public static final int PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH = 0x00008000; |
| 2489 |
|
| 2490 |
|
| 2491 |
|
| 2492 |
|
| 2493 |
|
| 2494 |
|
| 2495 |
public static final int PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME = 0x00010000; |
| 2496 |
|
| 2497 |
|
| 2498 |
|
| 2499 |
|
| 2500 |
|
| 2501 |
|
| 2502 |
public static final int PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS = 0x00020000; |
| 2503 |
|
| 2504 |
|
| 2505 |
|
| 2506 |
|
| 2507 |
|
| 2508 |
|
| 2509 |
public static final int PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE = 0x00040000; |
| 2510 |
|
| 2511 |
|
| 2512 |
|
| 2513 |
|
| 2514 |
|
| 2515 |
|
| 2516 |
|
| 2517 |
|
| 2518 |
@SystemApi |
| 2519 |
@RequiresPermission(permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS) |
| 2520 |
public static final int SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS = 0x00080000; |
| 2521 |
|
| 2522 |
|
| 2523 |
|
| 2524 |
|
| 2525 |
|
| 2526 |
|
| 2527 |
|
| 2528 |
public static final int PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY = 0x00100000; |
| 2529 |
|
| 2530 |
|
| 2531 |
|
| 2532 |
|
| 2533 |
|
| 2534 |
|
| 2535 |
|
| 2536 |
|
| 2537 |
|
| 2538 |
|
| 2539 |
|
| 2540 |
|
| 2541 |
|
| 2542 |
public static final int PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION = 0x00200000; |
| 2543 |
|
| 2544 |
|
| 2545 |
|
| 2546 |
|
| 2547 |
|
| 2548 |
|
| 2549 |
|
| 2550 |
public static final int PRIVATE_FLAG_NOT_MAGNIFIABLE = 0x00400000; |
| 2551 |
|
| 2552 |
|
| 2553 |
|
| 2554 |
|
| 2555 |
|
| 2556 |
|
| 2557 |
|
| 2558 |
|
| 2559 |
public static final int PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION = 0x00800000; |
| 2560 |
|
| 2561 |
|
| 2562 |
|
| 2563 |
|
| 2564 |
|
| 2565 |
|
| 2566 |
public static final int PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC = 0x01000000; |
| 2567 |
|
| 2568 |
|
| 2569 |
|
| 2570 |
|
| 2571 |
|
| 2572 |
|
| 2573 |
public static final int PRIVATE_FLAG_USE_BLAST = 0x02000000; |
| 2574 |
|
| 2575 |
|
| 2576 |
|
| 2577 |
|
| 2578 |
|
| 2579 |
|
| 2580 |
public static final int PRIVATE_FLAG_APPEARANCE_CONTROLLED = 0x04000000; |
| 2581 |
|
| 2582 |
|
| 2583 |
|
| 2584 |
|
| 2585 |
|
| 2586 |
|
| 2587 |
public static final int PRIVATE_FLAG_BEHAVIOR_CONTROLLED = 0x08000000; |
| 2588 |
|
| 2589 |
|
| 2590 |
|
| 2591 |
|
| 2592 |
|
| 2593 |
|
| 2594 |
public static final int PRIVATE_FLAG_FIT_INSETS_CONTROLLED = 0x10000000; |
| 2595 |
|
| 2596 |
|
| 2597 |
|
| 2598 |
|
| 2599 |
|
| 2600 |
public static final int PRIVATE_FLAG_TRUSTED_OVERLAY = 0x20000000; |
| 2601 |
|
| 2602 |
|
| 2603 |
|
| 2604 |
|
| 2605 |
|
| 2606 |
public static final int PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME = 0x40000000; |
| 2607 |
|
| 2608 |
|
| 2609 |
|
| 2610 |
|
| 2611 |
|
| 2612 |
|
| 2613 |
|
| 2614 |
|
| 2615 |
|
| 2616 |
|
| 2617 |
|
| 2618 |
|
| 2619 |
|
| 2620 |
@RequiresPermission(permission.MANAGE_ACTIVITY_TASKS) |
| 2621 |
public static final int PRIVATE_FLAG_INTERCEPT_GLOBAL_DRAG_AND_DROP = 0x80000000; |
| 2622 |
|
| 2623 |
|
| 2624 |
|
| 2625 |
|
| 2626 |
|
| 2627 |
|
| 2628 |
@SystemApi |
| 2629 |
@Retention(RetentionPolicy.SOURCE) |
| 2630 |
@IntDef(flag = true, prefix = { "SYSTEM_FLAG_" }, value = { |
| 2631 |
SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS, |
| 2632 |
SYSTEM_FLAG_SHOW_FOR_ALL_USERS, |
| 2633 |
}) |
| 2634 |
public @interface SystemFlags {} |
| 2635 |
|
| 2636 |
|
| 2637 |
|
| 2638 |
|
| 2639 |
@IntDef(flag = true, prefix="PRIVATE_FLAG_", value = { |
| 2640 |
PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED, |
| 2641 |
PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS, |
| 2642 |
SYSTEM_FLAG_SHOW_FOR_ALL_USERS, |
| 2643 |
PRIVATE_FLAG_UNRESTRICTED_GESTURE_EXCLUSION, |
| 2644 |
PRIVATE_FLAG_NO_MOVE_ANIMATION, |
| 2645 |
PRIVATE_FLAG_COMPATIBLE_WINDOW, |
| 2646 |
PRIVATE_FLAG_SYSTEM_ERROR, |
| 2647 |
PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, |
| 2648 |
PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR, |
| 2649 |
PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT, |
| 2650 |
PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY, |
| 2651 |
PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH, |
| 2652 |
PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME, |
| 2653 |
PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS, |
| 2654 |
PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE, |
| 2655 |
SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS, |
| 2656 |
PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY, |
| 2657 |
PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION, |
| 2658 |
PRIVATE_FLAG_NOT_MAGNIFIABLE, |
| 2659 |
PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION, |
| 2660 |
PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC, |
| 2661 |
PRIVATE_FLAG_USE_BLAST, |
| 2662 |
PRIVATE_FLAG_APPEARANCE_CONTROLLED, |
| 2663 |
PRIVATE_FLAG_BEHAVIOR_CONTROLLED, |
| 2664 |
PRIVATE_FLAG_FIT_INSETS_CONTROLLED, |
| 2665 |
PRIVATE_FLAG_TRUSTED_OVERLAY, |
| 2666 |
PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME, |
| 2667 |
PRIVATE_FLAG_INTERCEPT_GLOBAL_DRAG_AND_DROP, |
| 2668 |
PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY, |
| 2669 |
}) |
| 2670 |
public @interface PrivateFlags {} |
| 2671 |
|
| 2672 |
|
| 2673 |
|
| 2674 |
|
| 2675 |
|
| 2676 |
@UnsupportedAppUsage |
| 2677 |
@ViewDebug.ExportedProperty(flagMapping = { |
| 2678 |
@ViewDebug.FlagToString( |
| 2679 |
mask = PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED, |
| 2680 |
equals = PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED, |
| 2681 |
name = "FORCE_HARDWARE_ACCELERATED"), |
| 2682 |
@ViewDebug.FlagToString( |
| 2683 |
mask = PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS, |
| 2684 |
equals = PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS, |
| 2685 |
name = "WANTS_OFFSET_NOTIFICATIONS"), |
| 2686 |
@ViewDebug.FlagToString( |
| 2687 |
mask = SYSTEM_FLAG_SHOW_FOR_ALL_USERS, |
| 2688 |
equals = SYSTEM_FLAG_SHOW_FOR_ALL_USERS, |
| 2689 |
name = "SHOW_FOR_ALL_USERS"), |
| 2690 |
@ViewDebug.FlagToString( |
| 2691 |
mask = PRIVATE_FLAG_UNRESTRICTED_GESTURE_EXCLUSION, |
| 2692 |
equals = PRIVATE_FLAG_UNRESTRICTED_GESTURE_EXCLUSION, |
| 2693 |
name = "UNRESTRICTED_GESTURE_EXCLUSION"), |
| 2694 |
@ViewDebug.FlagToString( |
| 2695 |
mask = PRIVATE_FLAG_NO_MOVE_ANIMATION, |
| 2696 |
equals = PRIVATE_FLAG_NO_MOVE_ANIMATION, |
| 2697 |
name = "NO_MOVE_ANIMATION"), |
| 2698 |
@ViewDebug.FlagToString( |
| 2699 |
mask = PRIVATE_FLAG_COMPATIBLE_WINDOW, |
| 2700 |
equals = PRIVATE_FLAG_COMPATIBLE_WINDOW, |
| 2701 |
name = "COMPATIBLE_WINDOW"), |
| 2702 |
@ViewDebug.FlagToString( |
| 2703 |
mask = PRIVATE_FLAG_SYSTEM_ERROR, |
| 2704 |
equals = PRIVATE_FLAG_SYSTEM_ERROR, |
| 2705 |
name = "SYSTEM_ERROR"), |
| 2706 |
@ViewDebug.FlagToString( |
| 2707 |
mask = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, |
| 2708 |
equals = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, |
| 2709 |
name = "DISABLE_WALLPAPER_TOUCH_EVENTS"), |
| 2710 |
@ViewDebug.FlagToString( |
| 2711 |
mask = PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR, |
| 2712 |
equals = PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR, |
| 2713 |
name = "FORCE_STATUS_BAR_VISIBLE"), |
| 2714 |
@ViewDebug.FlagToString( |
| 2715 |
mask = PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT, |
| 2716 |
equals = PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT, |
| 2717 |
name = "LAYOUT_SIZE_EXTENDED_BY_CUTOUT"), |
| 2718 |
@ViewDebug.FlagToString( |
| 2719 |
mask = PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY, |
| 2720 |
equals = PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY, |
| 2721 |
name = "FORCE_DECOR_VIEW_VISIBILITY"), |
| 2722 |
@ViewDebug.FlagToString( |
| 2723 |
mask = PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH, |
| 2724 |
equals = PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH, |
| 2725 |
name = "WILL_NOT_REPLACE_ON_RELAUNCH"), |
| 2726 |
@ViewDebug.FlagToString( |
| 2727 |
mask = PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME, |
| 2728 |
equals = PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME, |
| 2729 |
name = "LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME"), |
| 2730 |
@ViewDebug.FlagToString( |
| 2731 |
mask = PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS, |
| 2732 |
equals = PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS, |
| 2733 |
name = "FORCE_DRAW_STATUS_BAR_BACKGROUND"), |
| 2734 |
@ViewDebug.FlagToString( |
| 2735 |
mask = PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE, |
| 2736 |
equals = PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE, |
| 2737 |
name = "SUSTAINED_PERFORMANCE_MODE"), |
| 2738 |
@ViewDebug.FlagToString( |
| 2739 |
mask = SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS, |
| 2740 |
equals = SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS, |
| 2741 |
name = "HIDE_NON_SYSTEM_OVERLAY_WINDOWS"), |
| 2742 |
@ViewDebug.FlagToString( |
| 2743 |
mask = PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY, |
| 2744 |
equals = PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY, |
| 2745 |
name = "IS_ROUNDED_CORNERS_OVERLAY"), |
| 2746 |
@ViewDebug.FlagToString( |
| 2747 |
mask = PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION, |
| 2748 |
equals = PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION, |
| 2749 |
name = "EXCLUDE_FROM_SCREEN_MAGNIFICATION"), |
| 2750 |
@ViewDebug.FlagToString( |
| 2751 |
mask = PRIVATE_FLAG_NOT_MAGNIFIABLE, |
| 2752 |
equals = PRIVATE_FLAG_NOT_MAGNIFIABLE, |
| 2753 |
name = "NOT_MAGNIFIABLE"), |
| 2754 |
@ViewDebug.FlagToString( |
| 2755 |
mask = PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION, |
| 2756 |
equals = PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION, |
| 2757 |
name = "STATUS_FORCE_SHOW_NAVIGATION"), |
| 2758 |
@ViewDebug.FlagToString( |
| 2759 |
mask = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC, |
| 2760 |
equals = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC, |
| 2761 |
name = "COLOR_SPACE_AGNOSTIC"), |
| 2762 |
@ViewDebug.FlagToString( |
| 2763 |
mask = PRIVATE_FLAG_USE_BLAST, |
| 2764 |
equals = PRIVATE_FLAG_USE_BLAST, |
| 2765 |
name = "USE_BLAST"), |
| 2766 |
@ViewDebug.FlagToString( |
| 2767 |
mask = PRIVATE_FLAG_APPEARANCE_CONTROLLED, |
| 2768 |
equals = PRIVATE_FLAG_APPEARANCE_CONTROLLED, |
| 2769 |
name = "APPEARANCE_CONTROLLED"), |
| 2770 |
@ViewDebug.FlagToString( |
| 2771 |
mask = PRIVATE_FLAG_BEHAVIOR_CONTROLLED, |
| 2772 |
equals = PRIVATE_FLAG_BEHAVIOR_CONTROLLED, |
| 2773 |
name = "BEHAVIOR_CONTROLLED"), |
| 2774 |
@ViewDebug.FlagToString( |
| 2775 |
mask = PRIVATE_FLAG_FIT_INSETS_CONTROLLED, |
| 2776 |
equals = PRIVATE_FLAG_FIT_INSETS_CONTROLLED, |
| 2777 |
name = "FIT_INSETS_CONTROLLED"), |
| 2778 |
@ViewDebug.FlagToString( |
| 2779 |
mask = PRIVATE_FLAG_TRUSTED_OVERLAY, |
| 2780 |
equals = PRIVATE_FLAG_TRUSTED_OVERLAY, |
| 2781 |
name = "TRUSTED_OVERLAY"), |
| 2782 |
@ViewDebug.FlagToString( |
| 2783 |
mask = PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME, |
| 2784 |
equals = PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME, |
| 2785 |
name = "INSET_PARENT_FRAME_BY_IME"), |
| 2786 |
@ViewDebug.FlagToString( |
| 2787 |
mask = PRIVATE_FLAG_INTERCEPT_GLOBAL_DRAG_AND_DROP, |
| 2788 |
equals = PRIVATE_FLAG_INTERCEPT_GLOBAL_DRAG_AND_DROP, |
| 2789 |
name = "INTERCEPT_GLOBAL_DRAG_AND_DROP"), |
| 2790 |
@ViewDebug.FlagToString( |
| 2791 |
mask = PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY, |
| 2792 |
equals = PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY, |
| 2793 |
name = "PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY") |
| 2794 |
}) |
| 2795 |
@PrivateFlags |
| 2796 |
@TestApi |
| 2797 |
public int privateFlags; |
| 2798 |
|
| 2799 |
|
| 2800 |
|
| 2801 |
|
| 2802 |
|
| 2803 |
|
| 2804 |
|
| 2805 |
|
| 2806 |
|
| 2807 |
|
| 2808 |
|
| 2809 |
|
| 2810 |
|
| 2811 |
|
| 2812 |
public static boolean mayUseInputMethod(int flags) { |
| 2813 |
return (flags & FLAG_NOT_FOCUSABLE) != FLAG_NOT_FOCUSABLE |
| 2814 |
&& (flags & FLAG_ALT_FOCUSABLE_IM) != FLAG_ALT_FOCUSABLE_IM; |
| 2815 |
} |
| 2816 |
|
| 2817 |
|
| 2818 |
|
| 2819 |
|
| 2820 |
|
| 2821 |
public static final int SOFT_INPUT_MASK_STATE = 0x0f; |
| 2822 |
|
| 2823 |
|
| 2824 |
|
| 2825 |
|
| 2826 |
|
| 2827 |
|
| 2828 |
public static final int SOFT_INPUT_STATE_UNSPECIFIED = 0; |
| 2829 |
|
| 2830 |
|
| 2831 |
|
| 2832 |
|
| 2833 |
|
| 2834 |
public static final int SOFT_INPUT_STATE_UNCHANGED = 1; |
| 2835 |
|
| 2836 |
|
| 2837 |
|
| 2838 |
|
| 2839 |
|
| 2840 |
|
| 2841 |
public static final int SOFT_INPUT_STATE_HIDDEN = 2; |
| 2842 |
|
| 2843 |
|
| 2844 |
|
| 2845 |
|
| 2846 |
|
| 2847 |
public static final int SOFT_INPUT_STATE_ALWAYS_HIDDEN = 3; |
| 2848 |
|
| 2849 |
|
| 2850 |
|
| 2851 |
|
| 2852 |
|
| 2853 |
|
| 2854 |
|
| 2855 |
|
| 2856 |
|
| 2857 |
|
| 2858 |
public static final int SOFT_INPUT_STATE_VISIBLE = 4; |
| 2859 |
|
| 2860 |
|
| 2861 |
|
| 2862 |
|
| 2863 |
|
| 2864 |
|
| 2865 |
|
| 2866 |
|
| 2867 |
|
| 2868 |
public static final int SOFT_INPUT_STATE_ALWAYS_VISIBLE = 5; |
| 2869 |
|
| 2870 |
|
| 2871 |
|
| 2872 |
|
| 2873 |
|
| 2874 |
|
| 2875 |
public static final int SOFT_INPUT_MASK_ADJUST = 0xf0; |
| 2876 |
|
| 2877 |
|
| 2878 |
|
| 2879 |
|
| 2880 |
|
| 2881 |
public static final int SOFT_INPUT_ADJUST_UNSPECIFIED = 0x00; |
| 2882 |
|
| 2883 |
|
| 2884 |
|
| 2885 |
|
| 2886 |
|
| 2887 |
|
| 2888 |
|
| 2889 |
|
| 2890 |
|
| 2891 |
|
| 2892 |
|
| 2893 |
|
| 2894 |
|
| 2895 |
|
| 2896 |
|
| 2897 |
|
| 2898 |
@Deprecated |
| 2899 |
public static final int SOFT_INPUT_ADJUST_RESIZE = 0x10; |
| 2900 |
|
| 2901 |
|
| 2902 |
|
| 2903 |
|
| 2904 |
|
| 2905 |
|
| 2906 |
|
| 2907 |
|
| 2908 |
|
| 2909 |
public static final int SOFT_INPUT_ADJUST_PAN = 0x20; |
| 2910 |
|
| 2911 |
|
| 2912 |
|
| 2913 |
|
| 2914 |
|
| 2915 |
public static final int SOFT_INPUT_ADJUST_NOTHING = 0x30; |
| 2916 |
|
| 2917 |
|
| 2918 |
|
| 2919 |
|
| 2920 |
|
| 2921 |
|
| 2922 |
|
| 2923 |
|
| 2924 |
public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION = 0x100; |
| 2925 |
|
| 2926 |
|
| 2927 |
|
| 2928 |
|
| 2929 |
|
| 2930 |
|
| 2931 |
@Retention(RetentionPolicy.SOURCE) |
| 2932 |
@IntDef(flag = true, prefix = { "SOFT_INPUT_" }, value = { |
| 2933 |
SOFT_INPUT_STATE_UNSPECIFIED, |
| 2934 |
SOFT_INPUT_STATE_UNCHANGED, |
| 2935 |
SOFT_INPUT_STATE_HIDDEN, |
| 2936 |
SOFT_INPUT_STATE_ALWAYS_HIDDEN, |
| 2937 |
SOFT_INPUT_STATE_VISIBLE, |
| 2938 |
SOFT_INPUT_STATE_ALWAYS_VISIBLE, |
| 2939 |
SOFT_INPUT_ADJUST_UNSPECIFIED, |
| 2940 |
SOFT_INPUT_ADJUST_RESIZE, |
| 2941 |
SOFT_INPUT_ADJUST_PAN, |
| 2942 |
SOFT_INPUT_ADJUST_NOTHING, |
| 2943 |
SOFT_INPUT_IS_FORWARD_NAVIGATION, |
| 2944 |
}) |
| 2945 |
public @interface SoftInputModeFlags {} |
| 2946 |
|
| 2947 |
|
| 2948 |
|
| 2949 |
|
| 2950 |
|
| 2951 |
|
| 2952 |
|
| 2953 |
|
| 2954 |
|
| 2955 |
|
| 2956 |
|
| 2957 |
|
| 2958 |
|
| 2959 |
|
| 2960 |
|
| 2961 |
|
| 2962 |
|
| 2963 |
|
| 2964 |
|
| 2965 |
@SoftInputModeFlags |
| 2966 |
public int softInputMode; |
| 2967 |
|
| 2968 |
|
| 2969 |
|
| 2970 |
|
| 2971 |
|
| 2972 |
|
| 2973 |
|
| 2974 |
|
| 2975 |
|
| 2976 |
|
| 2977 |
|
| 2978 |
|
| 2979 |
|
| 2980 |
|
| 2981 |
|
| 2982 |
|
| 2983 |
@GravityFlags |
| 2984 |
public int gravity; |
| 2985 |
|
| 2986 |
|
| 2987 |
|
| 2988 |
|
| 2989 |
|
| 2990 |
|
| 2991 |
|
| 2992 |
|
| 2993 |
public float horizontalMargin; |
| 2994 |
|
| 2995 |
|
| 2996 |
|
| 2997 |
|
| 2998 |
|
| 2999 |
|
| 3000 |
|
| 3001 |
|
| 3002 |
public float verticalMargin; |
| 3003 |
|
| 3004 |
|
| 3005 |
|
| 3006 |
|
| 3007 |
|
| 3008 |
|
| 3009 |
public final Rect surfaceInsets = new Rect(); |
| 3010 |
|
| 3011 |
|
| 3012 |
|
| 3013 |
|
| 3014 |
|
| 3015 |
|
| 3016 |
|
| 3017 |
|
| 3018 |
|
| 3019 |
public boolean hasManualSurfaceInsets; |
| 3020 |
|
| 3021 |
|
| 3022 |
|
| 3023 |
|
| 3024 |
|
| 3025 |
|
| 3026 |
|
| 3027 |
|
| 3028 |
public boolean receiveInsetsIgnoringZOrder; |
| 3029 |
|
| 3030 |
|
| 3031 |
|
| 3032 |
|
| 3033 |
|
| 3034 |
|
| 3035 |
|
| 3036 |
|
| 3037 |
|
| 3038 |
public boolean preservePreviousSurfaceInsets = true; |
| 3039 |
|
| 3040 |
|
| 3041 |
|
| 3042 |
|
| 3043 |
|
| 3044 |
|
| 3045 |
public int format; |
| 3046 |
|
| 3047 |
|
| 3048 |
|
| 3049 |
|
| 3050 |
|
| 3051 |
|
| 3052 |
public int windowAnimations; |
| 3053 |
|
| 3054 |
|
| 3055 |
|
| 3056 |
|
| 3057 |
|
| 3058 |
public float alpha = 1.0f; |
| 3059 |
|
| 3060 |
|
| 3061 |
|
| 3062 |
|
| 3063 |
|
| 3064 |
|
| 3065 |
public float dimAmount = 1.0f; |
| 3066 |
|
| 3067 |
|
| 3068 |
|
| 3069 |
|
| 3070 |
|
| 3071 |
|
| 3072 |
public static final float BRIGHTNESS_OVERRIDE_NONE = -1.0f; |
| 3073 |
|
| 3074 |
|
| 3075 |
|
| 3076 |
|
| 3077 |
|
| 3078 |
|
| 3079 |
public static final float BRIGHTNESS_OVERRIDE_OFF = 0.0f; |
| 3080 |
|
| 3081 |
|
| 3082 |
|
| 3083 |
|
| 3084 |
|
| 3085 |
|
| 3086 |
public static final float BRIGHTNESS_OVERRIDE_FULL = 1.0f; |
| 3087 |
|
| 3088 |
|
| 3089 |
|
| 3090 |
|
| 3091 |
|
| 3092 |
|
| 3093 |
|
| 3094 |
public float screenBrightness = BRIGHTNESS_OVERRIDE_NONE; |
| 3095 |
|
| 3096 |
|
| 3097 |
|
| 3098 |
|
| 3099 |
|
| 3100 |
|
| 3101 |
|
| 3102 |
public float buttonBrightness = BRIGHTNESS_OVERRIDE_NONE; |
| 3103 |
|
| 3104 |
|
| 3105 |
|
| 3106 |
|
| 3107 |
|
| 3108 |
|
| 3109 |
public static final int ROTATION_ANIMATION_UNSPECIFIED = -1; |
| 3110 |
|
| 3111 |
|
| 3112 |
|
| 3113 |
|
| 3114 |
|
| 3115 |
public static final int ROTATION_ANIMATION_ROTATE = 0; |
| 3116 |
|
| 3117 |
|
| 3118 |
|
| 3119 |
|
| 3120 |
|
| 3121 |
public static final int ROTATION_ANIMATION_CROSSFADE = 1; |
| 3122 |
|
| 3123 |
|
| 3124 |
|
| 3125 |
|
| 3126 |
|
| 3127 |
public static final int ROTATION_ANIMATION_JUMPCUT = 2; |
| 3128 |
|
| 3129 |
|
| 3130 |
|
| 3131 |
|
| 3132 |
|
| 3133 |
|
| 3134 |
|
| 3135 |
|
| 3136 |
|
| 3137 |
public static final int ROTATION_ANIMATION_SEAMLESS = 3; |
| 3138 |
|
| 3139 |
|
| 3140 |
|
| 3141 |
|
| 3142 |
|
| 3143 |
|
| 3144 |
|
| 3145 |
|
| 3146 |
|
| 3147 |
|
| 3148 |
|
| 3149 |
|
| 3150 |
public int rotationAnimation = ROTATION_ANIMATION_ROTATE; |
| 3151 |
|
| 3152 |
|
| 3153 |
|
| 3154 |
|
| 3155 |
|
| 3156 |
public IBinder token = null; |
| 3157 |
|
| 3158 |
|
| 3159 |
|
| 3160 |
|
| 3161 |
|
| 3162 |
|
| 3163 |
|
| 3164 |
|
| 3165 |
|
| 3166 |
|
| 3167 |
@Nullable |
| 3168 |
public IBinder mWindowContextToken = null; |
| 3169 |
|
| 3170 |
|
| 3171 |
|
| 3172 |
|
| 3173 |
public String packageName = null; |
| 3174 |
|
| 3175 |
|
| 3176 |
|
| 3177 |
|
| 3178 |
|
| 3179 |
|
| 3180 |
|
| 3181 |
|
| 3182 |
|
| 3183 |
@ActivityInfo.ScreenOrientation |
| 3184 |
public int screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; |
| 3185 |
|
| 3186 |
|
| 3187 |
|
| 3188 |
|
| 3189 |
|
| 3190 |
|
| 3191 |
|
| 3192 |
|
| 3193 |
|
| 3194 |
|
| 3195 |
|
| 3196 |
|
| 3197 |
|
| 3198 |
|
| 3199 |
|
| 3200 |
public float preferredRefreshRate; |
| 3201 |
|
| 3202 |
|
| 3203 |
|
| 3204 |
|
| 3205 |
|
| 3206 |
|
| 3207 |
|
| 3208 |
|
| 3209 |
|
| 3210 |
|
| 3211 |
public int preferredDisplayModeId; |
| 3212 |
|
| 3213 |
|
| 3214 |
|
| 3215 |
|
| 3216 |
|
| 3217 |
|
| 3218 |
|
| 3219 |
public float preferredMinDisplayRefreshRate; |
| 3220 |
|
| 3221 |
|
| 3222 |
|
| 3223 |
|
| 3224 |
|
| 3225 |
|
| 3226 |
|
| 3227 |
public float preferredMaxDisplayRefreshRate; |
| 3228 |
|
| 3229 |
|
| 3230 |
|
| 3231 |
|
| 3232 |
|
| 3233 |
|
| 3234 |
|
| 3235 |
@Retention(RetentionPolicy.SOURCE) |
| 3236 |
@IntDef(flag = true, prefix = { "" }, value = { |
| 3237 |
SYSTEM_UI_FLAG_VISIBLE, |
| 3238 |
SYSTEM_UI_FLAG_LOW_PROFILE, |
| 3239 |
SYSTEM_UI_FLAG_HIDE_NAVIGATION, |
| 3240 |
SYSTEM_UI_FLAG_FULLSCREEN, |
| 3241 |
SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, |
| 3242 |
SYSTEM_UI_FLAG_LAYOUT_STABLE, |
| 3243 |
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, |
| 3244 |
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, |
| 3245 |
SYSTEM_UI_FLAG_IMMERSIVE, |
| 3246 |
SYSTEM_UI_FLAG_IMMERSIVE_STICKY, |
| 3247 |
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, |
| 3248 |
STATUS_BAR_DISABLE_EXPAND, |
| 3249 |
STATUS_BAR_DISABLE_NOTIFICATION_ICONS, |
| 3250 |
STATUS_BAR_DISABLE_NOTIFICATION_ALERTS, |
| 3251 |
STATUS_BAR_DISABLE_NOTIFICATION_TICKER, |
| 3252 |
STATUS_BAR_DISABLE_SYSTEM_INFO, |
| 3253 |
STATUS_BAR_DISABLE_HOME, |
| 3254 |
STATUS_BAR_DISABLE_BACK, |
| 3255 |
STATUS_BAR_DISABLE_CLOCK, |
| 3256 |
STATUS_BAR_DISABLE_RECENT, |
| 3257 |
STATUS_BAR_DISABLE_SEARCH, |
| 3258 |
}) |
| 3259 |
public @interface SystemUiVisibilityFlags {} |
| 3260 |
|
| 3261 |
|
| 3262 |
|
| 3263 |
|
| 3264 |
|
| 3265 |
|
| 3266 |
|
| 3267 |
|
| 3268 |
|
| 3269 |
|
| 3270 |
@SystemUiVisibilityFlags |
| 3271 |
@Deprecated |
| 3272 |
public int systemUiVisibility; |
| 3273 |
|
| 3274 |
|
| 3275 |
|
| 3276 |
|
| 3277 |
|
| 3278 |
|
| 3279 |
@SystemUiVisibilityFlags |
| 3280 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 3281 |
public int subtreeSystemUiVisibility; |
| 3282 |
|
| 3283 |
|
| 3284 |
|
| 3285 |
|
| 3286 |
|
| 3287 |
|
| 3288 |
|
| 3289 |
|
| 3290 |
@UnsupportedAppUsage |
| 3291 |
public boolean hasSystemUiListeners; |
| 3292 |
|
| 3293 |
|
| 3294 |
@Retention(RetentionPolicy.SOURCE) |
| 3295 |
@IntDef( |
| 3296 |
value = {LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT, |
| 3297 |
LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES, |
| 3298 |
LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER, |
| 3299 |
LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS}) |
| 3300 |
@interface LayoutInDisplayCutoutMode {} |
| 3301 |
|
| 3302 |
|
| 3303 |
|
| 3304 |
|
| 3305 |
|
| 3306 |
|
| 3307 |
|
| 3308 |
|
| 3309 |
|
| 3310 |
|
| 3311 |
|
| 3312 |
|
| 3313 |
|
| 3314 |
|
| 3315 |
|
| 3316 |
@LayoutInDisplayCutoutMode |
| 3317 |
public int layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT; |
| 3318 |
|
| 3319 |
|
| 3320 |
|
| 3321 |
|
| 3322 |
|
| 3323 |
|
| 3324 |
|
| 3325 |
|
| 3326 |
|
| 3327 |
|
| 3328 |
|
| 3329 |
|
| 3330 |
|
| 3331 |
|
| 3332 |
|
| 3333 |
|
| 3334 |
|
| 3335 |
|
| 3336 |
|
| 3337 |
|
| 3338 |
|
| 3339 |
|
| 3340 |
|
| 3341 |
|
| 3342 |
|
| 3343 |
|
| 3344 |
|
| 3345 |
|
| 3346 |
|
| 3347 |
|
| 3348 |
|
| 3349 |
|
| 3350 |
public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT = 0; |
| 3351 |
|
| 3352 |
|
| 3353 |
|
| 3354 |
|
| 3355 |
|
| 3356 |
|
| 3357 |
|
| 3358 |
|
| 3359 |
|
| 3360 |
|
| 3361 |
|
| 3362 |
|
| 3363 |
|
| 3364 |
|
| 3365 |
|
| 3366 |
|
| 3367 |
|
| 3368 |
|
| 3369 |
|
| 3370 |
|
| 3371 |
|
| 3372 |
|
| 3373 |
|
| 3374 |
|
| 3375 |
|
| 3376 |
|
| 3377 |
|
| 3378 |
|
| 3379 |
|
| 3380 |
|
| 3381 |
|
| 3382 |
|
| 3383 |
|
| 3384 |
|
| 3385 |
|
| 3386 |
|
| 3387 |
|
| 3388 |
|
| 3389 |
|
| 3390 |
|
| 3391 |
|
| 3392 |
|
| 3393 |
|
| 3394 |
|
| 3395 |
|
| 3396 |
|
| 3397 |
|
| 3398 |
|
| 3399 |
|
| 3400 |
|
| 3401 |
|
| 3402 |
|
| 3403 |
|
| 3404 |
|
| 3405 |
|
| 3406 |
public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES = 1; |
| 3407 |
|
| 3408 |
|
| 3409 |
|
| 3410 |
|
| 3411 |
|
| 3412 |
|
| 3413 |
|
| 3414 |
|
| 3415 |
|
| 3416 |
|
| 3417 |
|
| 3418 |
|
| 3419 |
|
| 3420 |
|
| 3421 |
public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER = 2; |
| 3422 |
|
| 3423 |
|
| 3424 |
|
| 3425 |
|
| 3426 |
|
| 3427 |
|
| 3428 |
|
| 3429 |
|
| 3430 |
|
| 3431 |
|
| 3432 |
|
| 3433 |
|
| 3434 |
|
| 3435 |
|
| 3436 |
|
| 3437 |
|
| 3438 |
|
| 3439 |
|
| 3440 |
|
| 3441 |
public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 3; |
| 3442 |
|
| 3443 |
|
| 3444 |
|
| 3445 |
|
| 3446 |
|
| 3447 |
|
| 3448 |
|
| 3449 |
public static final int INPUT_FEATURE_NO_INPUT_CHANNEL = 1 << 0; |
| 3450 |
|
| 3451 |
|
| 3452 |
|
| 3453 |
|
| 3454 |
|
| 3455 |
|
| 3456 |
|
| 3457 |
|
| 3458 |
|
| 3459 |
|
| 3460 |
|
| 3461 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 3462 |
public static final int INPUT_FEATURE_DISABLE_USER_ACTIVITY = 1 << 1; |
| 3463 |
|
| 3464 |
|
| 3465 |
|
| 3466 |
|
| 3467 |
|
| 3468 |
|
| 3469 |
|
| 3470 |
|
| 3471 |
|
| 3472 |
@RequiresPermission(permission.MONITOR_INPUT) |
| 3473 |
public static final int INPUT_FEATURE_SPY = 1 << 2; |
| 3474 |
|
| 3475 |
|
| 3476 |
|
| 3477 |
|
| 3478 |
|
| 3479 |
|
| 3480 |
|
| 3481 |
|
| 3482 |
@Retention(RetentionPolicy.SOURCE) |
| 3483 |
@IntDef(flag = true, prefix = {"INPUT_FEATURE_"}, value = { |
| 3484 |
INPUT_FEATURE_NO_INPUT_CHANNEL, |
| 3485 |
INPUT_FEATURE_DISABLE_USER_ACTIVITY, |
| 3486 |
INPUT_FEATURE_SPY, |
| 3487 |
}) |
| 3488 |
public @interface InputFeatureFlags { |
| 3489 |
} |
| 3490 |
|
| 3491 |
|
| 3492 |
|
| 3493 |
|
| 3494 |
|
| 3495 |
|
| 3496 |
|
| 3497 |
|
| 3498 |
|
| 3499 |
|
| 3500 |
@InputFeatureFlags |
| 3501 |
@UnsupportedAppUsage |
| 3502 |
public int inputFeatures; |
| 3503 |
|
| 3504 |
|
| 3505 |
|
| 3506 |
|
| 3507 |
|
| 3508 |
|
| 3509 |
|
| 3510 |
|
| 3511 |
|
| 3512 |
|
| 3513 |
|
| 3514 |
|
| 3515 |
|
| 3516 |
|
| 3517 |
@UnsupportedAppUsage |
| 3518 |
public long userActivityTimeout = -1; |
| 3519 |
|
| 3520 |
|
| 3521 |
|
| 3522 |
|
| 3523 |
|
| 3524 |
|
| 3525 |
|
| 3526 |
public long accessibilityIdOfAnchor = AccessibilityNodeInfo.UNDEFINED_NODE_ID; |
| 3527 |
|
| 3528 |
|
| 3529 |
|
| 3530 |
|
| 3531 |
|
| 3532 |
|
| 3533 |
|
| 3534 |
@TestApi |
| 3535 |
public CharSequence accessibilityTitle; |
| 3536 |
|
| 3537 |
|
| 3538 |
|
| 3539 |
|
| 3540 |
|
| 3541 |
|
| 3542 |
|
| 3543 |
|
| 3544 |
|
| 3545 |
|
| 3546 |
|
| 3547 |
|
| 3548 |
|
| 3549 |
@UnsupportedAppUsage |
| 3550 |
public long hideTimeoutMilliseconds = -1; |
| 3551 |
|
| 3552 |
|
| 3553 |
|
| 3554 |
|
| 3555 |
|
| 3556 |
|
| 3557 |
|
| 3558 |
|
| 3559 |
|
| 3560 |
|
| 3561 |
|
| 3562 |
|
| 3563 |
|
| 3564 |
|
| 3565 |
|
| 3566 |
|
| 3567 |
|
| 3568 |
|
| 3569 |
|
| 3570 |
|
| 3571 |
|
| 3572 |
|
| 3573 |
|
| 3574 |
|
| 3575 |
|
| 3576 |
|
| 3577 |
public boolean preferMinimalPostProcessing = false; |
| 3578 |
|
| 3579 |
|
| 3580 |
|
| 3581 |
|
| 3582 |
|
| 3583 |
|
| 3584 |
|
| 3585 |
|
| 3586 |
|
| 3587 |
|
| 3588 |
|
| 3589 |
private int mBlurBehindRadius = 0; |
| 3590 |
|
| 3591 |
|
| 3592 |
|
| 3593 |
|
| 3594 |
|
| 3595 |
|
| 3596 |
|
| 3597 |
|
| 3598 |
|
| 3599 |
@ActivityInfo.ColorMode |
| 3600 |
private int mColorMode = COLOR_MODE_DEFAULT; |
| 3601 |
|
| 3602 |
|
| 3603 |
|
| 3604 |
|
| 3605 |
|
| 3606 |
|
| 3607 |
|
| 3608 |
public final InsetsFlags insetsFlags = new InsetsFlags(); |
| 3609 |
|
| 3610 |
@ViewDebug.ExportedProperty(flagMapping = { |
| 3611 |
@ViewDebug.FlagToString( |
| 3612 |
mask = STATUS_BARS, |
| 3613 |
equals = STATUS_BARS, |
| 3614 |
name = "STATUS_BARS"), |
| 3615 |
@ViewDebug.FlagToString( |
| 3616 |
mask = NAVIGATION_BARS, |
| 3617 |
equals = NAVIGATION_BARS, |
| 3618 |
name = "NAVIGATION_BARS"), |
| 3619 |
@ViewDebug.FlagToString( |
| 3620 |
mask = CAPTION_BAR, |
| 3621 |
equals = CAPTION_BAR, |
| 3622 |
name = "CAPTION_BAR"), |
| 3623 |
@ViewDebug.FlagToString( |
| 3624 |
mask = IME, |
| 3625 |
equals = IME, |
| 3626 |
name = "IME"), |
| 3627 |
@ViewDebug.FlagToString( |
| 3628 |
mask = SYSTEM_GESTURES, |
| 3629 |
equals = SYSTEM_GESTURES, |
| 3630 |
name = "SYSTEM_GESTURES"), |
| 3631 |
@ViewDebug.FlagToString( |
| 3632 |
mask = MANDATORY_SYSTEM_GESTURES, |
| 3633 |
equals = MANDATORY_SYSTEM_GESTURES, |
| 3634 |
name = "MANDATORY_SYSTEM_GESTURES"), |
| 3635 |
@ViewDebug.FlagToString( |
| 3636 |
mask = TAPPABLE_ELEMENT, |
| 3637 |
equals = TAPPABLE_ELEMENT, |
| 3638 |
name = "TAPPABLE_ELEMENT"), |
| 3639 |
@ViewDebug.FlagToString( |
| 3640 |
mask = WINDOW_DECOR, |
| 3641 |
equals = WINDOW_DECOR, |
| 3642 |
name = "WINDOW_DECOR") |
| 3643 |
}) |
| 3644 |
private @InsetsType int mFitInsetsTypes = Type.systemBars(); |
| 3645 |
|
| 3646 |
@ViewDebug.ExportedProperty(flagMapping = { |
| 3647 |
@ViewDebug.FlagToString( |
| 3648 |
mask = LEFT, |
| 3649 |
equals = LEFT, |
| 3650 |
name = "LEFT"), |
| 3651 |
@ViewDebug.FlagToString( |
| 3652 |
mask = TOP, |
| 3653 |
equals = TOP, |
| 3654 |
name = "TOP"), |
| 3655 |
@ViewDebug.FlagToString( |
| 3656 |
mask = RIGHT, |
| 3657 |
equals = RIGHT, |
| 3658 |
name = "RIGHT"), |
| 3659 |
@ViewDebug.FlagToString( |
| 3660 |
mask = BOTTOM, |
| 3661 |
equals = BOTTOM, |
| 3662 |
name = "BOTTOM") |
| 3663 |
}) |
| 3664 |
private @InsetsSide int mFitInsetsSides = Side.all(); |
| 3665 |
|
| 3666 |
private boolean mFitInsetsIgnoringVisibility = false; |
| 3667 |
|
| 3668 |
|
| 3669 |
|
| 3670 |
|
| 3671 |
|
| 3672 |
|
| 3673 |
|
| 3674 |
|
| 3675 |
|
| 3676 |
|
| 3677 |
|
| 3678 |
|
| 3679 |
public InsetsFrameProvider[] providedInsets; |
| 3680 |
|
| 3681 |
|
| 3682 |
|
| 3683 |
|
| 3684 |
|
| 3685 |
|
| 3686 |
|
| 3687 |
|
| 3688 |
|
| 3689 |
|
| 3690 |
public boolean insetsRoundedCornerFrame = false; |
| 3691 |
|
| 3692 |
|
| 3693 |
|
| 3694 |
|
| 3695 |
|
| 3696 |
|
| 3697 |
|
| 3698 |
public LayoutParams[] paramsForRotation; |
| 3699 |
|
| 3700 |
|
| 3701 |
|
| 3702 |
|
| 3703 |
|
| 3704 |
|
| 3705 |
|
| 3706 |
public void setFitInsetsTypes(@InsetsType int types) { |
| 3707 |
mFitInsetsTypes = types; |
| 3708 |
privateFlags |= PRIVATE_FLAG_FIT_INSETS_CONTROLLED; |
| 3709 |
} |
| 3710 |
|
| 3711 |
|
| 3712 |
|
| 3713 |
|
| 3714 |
|
| 3715 |
|
| 3716 |
|
| 3717 |
public void setFitInsetsSides(@InsetsSide int sides) { |
| 3718 |
mFitInsetsSides = sides; |
| 3719 |
privateFlags |= PRIVATE_FLAG_FIT_INSETS_CONTROLLED; |
| 3720 |
} |
| 3721 |
|
| 3722 |
|
| 3723 |
|
| 3724 |
|
| 3725 |
|
| 3726 |
|
| 3727 |
public void setFitInsetsIgnoringVisibility(boolean ignore) { |
| 3728 |
mFitInsetsIgnoringVisibility = ignore; |
| 3729 |
privateFlags |= PRIVATE_FLAG_FIT_INSETS_CONTROLLED; |
| 3730 |
} |
| 3731 |
|
| 3732 |
|
| 3733 |
|
| 3734 |
|
| 3735 |
|
| 3736 |
|
| 3737 |
|
| 3738 |
|
| 3739 |
|
| 3740 |
|
| 3741 |
|
| 3742 |
public void setTrustedOverlay() { |
| 3743 |
privateFlags |= PRIVATE_FLAG_TRUSTED_OVERLAY; |
| 3744 |
} |
| 3745 |
|
| 3746 |
|
| 3747 |
|
| 3748 |
|
| 3749 |
|
| 3750 |
|
| 3751 |
|
| 3752 |
@SystemApi |
| 3753 |
@RequiresPermission(permission.SYSTEM_APPLICATION_OVERLAY) |
| 3754 |
public void setSystemApplicationOverlay(boolean isSystemApplicationOverlay) { |
| 3755 |
if (isSystemApplicationOverlay) { |
| 3756 |
privateFlags |= PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY; |
| 3757 |
} else { |
| 3758 |
privateFlags &= ~PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY; |
| 3759 |
} |
| 3760 |
} |
| 3761 |
|
| 3762 |
|
| 3763 |
|
| 3764 |
|
| 3765 |
|
| 3766 |
|
| 3767 |
|
| 3768 |
|
| 3769 |
|
| 3770 |
|
| 3771 |
@SystemApi |
| 3772 |
public boolean isSystemApplicationOverlay() { |
| 3773 |
return (privateFlags & PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY) |
| 3774 |
== PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY; |
| 3775 |
} |
| 3776 |
|
| 3777 |
|
| 3778 |
|
| 3779 |
|
| 3780 |
public @InsetsType int getFitInsetsTypes() { |
| 3781 |
return mFitInsetsTypes; |
| 3782 |
} |
| 3783 |
|
| 3784 |
|
| 3785 |
|
| 3786 |
|
| 3787 |
public @InsetsSide int getFitInsetsSides() { |
| 3788 |
return mFitInsetsSides; |
| 3789 |
} |
| 3790 |
|
| 3791 |
|
| 3792 |
|
| 3793 |
|
| 3794 |
|
| 3795 |
public boolean isFitInsetsIgnoringVisibility() { |
| 3796 |
return mFitInsetsIgnoringVisibility; |
| 3797 |
} |
| 3798 |
|
| 3799 |
private void checkNonRecursiveParams() { |
| 3800 |
if (paramsForRotation == null) { |
| 3801 |
return; |
| 3802 |
} |
| 3803 |
for (int i = paramsForRotation.length - 1; i >= 0; i--) { |
| 3804 |
if (paramsForRotation[i].paramsForRotation != null) { |
| 3805 |
throw new IllegalArgumentException( |
| 3806 |
"Params cannot contain params recursively."); |
| 3807 |
} |
| 3808 |
} |
| 3809 |
} |
| 3810 |
|
| 3811 |
|
| 3812 |
|
| 3813 |
|
| 3814 |
|
| 3815 |
public LayoutParams forRotation(int rotation) { |
| 3816 |
if (paramsForRotation == null || paramsForRotation.length <= rotation |
| 3817 |
|| paramsForRotation[rotation] == null) { |
| 3818 |
return this; |
| 3819 |
} |
| 3820 |
return paramsForRotation[rotation]; |
| 3821 |
} |
| 3822 |
|
| 3823 |
public LayoutParams() { |
| 3824 |
super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
| 3825 |
type = TYPE_APPLICATION; |
| 3826 |
format = PixelFormat.OPAQUE; |
| 3827 |
} |
| 3828 |
|
| 3829 |
public LayoutParams(int _type) { |
| 3830 |
super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
| 3831 |
type = _type; |
| 3832 |
format = PixelFormat.OPAQUE; |
| 3833 |
} |
| 3834 |
|
| 3835 |
public LayoutParams(int _type, int _flags) { |
| 3836 |
super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
| 3837 |
type = _type; |
| 3838 |
flags = _flags; |
| 3839 |
format = PixelFormat.OPAQUE; |
| 3840 |
} |
| 3841 |
|
| 3842 |
public LayoutParams(int _type, int _flags, int _format) { |
| 3843 |
super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); |
| 3844 |
type = _type; |
| 3845 |
flags = _flags; |
| 3846 |
format = _format; |
| 3847 |
} |
| 3848 |
|
| 3849 |
public LayoutParams(int w, int h, int _type, int _flags, int _format) { |
| 3850 |
super(w, h); |
| 3851 |
type = _type; |
| 3852 |
flags = _flags; |
| 3853 |
format = _format; |
| 3854 |
} |
| 3855 |
|
| 3856 |
public LayoutParams(int w, int h, int xpos, int ypos, int _type, |
| 3857 |
int _flags, int _format) { |
| 3858 |
super(w, h); |
| 3859 |
x = xpos; |
| 3860 |
y = ypos; |
| 3861 |
type = _type; |
| 3862 |
flags = _flags; |
| 3863 |
format = _format; |
| 3864 |
} |
| 3865 |
|
| 3866 |
public final void setTitle(CharSequence title) { |
| 3867 |
if (null == title) |
| 3868 |
title = ""; |
| 3869 |
|
| 3870 |
mTitle = TextUtils.stringOrSpannedString(title); |
| 3871 |
} |
| 3872 |
|
| 3873 |
public final CharSequence getTitle() { |
| 3874 |
return mTitle != null ? mTitle : ""; |
| 3875 |
} |
| 3876 |
|
| 3877 |
|
| 3878 |
|
| 3879 |
|
| 3880 |
|
| 3881 |
public final void setSurfaceInsets(View view, boolean manual, boolean preservePrevious) { |
| 3882 |
final int surfaceInset = (int) Math.ceil(view.getZ() * 2); |
| 3883 |
|
| 3884 |
|
| 3885 |
|
| 3886 |
|
| 3887 |
|
| 3888 |
if (surfaceInset == 0) { |
| 3889 |
|
| 3890 |
surfaceInsets.set(0, 0, 0, 0); |
| 3891 |
} else { |
| 3892 |
surfaceInsets.set( |
| 3893 |
Math.max(surfaceInset, surfaceInsets.left), |
| 3894 |
Math.max(surfaceInset, surfaceInsets.top), |
| 3895 |
Math.max(surfaceInset, surfaceInsets.right), |
| 3896 |
Math.max(surfaceInset, surfaceInsets.bottom)); |
| 3897 |
} |
| 3898 |
hasManualSurfaceInsets = manual; |
| 3899 |
preservePreviousSurfaceInsets = preservePrevious; |
| 3900 |
} |
| 3901 |
|
| 3902 |
|
| 3903 |
|
| 3904 |
|
| 3905 |
|
| 3906 |
|
| 3907 |
|
| 3908 |
|
| 3909 |
|
| 3910 |
|
| 3911 |
|
| 3912 |
public void setColorMode(@ActivityInfo.ColorMode int colorMode) { |
| 3913 |
mColorMode = colorMode; |
| 3914 |
} |
| 3915 |
|
| 3916 |
|
| 3917 |
|
| 3918 |
|
| 3919 |
|
| 3920 |
|
| 3921 |
|
| 3922 |
@ActivityInfo.ColorMode |
| 3923 |
public int getColorMode() { |
| 3924 |
return mColorMode; |
| 3925 |
} |
| 3926 |
|
| 3927 |
|
| 3928 |
|
| 3929 |
|
| 3930 |
|
| 3931 |
|
| 3932 |
|
| 3933 |
|
| 3934 |
|
| 3935 |
|
| 3936 |
|
| 3937 |
|
| 3938 |
|
| 3939 |
|
| 3940 |
|
| 3941 |
|
| 3942 |
|
| 3943 |
|
| 3944 |
|
| 3945 |
|
| 3946 |
|
| 3947 |
|
| 3948 |
|
| 3949 |
|
| 3950 |
|
| 3951 |
|
| 3952 |
|
| 3953 |
|
| 3954 |
|
| 3955 |
|
| 3956 |
|
| 3957 |
|
| 3958 |
|
| 3959 |
public void setBlurBehindRadius(@IntRange(from = 0) int blurBehindRadius) { |
| 3960 |
mBlurBehindRadius = blurBehindRadius; |
| 3961 |
} |
| 3962 |
|
| 3963 |
|
| 3964 |
|
| 3965 |
|
| 3966 |
|
| 3967 |
|
| 3968 |
public int getBlurBehindRadius() { |
| 3969 |
return mBlurBehindRadius; |
| 3970 |
} |
| 3971 |
|
| 3972 |
|
| 3973 |
@SystemApi |
| 3974 |
public final void setUserActivityTimeout(long timeout) { |
| 3975 |
userActivityTimeout = timeout; |
| 3976 |
} |
| 3977 |
|
| 3978 |
|
| 3979 |
@SystemApi |
| 3980 |
public final long getUserActivityTimeout() { |
| 3981 |
return userActivityTimeout; |
| 3982 |
} |
| 3983 |
|
| 3984 |
|
| 3985 |
|
| 3986 |
|
| 3987 |
|
| 3988 |
|
| 3989 |
|
| 3990 |
|
| 3991 |
@TestApi |
| 3992 |
public final void setWindowContextToken(@NonNull IBinder token) { |
| 3993 |
mWindowContextToken = token; |
| 3994 |
} |
| 3995 |
|
| 3996 |
|
| 3997 |
|
| 3998 |
|
| 3999 |
|
| 4000 |
|
| 4001 |
|
| 4002 |
|
| 4003 |
|
| 4004 |
|
| 4005 |
|
| 4006 |
|
| 4007 |
|
| 4008 |
|
| 4009 |
@TestApi |
| 4010 |
@Nullable |
| 4011 |
public final IBinder getWindowContextToken() { |
| 4012 |
return mWindowContextToken; |
| 4013 |
} |
| 4014 |
|
| 4015 |
public int describeContents() { |
| 4016 |
return 0; |
| 4017 |
} |
| 4018 |
|
| 4019 |
public void writeToParcel(Parcel out, int parcelableFlags) { |
| 4020 |
out.writeInt(width); |
| 4021 |
out.writeInt(height); |
| 4022 |
out.writeInt(x); |
| 4023 |
out.writeInt(y); |
| 4024 |
out.writeInt(type); |
| 4025 |
out.writeInt(flags); |
| 4026 |
out.writeInt(privateFlags); |
| 4027 |
out.writeInt(softInputMode); |
| 4028 |
out.writeInt(layoutInDisplayCutoutMode); |
| 4029 |
out.writeInt(gravity); |
| 4030 |
out.writeFloat(horizontalMargin); |
| 4031 |
out.writeFloat(verticalMargin); |
| 4032 |
out.writeInt(format); |
| 4033 |
out.writeInt(windowAnimations); |
| 4034 |
out.writeFloat(alpha); |
| 4035 |
out.writeFloat(dimAmount); |
| 4036 |
out.writeFloat(screenBrightness); |
| 4037 |
out.writeFloat(buttonBrightness); |
| 4038 |
out.writeInt(rotationAnimation); |
| 4039 |
out.writeStrongBinder(token); |
| 4040 |
out.writeStrongBinder(mWindowContextToken); |
| 4041 |
out.writeString(packageName); |
| 4042 |
TextUtils.writeToParcel(mTitle, out, parcelableFlags); |
| 4043 |
out.writeInt(screenOrientation); |
| 4044 |
out.writeFloat(preferredRefreshRate); |
| 4045 |
out.writeInt(preferredDisplayModeId); |
| 4046 |
out.writeFloat(preferredMinDisplayRefreshRate); |
| 4047 |
out.writeFloat(preferredMaxDisplayRefreshRate); |
| 4048 |
out.writeInt(systemUiVisibility); |
| 4049 |
out.writeInt(subtreeSystemUiVisibility); |
| 4050 |
out.writeBoolean(hasSystemUiListeners); |
| 4051 |
out.writeInt(inputFeatures); |
| 4052 |
out.writeLong(userActivityTimeout); |
| 4053 |
out.writeInt(surfaceInsets.left); |
| 4054 |
out.writeInt(surfaceInsets.top); |
| 4055 |
out.writeInt(surfaceInsets.right); |
| 4056 |
out.writeInt(surfaceInsets.bottom); |
| 4057 |
out.writeBoolean(hasManualSurfaceInsets); |
| 4058 |
out.writeBoolean(receiveInsetsIgnoringZOrder); |
| 4059 |
out.writeBoolean(preservePreviousSurfaceInsets); |
| 4060 |
out.writeLong(accessibilityIdOfAnchor); |
| 4061 |
TextUtils.writeToParcel(accessibilityTitle, out, parcelableFlags); |
| 4062 |
out.writeInt(mColorMode); |
| 4063 |
out.writeLong(hideTimeoutMilliseconds); |
| 4064 |
out.writeInt(insetsFlags.appearance); |
| 4065 |
out.writeInt(insetsFlags.behavior); |
| 4066 |
out.writeInt(mFitInsetsTypes); |
| 4067 |
out.writeInt(mFitInsetsSides); |
| 4068 |
out.writeBoolean(mFitInsetsIgnoringVisibility); |
| 4069 |
out.writeBoolean(preferMinimalPostProcessing); |
| 4070 |
out.writeInt(mBlurBehindRadius); |
| 4071 |
out.writeBoolean(insetsRoundedCornerFrame); |
| 4072 |
out.writeTypedArray(providedInsets, 0 ); |
| 4073 |
checkNonRecursiveParams(); |
| 4074 |
out.writeTypedArray(paramsForRotation, 0 ); |
| 4075 |
} |
| 4076 |
|
| 4077 |
public static final @android.annotation.NonNull Parcelable.Creator<LayoutParams> CREATOR |
| 4078 |
= new Parcelable.Creator<LayoutParams>() { |
| 4079 |
public LayoutParams createFromParcel(Parcel in) { |
| 4080 |
return new LayoutParams(in); |
| 4081 |
} |
| 4082 |
|
| 4083 |
public LayoutParams[] newArray(int size) { |
| 4084 |
return new LayoutParams[size]; |
| 4085 |
} |
| 4086 |
}; |
| 4087 |
|
| 4088 |
|
| 4089 |
public LayoutParams(Parcel in) { |
| 4090 |
width = in.readInt(); |
| 4091 |
height = in.readInt(); |
| 4092 |
x = in.readInt(); |
| 4093 |
y = in.readInt(); |
| 4094 |
type = in.readInt(); |
| 4095 |
flags = in.readInt(); |
| 4096 |
privateFlags = in.readInt(); |
| 4097 |
softInputMode = in.readInt(); |
| 4098 |
layoutInDisplayCutoutMode = in.readInt(); |
| 4099 |
gravity = in.readInt(); |
| 4100 |
horizontalMargin = in.readFloat(); |
| 4101 |
verticalMargin = in.readFloat(); |
| 4102 |
format = in.readInt(); |
| 4103 |
windowAnimations = in.readInt(); |
| 4104 |
alpha = in.readFloat(); |
| 4105 |
dimAmount = in.readFloat(); |
| 4106 |
screenBrightness = in.readFloat(); |
| 4107 |
buttonBrightness = in.readFloat(); |
| 4108 |
rotationAnimation = in.readInt(); |
| 4109 |
token = in.readStrongBinder(); |
| 4110 |
mWindowContextToken = in.readStrongBinder(); |
| 4111 |
packageName = in.readString(); |
| 4112 |
mTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in); |
| 4113 |
screenOrientation = in.readInt(); |
| 4114 |
preferredRefreshRate = in.readFloat(); |
| 4115 |
preferredDisplayModeId = in.readInt(); |
| 4116 |
preferredMinDisplayRefreshRate = in.readFloat(); |
| 4117 |
preferredMaxDisplayRefreshRate = in.readFloat(); |
| 4118 |
systemUiVisibility = in.readInt(); |
| 4119 |
subtreeSystemUiVisibility = in.readInt(); |
| 4120 |
hasSystemUiListeners = in.readBoolean(); |
| 4121 |
inputFeatures = in.readInt(); |
| 4122 |
userActivityTimeout = in.readLong(); |
| 4123 |
surfaceInsets.left = in.readInt(); |
| 4124 |
surfaceInsets.top = in.readInt(); |
| 4125 |
surfaceInsets.right = in.readInt(); |
| 4126 |
surfaceInsets.bottom = in.readInt(); |
| 4127 |
hasManualSurfaceInsets = in.readBoolean(); |
| 4128 |
receiveInsetsIgnoringZOrder = in.readBoolean(); |
| 4129 |
preservePreviousSurfaceInsets = in.readBoolean(); |
| 4130 |
accessibilityIdOfAnchor = in.readLong(); |
| 4131 |
accessibilityTitle = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in); |
| 4132 |
mColorMode = in.readInt(); |
| 4133 |
hideTimeoutMilliseconds = in.readLong(); |
| 4134 |
insetsFlags.appearance = in.readInt(); |
| 4135 |
insetsFlags.behavior = in.readInt(); |
| 4136 |
mFitInsetsTypes = in.readInt(); |
| 4137 |
mFitInsetsSides = in.readInt(); |
| 4138 |
mFitInsetsIgnoringVisibility = in.readBoolean(); |
| 4139 |
preferMinimalPostProcessing = in.readBoolean(); |
| 4140 |
mBlurBehindRadius = in.readInt(); |
| 4141 |
insetsRoundedCornerFrame = in.readBoolean(); |
| 4142 |
providedInsets = in.createTypedArray(InsetsFrameProvider.CREATOR); |
| 4143 |
paramsForRotation = in.createTypedArray(LayoutParams.CREATOR); |
| 4144 |
} |
| 4145 |
|
| 4146 |
@SuppressWarnings({"PointlessBitwiseExpression"}) |
| 4147 |
public static final int LAYOUT_CHANGED = 1<<0; |
| 4148 |
public static final int TYPE_CHANGED = 1<<1; |
| 4149 |
public static final int FLAGS_CHANGED = 1<<2; |
| 4150 |
public static final int FORMAT_CHANGED = 1<<3; |
| 4151 |
public static final int ANIMATION_CHANGED = 1<<4; |
| 4152 |
public static final int DIM_AMOUNT_CHANGED = 1<<5; |
| 4153 |
public static final int TITLE_CHANGED = 1<<6; |
| 4154 |
public static final int ALPHA_CHANGED = 1<<7; |
| 4155 |
public static final int MEMORY_TYPE_CHANGED = 1<<8; |
| 4156 |
public static final int SOFT_INPUT_MODE_CHANGED = 1<<9; |
| 4157 |
public static final int SCREEN_ORIENTATION_CHANGED = 1<<10; |
| 4158 |
public static final int SCREEN_BRIGHTNESS_CHANGED = 1<<11; |
| 4159 |
public static final int ROTATION_ANIMATION_CHANGED = 1<<12; |
| 4160 |
|
| 4161 |
public static final int BUTTON_BRIGHTNESS_CHANGED = 1<<13; |
| 4162 |
|
| 4163 |
public static final int SYSTEM_UI_VISIBILITY_CHANGED = 1<<14; |
| 4164 |
|
| 4165 |
public static final int SYSTEM_UI_LISTENER_CHANGED = 1<<15; |
| 4166 |
|
| 4167 |
public static final int INPUT_FEATURES_CHANGED = 1<<16; |
| 4168 |
|
| 4169 |
public static final int PRIVATE_FLAGS_CHANGED = 1<<17; |
| 4170 |
|
| 4171 |
public static final int USER_ACTIVITY_TIMEOUT_CHANGED = 1<<18; |
| 4172 |
|
| 4173 |
public static final int TRANSLUCENT_FLAGS_CHANGED = 1<<19; |
| 4174 |
|
| 4175 |
public static final int SURFACE_INSETS_CHANGED = 1<<20; |
| 4176 |
|
| 4177 |
public static final int PREFERRED_REFRESH_RATE_CHANGED = 1 << 21; |
| 4178 |
|
| 4179 |
public static final int PREFERRED_DISPLAY_MODE_ID = 1 << 23; |
| 4180 |
|
| 4181 |
public static final int ACCESSIBILITY_ANCHOR_CHANGED = 1 << 24; |
| 4182 |
|
| 4183 |
@TestApi |
| 4184 |
public static final int ACCESSIBILITY_TITLE_CHANGED = 1 << 25; |
| 4185 |
|
| 4186 |
public static final int COLOR_MODE_CHANGED = 1 << 26; |
| 4187 |
|
| 4188 |
public static final int INSET_FLAGS_CHANGED = 1 << 27; |
| 4189 |
|
| 4190 |
public static final int MINIMAL_POST_PROCESSING_PREFERENCE_CHANGED = 1 << 28; |
| 4191 |
|
| 4192 |
public static final int BLUR_BEHIND_RADIUS_CHANGED = 1 << 29; |
| 4193 |
|
| 4194 |
public static final int PREFERRED_MIN_DISPLAY_REFRESH_RATE = 1 << 30; |
| 4195 |
|
| 4196 |
public static final int PREFERRED_MAX_DISPLAY_REFRESH_RATE = 1 << 31; |
| 4197 |
|
| 4198 |
|
| 4199 |
private int[] mCompatibilityParamsBackup = null; |
| 4200 |
|
| 4201 |
public final int copyFrom(LayoutParams o) { |
| 4202 |
int changes = 0; |
| 4203 |
|
| 4204 |
if (width != o.width) { |
| 4205 |
width = o.width; |
| 4206 |
changes |= LAYOUT_CHANGED; |
| 4207 |
} |
| 4208 |
if (height != o.height) { |
| 4209 |
height = o.height; |
| 4210 |
changes |= LAYOUT_CHANGED; |
| 4211 |
} |
| 4212 |
if (x != o.x) { |
| 4213 |
x = o.x; |
| 4214 |
changes |= LAYOUT_CHANGED; |
| 4215 |
} |
| 4216 |
if (y != o.y) { |
| 4217 |
y = o.y; |
| 4218 |
changes |= LAYOUT_CHANGED; |
| 4219 |
} |
| 4220 |
if (horizontalWeight != o.horizontalWeight) { |
| 4221 |
horizontalWeight = o.horizontalWeight; |
| 4222 |
changes |= LAYOUT_CHANGED; |
| 4223 |
} |
| 4224 |
if (verticalWeight != o.verticalWeight) { |
| 4225 |
verticalWeight = o.verticalWeight; |
| 4226 |
changes |= LAYOUT_CHANGED; |
| 4227 |
} |
| 4228 |
if (horizontalMargin != o.horizontalMargin) { |
| 4229 |
horizontalMargin = o.horizontalMargin; |
| 4230 |
changes |= LAYOUT_CHANGED; |
| 4231 |
} |
| 4232 |
if (verticalMargin != o.verticalMargin) { |
| 4233 |
verticalMargin = o.verticalMargin; |
| 4234 |
changes |= LAYOUT_CHANGED; |
| 4235 |
} |
| 4236 |
if (type != o.type) { |
| 4237 |
type = o.type; |
| 4238 |
changes |= TYPE_CHANGED; |
| 4239 |
} |
| 4240 |
if (flags != o.flags) { |
| 4241 |
final int diff = flags ^ o.flags; |
| 4242 |
if ((diff & (FLAG_TRANSLUCENT_STATUS | FLAG_TRANSLUCENT_NAVIGATION)) != 0) { |
| 4243 |
changes |= TRANSLUCENT_FLAGS_CHANGED; |
| 4244 |
} |
| 4245 |
flags = o.flags; |
| 4246 |
changes |= FLAGS_CHANGED; |
| 4247 |
} |
| 4248 |
if (privateFlags != o.privateFlags) { |
| 4249 |
privateFlags = o.privateFlags; |
| 4250 |
changes |= PRIVATE_FLAGS_CHANGED; |
| 4251 |
} |
| 4252 |
if (softInputMode != o.softInputMode) { |
| 4253 |
softInputMode = o.softInputMode; |
| 4254 |
changes |= SOFT_INPUT_MODE_CHANGED; |
| 4255 |
} |
| 4256 |
if (layoutInDisplayCutoutMode != o.layoutInDisplayCutoutMode) { |
| 4257 |
layoutInDisplayCutoutMode = o.layoutInDisplayCutoutMode; |
| 4258 |
changes |= LAYOUT_CHANGED; |
| 4259 |
} |
| 4260 |
if (gravity != o.gravity) { |
| 4261 |
gravity = o.gravity; |
| 4262 |
changes |= LAYOUT_CHANGED; |
| 4263 |
} |
| 4264 |
if (format != o.format) { |
| 4265 |
format = o.format; |
| 4266 |
changes |= FORMAT_CHANGED; |
| 4267 |
} |
| 4268 |
if (windowAnimations != o.windowAnimations) { |
| 4269 |
windowAnimations = o.windowAnimations; |
| 4270 |
changes |= ANIMATION_CHANGED; |
| 4271 |
} |
| 4272 |
if (token == null) { |
| 4273 |
|
| 4274 |
|
| 4275 |
token = o.token; |
| 4276 |
} |
| 4277 |
if (mWindowContextToken == null) { |
| 4278 |
|
| 4279 |
|
| 4280 |
mWindowContextToken = o.mWindowContextToken; |
| 4281 |
} |
| 4282 |
if (packageName == null) { |
| 4283 |
|
| 4284 |
|
| 4285 |
packageName = o.packageName; |
| 4286 |
} |
| 4287 |
if (!Objects.equals(mTitle, o.mTitle) && o.mTitle != null) { |
| 4288 |
|
| 4289 |
mTitle = o.mTitle; |
| 4290 |
changes |= TITLE_CHANGED; |
| 4291 |
} |
| 4292 |
if (alpha != o.alpha) { |
| 4293 |
alpha = o.alpha; |
| 4294 |
changes |= ALPHA_CHANGED; |
| 4295 |
} |
| 4296 |
if (dimAmount != o.dimAmount) { |
| 4297 |
dimAmount = o.dimAmount; |
| 4298 |
changes |= DIM_AMOUNT_CHANGED; |
| 4299 |
} |
| 4300 |
if (screenBrightness != o.screenBrightness) { |
| 4301 |
screenBrightness = o.screenBrightness; |
| 4302 |
changes |= SCREEN_BRIGHTNESS_CHANGED; |
| 4303 |
} |
| 4304 |
if (buttonBrightness != o.buttonBrightness) { |
| 4305 |
buttonBrightness = o.buttonBrightness; |
| 4306 |
changes |= BUTTON_BRIGHTNESS_CHANGED; |
| 4307 |
} |
| 4308 |
if (rotationAnimation != o.rotationAnimation) { |
| 4309 |
rotationAnimation = o.rotationAnimation; |
| 4310 |
changes |= ROTATION_ANIMATION_CHANGED; |
| 4311 |
} |
| 4312 |
|
| 4313 |
if (screenOrientation != o.screenOrientation) { |
| 4314 |
screenOrientation = o.screenOrientation; |
| 4315 |
changes |= SCREEN_ORIENTATION_CHANGED; |
| 4316 |
} |
| 4317 |
|
| 4318 |
if (preferredRefreshRate != o.preferredRefreshRate) { |
| 4319 |
preferredRefreshRate = o.preferredRefreshRate; |
| 4320 |
changes |= PREFERRED_REFRESH_RATE_CHANGED; |
| 4321 |
} |
| 4322 |
|
| 4323 |
if (preferredDisplayModeId != o.preferredDisplayModeId) { |
| 4324 |
preferredDisplayModeId = o.preferredDisplayModeId; |
| 4325 |
changes |= PREFERRED_DISPLAY_MODE_ID; |
| 4326 |
} |
| 4327 |
|
| 4328 |
if (preferredMinDisplayRefreshRate != o.preferredMinDisplayRefreshRate) { |
| 4329 |
preferredMinDisplayRefreshRate = o.preferredMinDisplayRefreshRate; |
| 4330 |
changes |= PREFERRED_MIN_DISPLAY_REFRESH_RATE; |
| 4331 |
} |
| 4332 |
|
| 4333 |
if (preferredMaxDisplayRefreshRate != o.preferredMaxDisplayRefreshRate) { |
| 4334 |
preferredMaxDisplayRefreshRate = o.preferredMaxDisplayRefreshRate; |
| 4335 |
changes |= PREFERRED_MAX_DISPLAY_REFRESH_RATE; |
| 4336 |
} |
| 4337 |
|
| 4338 |
if (systemUiVisibility != o.systemUiVisibility |
| 4339 |
|| subtreeSystemUiVisibility != o.subtreeSystemUiVisibility) { |
| 4340 |
systemUiVisibility = o.systemUiVisibility; |
| 4341 |
subtreeSystemUiVisibility = o.subtreeSystemUiVisibility; |
| 4342 |
changes |= SYSTEM_UI_VISIBILITY_CHANGED; |
| 4343 |
} |
| 4344 |
|
| 4345 |
if (hasSystemUiListeners != o.hasSystemUiListeners) { |
| 4346 |
hasSystemUiListeners = o.hasSystemUiListeners; |
| 4347 |
changes |= SYSTEM_UI_LISTENER_CHANGED; |
| 4348 |
} |
| 4349 |
|
| 4350 |
if (inputFeatures != o.inputFeatures) { |
| 4351 |
inputFeatures = o.inputFeatures; |
| 4352 |
changes |= INPUT_FEATURES_CHANGED; |
| 4353 |
} |
| 4354 |
|
| 4355 |
if (userActivityTimeout != o.userActivityTimeout) { |
| 4356 |
userActivityTimeout = o.userActivityTimeout; |
| 4357 |
changes |= USER_ACTIVITY_TIMEOUT_CHANGED; |
| 4358 |
} |
| 4359 |
|
| 4360 |
if (!surfaceInsets.equals(o.surfaceInsets)) { |
| 4361 |
surfaceInsets.set(o.surfaceInsets); |
| 4362 |
changes |= SURFACE_INSETS_CHANGED; |
| 4363 |
} |
| 4364 |
|
| 4365 |
if (hasManualSurfaceInsets != o.hasManualSurfaceInsets) { |
| 4366 |
hasManualSurfaceInsets = o.hasManualSurfaceInsets; |
| 4367 |
changes |= SURFACE_INSETS_CHANGED; |
| 4368 |
} |
| 4369 |
|
| 4370 |
if (receiveInsetsIgnoringZOrder != o.receiveInsetsIgnoringZOrder) { |
| 4371 |
receiveInsetsIgnoringZOrder = o.receiveInsetsIgnoringZOrder; |
| 4372 |
changes |= SURFACE_INSETS_CHANGED; |
| 4373 |
} |
| 4374 |
|
| 4375 |
if (preservePreviousSurfaceInsets != o.preservePreviousSurfaceInsets) { |
| 4376 |
preservePreviousSurfaceInsets = o.preservePreviousSurfaceInsets; |
| 4377 |
changes |= SURFACE_INSETS_CHANGED; |
| 4378 |
} |
| 4379 |
|
| 4380 |
if (accessibilityIdOfAnchor != o.accessibilityIdOfAnchor) { |
| 4381 |
accessibilityIdOfAnchor = o.accessibilityIdOfAnchor; |
| 4382 |
changes |= ACCESSIBILITY_ANCHOR_CHANGED; |
| 4383 |
} |
| 4384 |
|
| 4385 |
if (!Objects.equals(accessibilityTitle, o.accessibilityTitle) |
| 4386 |
&& o.accessibilityTitle != null) { |
| 4387 |
|
| 4388 |
accessibilityTitle = o.accessibilityTitle; |
| 4389 |
changes |= ACCESSIBILITY_TITLE_CHANGED; |
| 4390 |
} |
| 4391 |
|
| 4392 |
if (mColorMode != o.mColorMode) { |
| 4393 |
mColorMode = o.mColorMode; |
| 4394 |
changes |= COLOR_MODE_CHANGED; |
| 4395 |
} |
| 4396 |
|
| 4397 |
if (preferMinimalPostProcessing != o.preferMinimalPostProcessing) { |
| 4398 |
preferMinimalPostProcessing = o.preferMinimalPostProcessing; |
| 4399 |
changes |= MINIMAL_POST_PROCESSING_PREFERENCE_CHANGED; |
| 4400 |
} |
| 4401 |
|
| 4402 |
if (mBlurBehindRadius != o.mBlurBehindRadius) { |
| 4403 |
mBlurBehindRadius = o.mBlurBehindRadius; |
| 4404 |
changes |= BLUR_BEHIND_RADIUS_CHANGED; |
| 4405 |
} |
| 4406 |
|
| 4407 |
|
| 4408 |
hideTimeoutMilliseconds = o.hideTimeoutMilliseconds; |
| 4409 |
|
| 4410 |
if (insetsFlags.appearance != o.insetsFlags.appearance) { |
| 4411 |
insetsFlags.appearance = o.insetsFlags.appearance; |
| 4412 |
changes |= INSET_FLAGS_CHANGED; |
| 4413 |
} |
| 4414 |
|
| 4415 |
if (insetsFlags.behavior != o.insetsFlags.behavior) { |
| 4416 |
insetsFlags.behavior = o.insetsFlags.behavior; |
| 4417 |
changes |= INSET_FLAGS_CHANGED; |
| 4418 |
} |
| 4419 |
|
| 4420 |
if (mFitInsetsTypes != o.mFitInsetsTypes) { |
| 4421 |
mFitInsetsTypes = o.mFitInsetsTypes; |
| 4422 |
changes |= LAYOUT_CHANGED; |
| 4423 |
} |
| 4424 |
|
| 4425 |
if (mFitInsetsSides != o.mFitInsetsSides) { |
| 4426 |
mFitInsetsSides = o.mFitInsetsSides; |
| 4427 |
changes |= LAYOUT_CHANGED; |
| 4428 |
} |
| 4429 |
|
| 4430 |
if (mFitInsetsIgnoringVisibility != o.mFitInsetsIgnoringVisibility) { |
| 4431 |
mFitInsetsIgnoringVisibility = o.mFitInsetsIgnoringVisibility; |
| 4432 |
changes |= LAYOUT_CHANGED; |
| 4433 |
} |
| 4434 |
|
| 4435 |
if (!Arrays.equals(providedInsets, o.providedInsets)) { |
| 4436 |
providedInsets = o.providedInsets; |
| 4437 |
changes |= LAYOUT_CHANGED; |
| 4438 |
} |
| 4439 |
|
| 4440 |
if (insetsRoundedCornerFrame != o.insetsRoundedCornerFrame) { |
| 4441 |
insetsRoundedCornerFrame = o.insetsRoundedCornerFrame; |
| 4442 |
changes |= LAYOUT_CHANGED; |
| 4443 |
} |
| 4444 |
|
| 4445 |
if (paramsForRotation != o.paramsForRotation) { |
| 4446 |
if ((changes & LAYOUT_CHANGED) == 0) { |
| 4447 |
if (paramsForRotation != null && o.paramsForRotation != null |
| 4448 |
&& paramsForRotation.length == o.paramsForRotation.length) { |
| 4449 |
for (int i = paramsForRotation.length - 1; i >= 0; i--) { |
| 4450 |
if (hasLayoutDiff(paramsForRotation[i], o.paramsForRotation[i])) { |
| 4451 |
changes |= LAYOUT_CHANGED; |
| 4452 |
break; |
| 4453 |
} |
| 4454 |
} |
| 4455 |
} else { |
| 4456 |
changes |= LAYOUT_CHANGED; |
| 4457 |
} |
| 4458 |
} |
| 4459 |
paramsForRotation = o.paramsForRotation; |
| 4460 |
checkNonRecursiveParams(); |
| 4461 |
} |
| 4462 |
|
| 4463 |
return changes; |
| 4464 |
} |
| 4465 |
|
| 4466 |
|
| 4467 |
|
| 4468 |
|
| 4469 |
|
| 4470 |
private static boolean hasLayoutDiff(LayoutParams a, LayoutParams b) { |
| 4471 |
return a.width != b.width || a.height != b.height || a.x != b.x || a.y != b.y |
| 4472 |
|| a.horizontalMargin != b.horizontalMargin |
| 4473 |
|| a.verticalMargin != b.verticalMargin |
| 4474 |
|| a.layoutInDisplayCutoutMode != b.layoutInDisplayCutoutMode |
| 4475 |
|| a.gravity != b.gravity || !Arrays.equals(a.providedInsets, b.providedInsets) |
| 4476 |
|| a.mFitInsetsTypes != b.mFitInsetsTypes |
| 4477 |
|| a.mFitInsetsSides != b.mFitInsetsSides |
| 4478 |
|| a.mFitInsetsIgnoringVisibility != b.mFitInsetsIgnoringVisibility; |
| 4479 |
} |
| 4480 |
|
| 4481 |
@Override |
| 4482 |
public String debug(String output) { |
| 4483 |
output += "Contents of " + this + ":"; |
| 4484 |
Log.d("Debug", output); |
| 4485 |
output = super.debug(""); |
| 4486 |
Log.d("Debug", output); |
| 4487 |
Log.d("Debug", ""); |
| 4488 |
Log.d("Debug", "WindowManager.LayoutParams={title=" + mTitle + "}"); |
| 4489 |
return ""; |
| 4490 |
} |
| 4491 |
|
| 4492 |
@Override |
| 4493 |
public String toString() { |
| 4494 |
return toString(""); |
| 4495 |
} |
| 4496 |
|
| 4497 |
|
| 4498 |
|
| 4499 |
|
| 4500 |
public void dumpDimensions(StringBuilder sb) { |
| 4501 |
sb.append('('); |
| 4502 |
sb.append(x); |
| 4503 |
sb.append(','); |
| 4504 |
sb.append(y); |
| 4505 |
sb.append(")("); |
| 4506 |
sb.append((width == MATCH_PARENT ? "fill" : (width == WRAP_CONTENT |
| 4507 |
? "wrap" : String.valueOf(width)))); |
| 4508 |
sb.append('x'); |
| 4509 |
sb.append((height == MATCH_PARENT ? "fill" : (height == WRAP_CONTENT |
| 4510 |
? "wrap" : String.valueOf(height)))); |
| 4511 |
sb.append(")"); |
| 4512 |
} |
| 4513 |
|
| 4514 |
|
| 4515 |
|
| 4516 |
|
| 4517 |
public String toString(String prefix) { |
| 4518 |
StringBuilder sb = new StringBuilder(256); |
| 4519 |
sb.append('{'); |
| 4520 |
dumpDimensions(sb); |
| 4521 |
if (horizontalMargin != 0) { |
| 4522 |
sb.append(" hm="); |
| 4523 |
sb.append(horizontalMargin); |
| 4524 |
} |
| 4525 |
if (verticalMargin != 0) { |
| 4526 |
sb.append(" vm="); |
| 4527 |
sb.append(verticalMargin); |
| 4528 |
} |
| 4529 |
if (gravity != 0) { |
| 4530 |
sb.append(" gr="); |
| 4531 |
sb.append(Gravity.toString(gravity)); |
| 4532 |
} |
| 4533 |
if (softInputMode != 0) { |
| 4534 |
sb.append(" sim={"); |
| 4535 |
sb.append(softInputModeToString(softInputMode)); |
| 4536 |
sb.append('}'); |
| 4537 |
} |
| 4538 |
if (layoutInDisplayCutoutMode != 0) { |
| 4539 |
sb.append(" layoutInDisplayCutoutMode="); |
| 4540 |
sb.append(layoutInDisplayCutoutModeToString(layoutInDisplayCutoutMode)); |
| 4541 |
} |
| 4542 |
sb.append(" ty="); |
| 4543 |
sb.append(ViewDebug.intToString(LayoutParams.class, "type", type)); |
| 4544 |
if (format != PixelFormat.OPAQUE) { |
| 4545 |
sb.append(" fmt="); |
| 4546 |
sb.append(PixelFormat.formatToString(format)); |
| 4547 |
} |
| 4548 |
if (windowAnimations != 0) { |
| 4549 |
sb.append(" wanim=0x"); |
| 4550 |
sb.append(Integer.toHexString(windowAnimations)); |
| 4551 |
} |
| 4552 |
if (screenOrientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) { |
| 4553 |
sb.append(" or="); |
| 4554 |
sb.append(ActivityInfo.screenOrientationToString(screenOrientation)); |
| 4555 |
} |
| 4556 |
if (alpha != 1.0f) { |
| 4557 |
sb.append(" alpha="); |
| 4558 |
sb.append(alpha); |
| 4559 |
} |
| 4560 |
if (screenBrightness != BRIGHTNESS_OVERRIDE_NONE) { |
| 4561 |
sb.append(" sbrt="); |
| 4562 |
sb.append(screenBrightness); |
| 4563 |
} |
| 4564 |
if (buttonBrightness != BRIGHTNESS_OVERRIDE_NONE) { |
| 4565 |
sb.append(" bbrt="); |
| 4566 |
sb.append(buttonBrightness); |
| 4567 |
} |
| 4568 |
if (rotationAnimation != ROTATION_ANIMATION_ROTATE) { |
| 4569 |
sb.append(" rotAnim="); |
| 4570 |
sb.append(rotationAnimationToString(rotationAnimation)); |
| 4571 |
} |
| 4572 |
if (preferredRefreshRate != 0) { |
| 4573 |
sb.append(" preferredRefreshRate="); |
| 4574 |
sb.append(preferredRefreshRate); |
| 4575 |
} |
| 4576 |
if (preferredDisplayModeId != 0) { |
| 4577 |
sb.append(" preferredDisplayMode="); |
| 4578 |
sb.append(preferredDisplayModeId); |
| 4579 |
} |
| 4580 |
if (preferredMinDisplayRefreshRate != 0) { |
| 4581 |
sb.append(" preferredMinDisplayRefreshRate="); |
| 4582 |
sb.append(preferredMinDisplayRefreshRate); |
| 4583 |
} |
| 4584 |
if (preferredMaxDisplayRefreshRate != 0) { |
| 4585 |
sb.append(" preferredMaxDisplayRefreshRate="); |
| 4586 |
sb.append(preferredMaxDisplayRefreshRate); |
| 4587 |
} |
| 4588 |
if (hasSystemUiListeners) { |
| 4589 |
sb.append(" sysuil="); |
| 4590 |
sb.append(hasSystemUiListeners); |
| 4591 |
} |
| 4592 |
if (inputFeatures != 0) { |
| 4593 |
sb.append(" if=").append(inputFeaturesToString(inputFeatures)); |
| 4594 |
} |
| 4595 |
if (userActivityTimeout >= 0) { |
| 4596 |
sb.append(" userActivityTimeout=").append(userActivityTimeout); |
| 4597 |
} |
| 4598 |
if (surfaceInsets.left != 0 || surfaceInsets.top != 0 || surfaceInsets.right != 0 || |
| 4599 |
surfaceInsets.bottom != 0 || hasManualSurfaceInsets |
| 4600 |
|| !preservePreviousSurfaceInsets) { |
| 4601 |
sb.append(" surfaceInsets=").append(surfaceInsets); |
| 4602 |
if (hasManualSurfaceInsets) { |
| 4603 |
sb.append(" (manual)"); |
| 4604 |
} |
| 4605 |
if (!preservePreviousSurfaceInsets) { |
| 4606 |
sb.append(" (!preservePreviousSurfaceInsets)"); |
| 4607 |
} |
| 4608 |
} |
| 4609 |
if (receiveInsetsIgnoringZOrder) { |
| 4610 |
sb.append(" receive insets ignoring z-order"); |
| 4611 |
} |
| 4612 |
if (mColorMode != COLOR_MODE_DEFAULT) { |
| 4613 |
sb.append(" colorMode=").append(ActivityInfo.colorModeToString(mColorMode)); |
| 4614 |
} |
| 4615 |
if (preferMinimalPostProcessing) { |
| 4616 |
sb.append(" preferMinimalPostProcessing="); |
| 4617 |
sb.append(preferMinimalPostProcessing); |
| 4618 |
} |
| 4619 |
if (mBlurBehindRadius != 0) { |
| 4620 |
sb.append(" blurBehindRadius="); |
| 4621 |
sb.append(mBlurBehindRadius); |
| 4622 |
} |
| 4623 |
sb.append(System.lineSeparator()); |
| 4624 |
sb.append(prefix).append(" fl=").append( |
| 4625 |
ViewDebug.flagsToString(LayoutParams.class, "flags", flags)); |
| 4626 |
if (privateFlags != 0) { |
| 4627 |
sb.append(System.lineSeparator()); |
| 4628 |
sb.append(prefix).append(" pfl=").append(ViewDebug.flagsToString( |
| 4629 |
LayoutParams.class, "privateFlags", privateFlags)); |
| 4630 |
} |
| 4631 |
if (systemUiVisibility != 0) { |
| 4632 |
sb.append(System.lineSeparator()); |
| 4633 |
sb.append(prefix).append(" sysui=").append(ViewDebug.flagsToString( |
| 4634 |
View.class, "mSystemUiVisibility", systemUiVisibility)); |
| 4635 |
} |
| 4636 |
if (subtreeSystemUiVisibility != 0) { |
| 4637 |
sb.append(System.lineSeparator()); |
| 4638 |
sb.append(prefix).append(" vsysui=").append(ViewDebug.flagsToString( |
| 4639 |
View.class, "mSystemUiVisibility", subtreeSystemUiVisibility)); |
| 4640 |
} |
| 4641 |
if (insetsFlags.appearance != 0) { |
| 4642 |
sb.append(System.lineSeparator()); |
| 4643 |
sb.append(prefix).append(" apr=").append(ViewDebug.flagsToString( |
| 4644 |
InsetsFlags.class, "appearance", insetsFlags.appearance)); |
| 4645 |
} |
| 4646 |
if (insetsFlags.behavior != 0) { |
| 4647 |
sb.append(System.lineSeparator()); |
| 4648 |
sb.append(prefix).append(" bhv=").append(ViewDebug.flagsToString( |
| 4649 |
InsetsFlags.class, "behavior", insetsFlags.behavior)); |
| 4650 |
} |
| 4651 |
if (mFitInsetsTypes != 0) { |
| 4652 |
sb.append(System.lineSeparator()); |
| 4653 |
sb.append(prefix).append(" fitTypes=").append(ViewDebug.flagsToString( |
| 4654 |
LayoutParams.class, "mFitInsetsTypes", mFitInsetsTypes)); |
| 4655 |
} |
| 4656 |
if (mFitInsetsSides != Side.all()) { |
| 4657 |
sb.append(System.lineSeparator()); |
| 4658 |
sb.append(prefix).append(" fitSides=").append(ViewDebug.flagsToString( |
| 4659 |
LayoutParams.class, "mFitInsetsSides", mFitInsetsSides)); |
| 4660 |
} |
| 4661 |
if (mFitInsetsIgnoringVisibility) { |
| 4662 |
sb.append(System.lineSeparator()); |
| 4663 |
sb.append(prefix).append(" fitIgnoreVis"); |
| 4664 |
} |
| 4665 |
if (providedInsets != null) { |
| 4666 |
sb.append(System.lineSeparator()); |
| 4667 |
sb.append(" providedInsets="); |
| 4668 |
for (int i = 0; i < providedInsets.length; ++i) { |
| 4669 |
if (i > 0) sb.append(' '); |
| 4670 |
sb.append((providedInsets[i])); |
| 4671 |
} |
| 4672 |
} |
| 4673 |
if (insetsRoundedCornerFrame) { |
| 4674 |
sb.append(" insetsRoundedCornerFrame="); |
| 4675 |
sb.append(insetsRoundedCornerFrame); |
| 4676 |
} |
| 4677 |
if (paramsForRotation != null && paramsForRotation.length != 0) { |
| 4678 |
sb.append(System.lineSeparator()); |
| 4679 |
sb.append(prefix).append(" paramsForRotation="); |
| 4680 |
for (int i = 0; i < paramsForRotation.length; ++i) { |
| 4681 |
if (i > 0) sb.append(' '); |
| 4682 |
sb.append(paramsForRotation[i].toString()); |
| 4683 |
} |
| 4684 |
} |
| 4685 |
|
| 4686 |
sb.append('}'); |
| 4687 |
return sb.toString(); |
| 4688 |
} |
| 4689 |
|
| 4690 |
|
| 4691 |
|
| 4692 |
|
| 4693 |
public void dumpDebug(ProtoOutputStream proto, long fieldId) { |
| 4694 |
final long token = proto.start(fieldId); |
| 4695 |
proto.write(TYPE, type); |
| 4696 |
proto.write(X, x); |
| 4697 |
proto.write(Y, y); |
| 4698 |
proto.write(WIDTH, width); |
| 4699 |
proto.write(HEIGHT, height); |
| 4700 |
proto.write(HORIZONTAL_MARGIN, horizontalMargin); |
| 4701 |
proto.write(VERTICAL_MARGIN, verticalMargin); |
| 4702 |
proto.write(GRAVITY, gravity); |
| 4703 |
proto.write(SOFT_INPUT_MODE, softInputMode); |
| 4704 |
proto.write(FORMAT, format); |
| 4705 |
proto.write(WINDOW_ANIMATIONS, windowAnimations); |
| 4706 |
proto.write(ALPHA, alpha); |
| 4707 |
proto.write(SCREEN_BRIGHTNESS, screenBrightness); |
| 4708 |
proto.write(BUTTON_BRIGHTNESS, buttonBrightness); |
| 4709 |
proto.write(ROTATION_ANIMATION, rotationAnimation); |
| 4710 |
proto.write(PREFERRED_REFRESH_RATE, preferredRefreshRate); |
| 4711 |
proto.write(WindowLayoutParamsProto.PREFERRED_DISPLAY_MODE_ID, preferredDisplayModeId); |
| 4712 |
proto.write(HAS_SYSTEM_UI_LISTENERS, hasSystemUiListeners); |
| 4713 |
proto.write(INPUT_FEATURE_FLAGS, inputFeatures); |
| 4714 |
proto.write(USER_ACTIVITY_TIMEOUT, userActivityTimeout); |
| 4715 |
proto.write(COLOR_MODE, mColorMode); |
| 4716 |
proto.write(FLAGS, flags); |
| 4717 |
proto.write(PRIVATE_FLAGS, privateFlags); |
| 4718 |
proto.write(SYSTEM_UI_VISIBILITY_FLAGS, systemUiVisibility); |
| 4719 |
proto.write(SUBTREE_SYSTEM_UI_VISIBILITY_FLAGS, subtreeSystemUiVisibility); |
| 4720 |
proto.write(APPEARANCE, insetsFlags.appearance); |
| 4721 |
proto.write(BEHAVIOR, insetsFlags.behavior); |
| 4722 |
proto.write(FIT_INSETS_TYPES, mFitInsetsTypes); |
| 4723 |
proto.write(FIT_INSETS_SIDES, mFitInsetsSides); |
| 4724 |
proto.write(FIT_IGNORE_VISIBILITY, mFitInsetsIgnoringVisibility); |
| 4725 |
proto.end(token); |
| 4726 |
} |
| 4727 |
|
| 4728 |
|
| 4729 |
|
| 4730 |
|
| 4731 |
|
| 4732 |
public void scale(float scale) { |
| 4733 |
x = (int) (x * scale + 0.5f); |
| 4734 |
y = (int) (y * scale + 0.5f); |
| 4735 |
if (width > 0) { |
| 4736 |
width = (int) (width * scale + 0.5f); |
| 4737 |
} |
| 4738 |
if (height > 0) { |
| 4739 |
height = (int) (height * scale + 0.5f); |
| 4740 |
} |
| 4741 |
} |
| 4742 |
|
| 4743 |
|
| 4744 |
|
| 4745 |
|
| 4746 |
|
| 4747 |
@UnsupportedAppUsage |
| 4748 |
void backup() { |
| 4749 |
int[] backup = mCompatibilityParamsBackup; |
| 4750 |
if (backup == null) { |
| 4751 |
|
| 4752 |
backup = mCompatibilityParamsBackup = new int[4]; |
| 4753 |
} |
| 4754 |
backup[0] = x; |
| 4755 |
backup[1] = y; |
| 4756 |
backup[2] = width; |
| 4757 |
backup[3] = height; |
| 4758 |
} |
| 4759 |
|
| 4760 |
|
| 4761 |
|
| 4762 |
|
| 4763 |
|
| 4764 |
@UnsupportedAppUsage |
| 4765 |
void restore() { |
| 4766 |
int[] backup = mCompatibilityParamsBackup; |
| 4767 |
if (backup != null) { |
| 4768 |
x = backup[0]; |
| 4769 |
y = backup[1]; |
| 4770 |
width = backup[2]; |
| 4771 |
height = backup[3]; |
| 4772 |
} |
| 4773 |
} |
| 4774 |
|
| 4775 |
private CharSequence mTitle = null; |
| 4776 |
|
| 4777 |
|
| 4778 |
@Override |
| 4779 |
protected void encodeProperties(@NonNull ViewHierarchyEncoder encoder) { |
| 4780 |
super.encodeProperties(encoder); |
| 4781 |
|
| 4782 |
encoder.addProperty("x", x); |
| 4783 |
encoder.addProperty("y", y); |
| 4784 |
encoder.addProperty("horizontalWeight", horizontalWeight); |
| 4785 |
encoder.addProperty("verticalWeight", verticalWeight); |
| 4786 |
encoder.addProperty("type", type); |
| 4787 |
encoder.addProperty("flags", flags); |
| 4788 |
} |
| 4789 |
|
| 4790 |
|
| 4791 |
|
| 4792 |
|
| 4793 |
|
| 4794 |
|
| 4795 |
public boolean isFullscreen() { |
| 4796 |
return x == 0 && y == 0 |
| 4797 |
&& width == WindowManager.LayoutParams.MATCH_PARENT |
| 4798 |
&& height == WindowManager.LayoutParams.MATCH_PARENT; |
| 4799 |
} |
| 4800 |
|
| 4801 |
private static String layoutInDisplayCutoutModeToString( |
| 4802 |
@LayoutInDisplayCutoutMode int mode) { |
| 4803 |
switch (mode) { |
| 4804 |
case LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT: |
| 4805 |
return "default"; |
| 4806 |
case LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS: |
| 4807 |
return "always"; |
| 4808 |
case LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER: |
| 4809 |
return "never"; |
| 4810 |
case LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES: |
| 4811 |
return "shortEdges"; |
| 4812 |
default: |
| 4813 |
return "unknown(" + mode + ")"; |
| 4814 |
} |
| 4815 |
} |
| 4816 |
|
| 4817 |
private static String softInputModeToString(@SoftInputModeFlags int softInputMode) { |
| 4818 |
final StringBuilder result = new StringBuilder(); |
| 4819 |
final int state = softInputMode & SOFT_INPUT_MASK_STATE; |
| 4820 |
if (state != 0) { |
| 4821 |
result.append("state="); |
| 4822 |
switch (state) { |
| 4823 |
case SOFT_INPUT_STATE_UNCHANGED: |
| 4824 |
result.append("unchanged"); |
| 4825 |
break; |
| 4826 |
case SOFT_INPUT_STATE_HIDDEN: |
| 4827 |
result.append("hidden"); |
| 4828 |
break; |
| 4829 |
case SOFT_INPUT_STATE_ALWAYS_HIDDEN: |
| 4830 |
result.append("always_hidden"); |
| 4831 |
break; |
| 4832 |
case SOFT_INPUT_STATE_VISIBLE: |
| 4833 |
result.append("visible"); |
| 4834 |
break; |
| 4835 |
case SOFT_INPUT_STATE_ALWAYS_VISIBLE: |
| 4836 |
result.append("always_visible"); |
| 4837 |
break; |
| 4838 |
default: |
| 4839 |
result.append(state); |
| 4840 |
break; |
| 4841 |
} |
| 4842 |
result.append(' '); |
| 4843 |
} |
| 4844 |
final int adjust = softInputMode & SOFT_INPUT_MASK_ADJUST; |
| 4845 |
if (adjust != 0) { |
| 4846 |
result.append("adjust="); |
| 4847 |
switch (adjust) { |
| 4848 |
case SOFT_INPUT_ADJUST_RESIZE: |
| 4849 |
result.append("resize"); |
| 4850 |
break; |
| 4851 |
case SOFT_INPUT_ADJUST_PAN: |
| 4852 |
result.append("pan"); |
| 4853 |
break; |
| 4854 |
case SOFT_INPUT_ADJUST_NOTHING: |
| 4855 |
result.append("nothing"); |
| 4856 |
break; |
| 4857 |
default: |
| 4858 |
result.append(adjust); |
| 4859 |
break; |
| 4860 |
} |
| 4861 |
result.append(' '); |
| 4862 |
} |
| 4863 |
if ((softInputMode & SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0) { |
| 4864 |
result.append("forwardNavigation").append(' '); |
| 4865 |
} |
| 4866 |
result.deleteCharAt(result.length() - 1); |
| 4867 |
return result.toString(); |
| 4868 |
} |
| 4869 |
|
| 4870 |
private static String rotationAnimationToString(int rotationAnimation) { |
| 4871 |
switch (rotationAnimation) { |
| 4872 |
case ROTATION_ANIMATION_UNSPECIFIED: |
| 4873 |
return "UNSPECIFIED"; |
| 4874 |
case ROTATION_ANIMATION_ROTATE: |
| 4875 |
return "ROTATE"; |
| 4876 |
case ROTATION_ANIMATION_CROSSFADE: |
| 4877 |
return "CROSSFADE"; |
| 4878 |
case ROTATION_ANIMATION_JUMPCUT: |
| 4879 |
return "JUMPCUT"; |
| 4880 |
case ROTATION_ANIMATION_SEAMLESS: |
| 4881 |
return "SEAMLESS"; |
| 4882 |
default: |
| 4883 |
return Integer.toString(rotationAnimation); |
| 4884 |
} |
| 4885 |
} |
| 4886 |
|
| 4887 |
private static String inputFeaturesToString(int inputFeatures) { |
| 4888 |
final List<String> features = new ArrayList<>(); |
| 4889 |
if ((inputFeatures & INPUT_FEATURE_NO_INPUT_CHANNEL) != 0) { |
| 4890 |
inputFeatures &= ~INPUT_FEATURE_NO_INPUT_CHANNEL; |
| 4891 |
features.add("INPUT_FEATURE_NO_INPUT_CHANNEL"); |
| 4892 |
} |
| 4893 |
if ((inputFeatures & INPUT_FEATURE_DISABLE_USER_ACTIVITY) != 0) { |
| 4894 |
inputFeatures &= ~INPUT_FEATURE_DISABLE_USER_ACTIVITY; |
| 4895 |
features.add("INPUT_FEATURE_DISABLE_USER_ACTIVITY"); |
| 4896 |
} |
| 4897 |
if ((inputFeatures & INPUT_FEATURE_SPY) != 0) { |
| 4898 |
inputFeatures &= ~INPUT_FEATURE_SPY; |
| 4899 |
features.add("INPUT_FEATURE_SPY"); |
| 4900 |
} |
| 4901 |
if (inputFeatures != 0) { |
| 4902 |
features.add(Integer.toHexString(inputFeatures)); |
| 4903 |
} |
| 4904 |
return String.join(" | ", features); |
| 4905 |
} |
| 4906 |
|
| 4907 |
|
| 4908 |
|
| 4909 |
|
| 4910 |
|
| 4911 |
|
| 4912 |
|
| 4913 |
public boolean isModal() { |
| 4914 |
return (flags & (FLAG_NOT_TOUCH_MODAL | FLAG_NOT_FOCUSABLE)) == 0; |
| 4915 |
} |
| 4916 |
} |
| 4917 |
|
| 4918 |
|
| 4919 |
|
| 4920 |
|
| 4921 |
|
| 4922 |
|
| 4923 |
|
| 4924 |
|
| 4925 |
@TestApi |
| 4926 |
default void holdLock(IBinder token, int durationMs) { |
| 4927 |
throw new UnsupportedOperationException(); |
| 4928 |
} |
| 4929 |
|
| 4930 |
|
| 4931 |
|
| 4932 |
|
| 4933 |
|
| 4934 |
@TestApi |
| 4935 |
default boolean isTaskSnapshotSupported() { |
| 4936 |
return false; |
| 4937 |
} |
| 4938 |
|
| 4939 |
|
| 4940 |
|
| 4941 |
|
| 4942 |
|
| 4943 |
|
| 4944 |
|
| 4945 |
|
| 4946 |
|
| 4947 |
|
| 4948 |
|
| 4949 |
|
| 4950 |
|
| 4951 |
|
| 4952 |
|
| 4953 |
@SystemApi |
| 4954 |
default void registerTaskFpsCallback(@IntRange(from = 0) int taskId, |
| 4955 |
@NonNull Executor executor, |
| 4956 |
@NonNull TaskFpsCallback callback) {} |
| 4957 |
|
| 4958 |
|
| 4959 |
|
| 4960 |
|
| 4961 |
|
| 4962 |
|
| 4963 |
|
| 4964 |
|
| 4965 |
|
| 4966 |
@SystemApi |
| 4967 |
default void unregisterTaskFpsCallback(@NonNull TaskFpsCallback callback) {} |
| 4968 |
|
| 4969 |
|
| 4970 |
|
| 4971 |
|
| 4972 |
|
| 4973 |
|
| 4974 |
|
| 4975 |
|
| 4976 |
|
| 4977 |
|
| 4978 |
|
| 4979 |
|
| 4980 |
@TestApi |
| 4981 |
@Nullable |
| 4982 |
default Bitmap snapshotTaskForRecents(@IntRange(from = 0) int taskId) { |
| 4983 |
return null; |
| 4984 |
} |
| 4985 |
} |