Commit Graph

13246 Commits

Author SHA1 Message Date
TreeHugger Robot
8d5fccaf10 Merge "Avoid sampling outside BQ crop rect" into sc-dev am: 5c86f2885f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15283873

Change-Id: I2c149a2cb36394e027f16b8589021233cefaf980
2021-07-14 22:16:39 +00:00
John Reck
0f284da923 Avoid sampling outside BQ crop rect
The region outside of the BQ crop rect is potentially
garbage. Avoid sampling from it.

Fixes: 189656466
Test: CTS PixelCopyTests & DecodeAccuracyTest
Change-Id: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
2021-07-14 14:26:14 -04:00
Wei Sheng Shih
992684e112 Merge "Get starting window background color directly." into sc-dev am: a9a861134d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15020163

Change-Id: I717ea735897a965380600a5305448582517cd160
2021-07-14 01:48:55 +00:00
Wei Sheng Shih
a9a861134d Merge "Get starting window background color directly." into sc-dev 2021-07-14 01:28:39 +00:00
wilsonshih
3be521ad48 Get starting window background color directly.
SystemUI does not need to re-calculate background color of starting
window because Shell library is bound to SystemUI, so status bar can
get background color directly, also this can support to get the
background color from snapshot starting window.

Also fix the starting window listener did not receiveing background
color successful because makeSplashScreenContentView is execute on
another background thread, so there should block the splash screen
thread until the background color is estimated.

Bug: 192213918
Bug: 192659309
Test: manual launch apps from Notification and Launcher, ensure the
color is correctly send to SystemUI or Launcher.

Change-Id: I626cb23d7aebfe4e032fad285bfad374c0e11cea
2021-07-13 18:53:19 +08:00
TreeHugger Robot
08c932f8bc Merge "Remove unnecessary log in CursorWindow.create" into sc-dev am: 2c522a3910
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225375

Change-Id: Ibe80b0fd21ee478bfb0b471605b08bee8c60dca2
2021-07-13 00:36:05 +00:00
TreeHugger Robot
eed30d1b64 Merge "Properly protect mFrameMetricsReporter" into sc-dev am: 1e67f86165
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15194545

Change-Id: I8bf23a3e581bf39d0f95e32d13a32afb9eb4a577
2021-07-12 23:45:57 +00:00
Bill Lin
b7cd46426b Merge "Redesign One-haned tutorial UX behavior" into sc-dev am: 5ad4a8093c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15187818

Change-Id: I26effcc821b60576abee355ee0cc48830fea5715
2021-07-12 20:26:40 +00:00
Bill Lin
46a7a35230 Merge "Improve SystemUIBootiming_StartServices_avg" into sc-dev am: 1334cfb90d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15243692

Change-Id: Ib1b98cb9f536d134ad4400df8f36e8fe79431870
2021-07-12 20:26:30 +00:00
Jason Chang
4d9609f929 Merge "Add metrics log for One-handed mode Shortcut toggle switch" into sc-dev am: 56bb99d410
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15207284

Change-Id: Ic9fd871f1bc495273e92a7d034ee8883d73539ee
2021-07-12 20:19:09 +00:00
Bill Lin
caca5485ad Merge "Improve SystemUIBootTiming performance in OneHandedController" into sc-dev am: 7f162ddaf0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15175505

Change-Id: I004245f3f0fd9fec6f05b7a19b9d911b6b616e0d
2021-07-12 20:18:03 +00:00
TreeHugger Robot
2c522a3910 Merge "Remove unnecessary log in CursorWindow.create" into sc-dev 2021-07-12 19:39:09 +00:00
TreeHugger Robot
1e67f86165 Merge "Properly protect mFrameMetricsReporter" into sc-dev 2021-07-11 08:30:13 +00:00
Bill Lin
5ad4a8093c Merge "Redesign One-haned tutorial UX behavior" into sc-dev 2021-07-10 01:05:11 +00:00
Bill Lin
1334cfb90d Merge "Improve SystemUIBootiming_StartServices_avg" into sc-dev 2021-07-10 01:03:56 +00:00
Bill Lin
80b340a9aa Improve SystemUIBootiming_StartServices_avg
Previously, we tried to tuning boottime of SysUI
See go/systemuiboottiming_ohm
- Reduce access setting provide at SysUI start-up
- Remove unused obervers
  1. Timeout
  2. TapAppExit
