Commit Graph

18719 Commits

Author SHA1 Message Date
Tiger Huang
7f946269c8 Merge "Re-land "Enable LOCAL_LAYOUT"" into tm-qpr-dev am: b47c6f2061
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19963145

Change-Id: I2b1b8f36acbac91cdcdaec1f5f44b05a8226d9ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 22:16:16 +00:00
Tiger Huang
b47c6f2061 Merge "Re-land "Enable LOCAL_LAYOUT"" into tm-qpr-dev 2022-09-21 06:10:48 +00:00
Tiger Huang
d95c3121b6 Merge changes Ibc2f40dd,I37fb8ffc into tm-qpr-dev am: dea70726f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19963144

Change-Id: I56d9cf4a11f38a8a574b7d5ab6c82ff770b7bdf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 14:50:00 +00:00
Tiger Huang
dea70726f6 Merge changes Ibc2f40dd,I37fb8ffc into tm-qpr-dev
* changes:
  Don't perform config change if relayoutAsync
  Apply synced relayout if we have FLAG_WINDOW_VISIBILITY_CHANGED
2022-09-16 14:23:42 +00:00
Tiger Huang
975dd2c513 Re-land "Enable LOCAL_LAYOUT"
Test: regular rotation, fixed rotation, and seamless rotation
Test: PowerMenuMicrobenchmark#testPower_verifySystemPowerMenuAppears
Bug: 161810301
Bug: 175861564
Change-Id: I7d70445a90ba234e2ba6482552886c1808d0d233
2022-09-15 15:37:35 +08:00
Tiger Huang
f3b99eee95 Don't perform config change if relayoutAsync
mPendingMergedConfiguration wouldn't be updated if we didn't call
IWindowSession#relayout.

Bug: 244003094
Test: atest ToggleDarkThemeMicrobenchmark#testToggle
Change-Id: Ibc2f40dd986136d9b54f3a7f491f7517489e05af
2022-09-15 15:02:40 +08:00
Xiaowen Lei
c3bebf9ff1 Merge "Add AppTransition type and remote animation for Dream in occluding Keyguard." into tm-qpr-dev am: f8e4efccda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19469267

Change-Id: I2219888527f5ddd3af3d79ea1db54caeade38ea1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 23:38:52 +00:00
Xiaowen Lei
f8e4efccda Merge "Add AppTransition type and remote animation for Dream in occluding Keyguard." into tm-qpr-dev 2022-09-09 23:12:19 +00:00
Mark Punzalan
017c4aa3f2 Merge "Don't reset translation callback with other state" into tm-qpr-dev am: 1eaf0fadf2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19622802

Change-Id: I28d6c241788c00e6c37da211daad7786723002b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 21:16:31 +00:00
Mark Punzalan
1eaf0fadf2 Merge "Don't reset translation callback with other state" into tm-qpr-dev 2022-09-09 20:56:27 +00:00
Xiaowen Lei
7c458bea7d Add AppTransition type and remote animation for Dream in occluding Keyguard.
The existing Keyguard Occlude Animation Runner doesn't match the spec
for Dream in. It animates activity expanding from the center of the
screen. For Dream in, we have:
  - Dream fading in
  - DreamOverlay complications fading in slightly delayed, with each part
    starting at different times.

This CL adds dedicated AppTransitionType and remote animation runner,
which animates Dream fading in. It doesn't implement the separate
animation for DreamOverlay complications.

Bug: 222507937
Bug: 240477956
Bug: 242864189
Fix: 240477956
Test: on device, wait for Keyguard to time out to Dream.
Change-Id: I5517ded2eea77ea962ca1551ed51dd997ff09993
Merged-In: I5517ded2eea77ea962ca1551ed51dd997ff09993
2022-09-09 20:42:45 +00:00
Treehugger Robot
cecb02a175 Merge "make sure mSurfaceLock.unlock can be executed in unlockCanvasAndPost" am: dcef1fb28a am: e7237b1cfb am: 625d9387a5 am: a1e5845ba5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2206140