- Update mShortcutEnabled state at ctor

Test: manual enable OHM shortcut, rebot
      make sure shortcut function works
Test: atest WMShellUnitTests
Test: asit/perf/boottime_test
Bug: 193225130
Change-Id: I2753f8b1e47622c00b9c6d2f4cd319c6e43634ea
2021-07-09 21:31:05 +08:00
Bill Lin
477c88a7d5 Redesign One-haned tutorial UX behavior
- Always show tutorial for user to know device state
  is in One-handed mode.
- Clean the redundant params from ctor

Test: manual trigger OHM
Test: atest WMShellUnitTests
Bug: 192648901
Change-Id: I10c3f3f29190b672fb88471df3cf374a994cdaa7
2021-07-09 19:05:05 +08:00
Jason Chang
97b75f09ed Add metrics log for One-handed mode Shortcut toggle switch
To write metrics log for One-handed mode Shortcut toggle switch state.

Bug: 192641587

Test: Local add logs to verify before writing metrics logs API call
Test: atest SystemUITests
Test: atest WMShellTests
Change-Id: I02fda724bf2960355d78f1a26ac6d65225687176
2021-07-09 03:24:58 +00:00
Bill Lin
7f162ddaf0 Merge "Improve SystemUIBootTiming performance in OneHandedController" into sc-dev 2021-07-09 02:00:33 +00:00
Siarhei Vishniakou
07d35cb7dc Properly protect mFrameMetricsReporter
This field actually requires a special lock, mFrameMetricsReporterMutex.
But there isn't a GUARDED_BY annotation for it. And even if there was,
the compiler feature of -Wthread-safety was not active in this code, so
this error would not have been caught.

To fix this, enable the compiler annotation and add GUARDED_BY
annotation to mFrameMetricsReporter.
And finally, use this lock to properly protect this field.

Bug: 192330836
Test: atest hwui_unit_tests
Change-Id: I76950bfa01bbd7ccdc54c4e8c114430b5aeddf1a
2021-07-09 00:32:29 +00:00
Chris Li
7d98b40e24 Merge "Revert "Revert "Not show size compat UI when task is not visible""" into sc-dev am: 50c03ea7ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237129

Change-Id: I567dadd827f0c2a6dd7f2d8b2b54b2559869df7c
2021-07-08 22:02:09 +00:00
Chris Li
a23a2bb5db Revert "Revert "Not show size compat UI when task is not visible""
This reverts commit 76370b6fe6.

Reason for revert: Fix the merge break in ShellTaskOrganizerTests.java

Fix: 193069342
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I02c4bddc407eaac0ebb7cd5abb0b394f242d4d6e
2021-07-08 12:09:40 -07:00
Chris Li
0a703480d2 Merge "Remove TaskInfo#topActivityToken usage in size compat for security" into sc-dev am: e7ed99bfc2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156978

Change-Id: Ieaa6eb5bc5dc023644d4f6c19dbb583f7e022f5b
2021-07-08 18:15:42 +00:00
Chris Li
e7ed99bfc2 Merge "Remove TaskInfo#topActivityToken usage in size compat for security" into sc-dev 2021-07-08 18:05:40 +00:00
John Reck
82e00f01b6 Merge "Reduce number of weakrefs per frame" into sc-dev am: a8bb119574
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15226230

Change-Id: I4136653ef6844a45b073813f1292e58dd942509b
2021-07-08 15:22:46 +00:00
John Reck
a8bb119574 Merge "Reduce number of weakrefs per frame" into sc-dev 2021-07-08 15:04:16 +00:00
Leon Jeng
15cbad37a8 Revert "Not show size compat UI when task is not visible" am: 76370b6fe6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15232572

Change-Id: I1ca637c6e88906c74fe0ac0ab8f883e9fdbdce5a
2021-07-08 10:00:52 +00:00
Leon Jeng
76370b6fe6 Revert "Not show size compat UI when task is not visible"
This reverts commit adb92508c0.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=coral-userdebug&lkgb=7530814&lkbb=7530923&fkbb=7530923, bug b/193105445

Bug: 193105445
Change-Id: I697229da6986d6466d7f13872e9ae7a727b80838
2021-07-08 09:48:10 +00:00
Chris Li
85a76668fc Merge "Not show size compat UI when task is not visible" into sc-dev am: 927c644bfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225378

Change-Id: I7d380e2e6bb351db4bb5a8a68c236c3444ef2bf1
2021-07-08 07:00:25 +00:00
Bill Lin
3aafe19994 Improve SystemUIBootTiming performance in OneHandedController
Fix race condition in SystemUIBootTiming issue.

1. Avoid updateOneHandedEnabled() called twice during init
   a. [O] come from setOneHandedEnabled()
   b. [X] come from setSwipeToNotificationEnabled()
2. Passively waiting shortcut enabled changed callback, and then
         query setting ACCESSIBILITY_BUTTON_TARGETS status.
3. Add a new flag isShortcutEnabled to cache shortcut enabled
   state.
4. By new OHM Settings UX design setSwipeToNotificationEnabled()
   should NOT setEnabledGesturalOverlay().
5. Remove redundant auto enabled Toast and print in log instead.
   (In general case, user is not able to see the Toast)

Test: atest google/perf/boottime/boottime-test
Test: atest SystemUITests
Test: atest WMShellTests
Test: manual factory reboot, OHM should disabled by default
Bug: 192612924
Change-Id: I8b24c99bc8bd5bfb17c73a6bb8494109d9a8170d
2021-07-08 14:14:25 +08:00
Chris Li
927c644bfa Merge "Not show size compat UI when task is not visible" into sc-dev 2021-07-08 05:53:15 +00:00
Chris Li
1245aefa49 Remove TaskInfo#topActivityToken usage in size compat for security
Security report shows that this can cause leak token of different app.

Replace the functionality with a callback to the TaskOrganizerController
to restart activity when size compat restart button is clicked.

Bug: 186776724
Test: manually verify the restart button still works
Change-Id: I097b9f02e8435e6765695b9d5a531a4e165bac66
Merged-In: I097b9f02e8435e6765695b9d5a531a4e165bac66
2021-07-07 21:09:24 -07:00
Chris Li
adb92508c0 Not show size compat UI when task is not visible
Before, when a size compat task was hidden, the size compat UI might
still be showing. Now, remove the UI when the task is no longer visible.

Bug: 193069342
Test: manually verify the size compat button is not showing in recents
Change-Id: Ia17a97f5e7a9af497d8da16b31bb5169dd502d53
2021-07-07 17:46:08 -07:00
Ben Lin
188bf9d3ab Merge "PiP: Update accessibility window as menu shows/hides." into sc-dev am: c701a4c904
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15191317

Change-Id: I46b908449668f8f29ca0b54d4f262cb517a53965
2021-07-08 00:15:29 +00:00
Ben Lin
c701a4c904 Merge "PiP: Update accessibility window as menu shows/hides." into sc-dev 2021-07-08 00:01:25 +00:00
John Reck
b7039c6aa5 Reduce number of weakrefs per frame
Disable end-to-end input latency metric to reduce the
number of JNI WeakGlobalRef acquires per-frame.

Bug: 189738006
Test: Observe trace section no longer appears in calculator
Change-Id: I062dad8e7cec93cca5599e51d2b0b1a1b6e39a07
2021-07-07 19:18:34 -04:00
Kevin Jeon
9fd251e7cb Remove unnecessary log in CursorWindow.create
This change removes an unneeded debug log in CursorWindow that uses
0.37% of gms.persistent CPU.