Change-Id: I76d38354459c90f7d932b8f99ad63b4edb5d1ca7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-09 19:37:01 +00:00
Tiger Huang
40b4880d7a Apply synced relayout if we have FLAG_WINDOW_VISIBILITY_CHANGED
The client needs to call relayout to get the valid surface if
- mFirst,
- mViewVisibility != viewVisibility,
- mNewSurfaceNeeded, or
- mAppVisibilityChanged.

We didn't cover mNewSurfaceNeeded or mAppVisibilityChanged previously.
All of them are covered by FLAG_WINDOW_VISIBILITY_CHANGED.

Bug: 244521023
Bug: 161810301
Test: 1. Enable LOCAL_LAYOUT
      2. Open Camera and double press the power button.
      See if the preview screen of Camera become blank.
Change-Id: I37fb8ffc9063b72bf3abba5d29fc2f750e7fc64f
2022-09-08 15:40:49 +08:00
Tiger Huang
86e9871a01 Merge "Revert "Enable LOCAL_LAYOUT"" into tm-qpr-dev am: 7cacd12b23
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19822513

Change-Id: I3110eb2b67741f06daad32aae29c69579a1aa3ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 14:50:11 +00:00
Tiger Huang
7cacd12b23 Merge "Revert "Enable LOCAL_LAYOUT"" into tm-qpr-dev 2022-09-06 14:26:43 +00:00
Riddle Hsu
955b79a8b3 Merge "Optimize screen decor insets calculation" into tm-qpr-dev am: cc6255bd91
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19180946

Change-Id: I672fa05516f90cb2a4c262598cc5734a377fca79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-05 16:38:34 +00:00
xiaoxin
71e3abfa1e make sure mSurfaceLock.unlock can be executed in unlockCanvasAndPost
When the program is run to unlockCanvasAndPost method,
if mSurface.unlockCanvasAndPost throws an exception,
the mSurfaceLock.unlock() will not getting the chance to execute.

If an app executes unlockCanvasAndPost in a catch and does not handle the exception,
it will remain locked for a long time after the next execution of mSurfacelock.lock.

make sure the msurfacelock.unlock is executed after unlockCanvasAndPost

bug:245050059 in partnerissuetracker

Change-Id: Ib849c840c61ac261cfaab0daefa7ae2afdbfcba3
Signed-off-by: xiaoxin <xiaoxin@xiaomi.corp-partner.google.com>
2022-09-05 09:17:17 +00:00
Riddle Hsu
3ef46b57b9 Optimize screen decor insets calculation
This stores the computed decor insets and frame excluding insets.
So it can save 99% time of recomputing the insets every time during
starting an activity. E.g. dozen times of "prepare display info/frame,
compute window layout of insets source windows, calculate insets"
becomes "get result from array".