Test: Build and flash
Bug: 184541591
Change-Id: I95683af27904db8d5ec61761dfda6d6d53ddbbef
2021-07-07 21:58:47 +00:00
Ben Lin
d48bec9beb PiP: Update accessibility window as menu shows/hides.
When calculcating accessibility regions w/ shell root, currently since
shell root has no information on the child views' alpha, visibility,
etc, it is always detected as active by the a11y controller. Update the
accessibility region for PIP as menu shows and hides so that the
controller can take this into consideration.

Bug: 192524653
Test: Switch access to PIP when menu shows - able to navigate around
menu items. Switch Access to PIP when menu is gone - able to select PIP
itself.

Change-Id: I7d5649ecbf98751a117c58ac8127584bc3196910
2021-07-07 12:25:00 -07:00
Bill Yi
71be08107c Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9120bcce06036ec258aea077d3e60134b7a2c1d1
2021-07-07 13:40:10 +00:00
Wei Sheng Shih
4bf6317ae7 Merge "Prevent apply system insets on splash screen from FITS_SYSTEM_WINDOWS" into sc-dev am: f8a49bec00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15218875

Change-Id: Id01d17a7a49465894feb4977650d376d2c0469c3
2021-07-07 11:25:58 +00:00
Wei Sheng Shih
f8a49bec00 Merge "Prevent apply system insets on splash screen from FITS_SYSTEM_WINDOWS" into sc-dev 2021-07-07 11:11:03 +00:00
wilsonshih
d5957a4735 Prevent apply system insets on splash screen from FITS_SYSTEM_WINDOWS
Similar to b/191339594, the context from application contains
View_fitsSystemWindows attributes, thus apply system insets to the
root FrameLayout.

Fixes: 192404431
Test: manual launch several apps from Launcher/Notification.
Tets: atest SplashscreenTests
Change-Id: I4746550de5e2a35ec364e09b631e87b41556a8b9
2021-07-07 11:28:30 +08:00
Vadim Caen
97b93c7da3 Merge "Implement the legacy splash screen behavior" into sc-dev am: 2be72d030b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14920934

Change-Id: I6eb8ab19e11a432490b6ab3f2ee893aa7a08a79c
2021-07-05 15:45:58 +00:00
Vadim Caen
2be72d030b Merge "Implement the legacy splash screen behavior" into sc-dev 2021-07-05 15:35:01 +00:00
TreeHugger Robot
9d81fc0b69 Merge "Fix NPE in TvPipController" into sc-dev am: 03b61d22b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156230

Change-Id: Ie73828ded3e77c3c1f371d45033234639562673b
2021-07-02 22:39:25 +00:00
TreeHugger Robot
03b61d22b6 Merge "Fix NPE in TvPipController" into sc-dev 2021-07-02 22:25:09 +00:00
TreeHugger Robot
cd4b57ab32 Merge "Switch back to sync IInputMethodManager" into sc-dev am: 4e944d4634
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15176334

Change-Id: Ia3216ae5707e981d1e2543dd5192e9bc6e5a8cc0
2021-07-02 16:40:08 +00:00
Huihong Luo
a7ac2cd301 Merge "Disable Webview Overlay when invisible" into sc-dev am: 94950c3c55
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15116633

Change-Id: I87bc4707abc9b0da5e09a8c62cb52a1b6144c614
2021-07-02 16:23:41 +00:00
TreeHugger Robot
4e944d4634 Merge "Switch back to sync IInputMethodManager" into sc-dev 2021-07-02 15:22:21 +00:00
Yohei Yukawa
9dde701446 Switch back to sync IInputMethodManager
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.

 * reportPerceptibleAsync
 * removeImeSurfaceFromWindowAsync

Reason for revert:
We need more time to understand its performance implications.

 [1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1e1
 [2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
      5a5648dcb5
 [3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
      d833f0dab4
 [4]: I646ef4ae0570aae1812ea267f309441fdec6938d
      38fd020616
 [5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
      4a820ccc41
 [6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
      0a32fd21ef
 [7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
      c4663ba6a9
 [8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
      f226a79fee
 [9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
      5e2d9f271d

Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Merged-In: If16ac0de536d9089eb04f6e07b1ee47378124658
2021-07-02 07:06:07 +00:00