The saved decor insets will be updated when:
- Display metrics is changed (DC#updateBaseDisplayMetrics).
- Insets provider is added/removed/changed.

Also
- Use DisplayCutout rather than WmDisplayCutout to simplify
  passing the cutout between methods.
- Optimize getSourceProvider to avoid unnecessary object allocation.

This also fixes an issue that the display doesn't compute the latest
configuration when navigation mode is changed. Now it is fixed by
checking if the insets provider has layout changes and then recompute
screen configuration.

Bug: 238399969
Bug: 159103089
Test: atest DisplayPolicyInsetsTests DisplayPolicyLayoutTests
      DisplayPolicyTests#testUpdateDisplayConfigurationByDecor
Test: Change navigation mode or display size (density) in Settings.
      And then swipe-up or press home key, there won't be a
      frozen effect (display configuration change).

Change-Id: If6c28a89939372e6362b92f469ef7d793e8ec215
2022-09-02 23:29:29 +08:00
Neha Jain
3e52eb1bc6 Revert "Enable LOCAL_LAYOUT"
This reverts commit 1721522709.

Reason for revert: b/244521023

Change-Id: I67df39f4d218ff65cb7a2010b544c3ef158f50cf
2022-09-02 02:50:46 +00:00
Cole Faust
9b3a5fc03b Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073 am: 91d6c5b564 am: 6a79ae2567
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: I7052a1f7391ed6701fe0e1036c27368609032e35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 20:44:00 +00:00
Cole Faust
a1eb8cf128 Merge "Fix array-related errorprone warnings" 2022-08-30 18:03:01 +00:00
Treehugger Robot
e9712ca91b Merge "Exclude large tests from presubmit." am: 3d8681e31d am: 9dc9fd8930 am: 5860c207c9 am: da40df7c95
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2176682

Change-Id: I56d7b99eab9acc055a6935166f962d10e6df357c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-29 22:35:54 +00:00
Treehugger Robot
3d8681e31d Merge "Exclude large tests from presubmit." 2022-08-29 20:52:36 +00:00
Tiger Huang
81e8a4eb7f Merge "Enable LOCAL_LAYOUT" into tm-qpr-dev am: 2220c995a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18030522

Change-Id: I9848f788b2eff05772fd6c90421cc458f0a4c7b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 17:15:36 +00:00
Tiger Huang
2220c995a4 Merge "Enable LOCAL_LAYOUT" into tm-qpr-dev 2022-08-26 16:56:26 +00:00
Cole Faust
584140c83a Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
2022-08-25 10:57:12 -07:00
Ming-Shin Lu
ebef237175 Merge "Fix IME jumpcut when playing user IME animation after IME restarted" into tm-qpr-dev am: 469cbe9037
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600919

Change-Id: I6a80cf882660267d6a131ebb016a09e09c34297a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 16:32:23 +00:00
Ming-Shin Lu
469cbe9037 Merge "Fix IME jumpcut when playing user IME animation after IME restarted" into tm-qpr-dev 2022-08-25 16:13:08 +00:00
Yunfan Chen
75d85bac78 Merge "Refine the way of calculating insets for configuration (1/3)" into tm-qpr-dev am: cc9f87d9e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19333110

Change-Id: Id3f7effad6f179c9613b8d390e300426eba88c8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 05:41:50 +00:00
Yunfan Chen
6640d839aa Refine the way of calculating insets for configuration (1/3)
The original patch reverted as commit
bc0d5539e6.

This patch only includes the part of refactors to make the calculation
of configuration around insets easier. The actual change of making extra
navigation bar treated as navigation bar and the fix of the UiDevice in
ui automator is in a separate patch to avoid being blocked and blocking
other changes for long.

Test: PlatformScenarioTests
Test: TaplTestsQuickstep, ThemeIconsTest, TaplTestsLauncher3
Bug: 238981445
Bug: 238985243
Bug: 238581838
Bug: 233945217
Change-Id: If966bcc8125300d47d5cd631f7db17ff027e5261
2022-08-24 09:01:03 +00:00
Treehugger Robot
d22d44dd2e Merge "View OWNERS: include PendingInsetsController.java in the WindowManager rules" am: ce2023b664 am: c20cde6ce5 am: 3edaa51344 am: 6cdbdf26c3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2190615

Change-Id: Iddd6f583f9c71d13a24a53d333fd5a97a7d9f26d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 13:15:58 +00:00
Hongwei Wang
e38914405d Merge "[Re-land] Remove getSfInstance usage from ViewRootImpl" into tm-qpr-dev am: 5238c74d09
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600075

Change-Id: Ic93af6c2551e85c439765e3e47592a25d51fac5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 22:28:26 +00:00
Hongwei Wang
5238c74d09 Merge "[Re-land] Remove getSfInstance usage from ViewRootImpl" into tm-qpr-dev 2022-08-19 22:03:03 +00:00
Hyunyoung Song
89612ae180 Merge "Add passive callback for system-run insets animation" into tm-qpr-dev am: 7f9f126df7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19434248

Change-Id: I9544fd82036706c19031597c1fdf8e316c5f3f09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 18:38:26 +00:00
Hyunyoung Song
7f9f126df7 Merge "Add passive callback for system-run insets animation" into tm-qpr-dev 2022-08-19 18:37:40 +00:00
Ming-Shin Lu
4141dae212 Merge "Fix toggleSoftInput can't hide IME when the app in multi-window mode" into tm-qpr-dev am: a9fa413a21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600536

Change-Id: Ied238b5980f4609b5a0a9b77301f691a6dd0637d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 16:14:11 +00:00
Fiona Campbell
477064e500 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev am: a01ccaae13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19638897

Change-Id: I32169097c0b807836bb989f60111cedcd49191b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 16:11:34 +00:00
Ming-Shin Lu
a9fa413a21 Merge "Fix toggleSoftInput can't hide IME when the app in multi-window mode" into tm-qpr-dev 2022-08-19 14:52:59 +00:00
Fiona Campbell
a01ccaae13 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev
* changes:
  Add constraints to window duration scale
  Add constraints to animation duration scales
  Ensure animation scales are within bounds
2022-08-19 14:49:40 +00:00
Adrian Roos
b773c4dade View OWNERS: include PendingInsetsController.java in the WindowManager rules
Change-Id: I8b22a55ccfe3690e9879fcce221c4488f86a9a83
2022-08-19 07:11:47 +00:00
Hyunyoung Song
03110e20d9 Add passive callback for system-run insets animation
This passive window inset animation control listener
is used to for logging purpose when hide, show
method is called.

Test: atest InsetsControllerTest
Bug: 240192346

Change-Id: I399268ead9d04b356f10cc3e9ac1da9e31306e86
2022-08-19 05:15:29 +00:00
Mark Punzalan
ce2a5db2c8 Don't reset translation callback with other state
This fixes issues with Views that have their own custom
ViewTranslationCallback.

Bug: 236678324
Test: atest CtsTranslationTestCases
Test: manual - Verified on chat app that uses their own custom
ViewTranslationCallback; old and new messages are translated
Test: manual - Spot-checked translation on a few other chat apps

Change-Id: If4194bc8cde73a9cebb7b56594f6982855374410
2022-08-16 17:42:38 +00:00
Joanne Chung
20dbe919b1 Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev am: 9e263e643d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800482

Change-Id: Ie4da503e5f569625c807bef1a194764cb5e133fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 13:08:55 +00:00
Joanne Chung
1551aae8d7 Merge "Fix translation session id collision bug." into tm-qpr-dev am: ebb357e1c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19423814

Change-Id: Iad538b9ee2aef1e58a9b292d8a36f27a7b79191b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 13:07:48 +00:00
Joanne Chung
9e263e643d Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev 2022-08-16 10:00:57 +00:00
Joanne Chung
ebb357e1c9 Merge "Fix translation session id collision bug." into tm-qpr-dev 2022-08-16 09:52:18 +00:00
Tiger Huang
f114085baa Merge "Introduce IWindowSession#relayoutAsync" into tm-qpr-dev am: 81ae41092e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19194952

Change-Id: Iec4854d8c93a0e58a588d0483833b99a1ec38455
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 09:04:33 +00:00
Wilson Wu
908c368411 Merge "Refine {SHOW,HIDE}_MY_SOFT_INPUT constants" into tm-qpr-dev am: 08fc972311
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19569434

Change-Id: I4f26a508aa1e2081f4afcdf62ca00dc1d0a1949c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 09:01:38 +00:00
Tiger Huang
1721522709 Enable LOCAL_LAYOUT
Test: regular rotation, fixed rotation, and seamless rotation
Test: presubmit
Bug: 161810301
Bug: 175861564
Change-Id: If9488ffc84dc5e2af106acfae425a854fb7407a2
2022-08-16 08:45:02 +00:00
Tiger Huang
81ae41092e Merge "Introduce IWindowSession#relayoutAsync" into tm-qpr-dev 2022-08-16 08:44:11 +00:00