Commit Graph

16020 Commits

Author SHA1 Message Date
Jason Hsu
37e451745a Merge "Add icon for "Extra dim" used in accessibility shortcut" into sc-dev 2021-04-17 16:49:47 +00:00
Matt Casey
21c4c71b2a Merge changes Ie275f5c3,I1cab53a6 into sc-dev
* changes:
  Move RecyclerView scroll capture to the center
  Move scroll capture back to ScreenshotController.
2021-04-17 02:23:28 +00:00
Siddika Parlak Polatkan
d560996d0f Merge "Add sensor detection latency to LatencyTracker" into sc-dev 2021-04-17 00:19:38 +00:00
Matt Casey
74f9861490 Move RecyclerView scroll capture to the center
Avoid most floating content by centering the requested content within
the view instead of just scrolling so that it's visible.

Bug: 174571735
Test: atest RecyclerViewCaptureHelperTest, plus manual testing across
      major apps.
Change-Id: Ie275f5c37998a9d88e5ccde7af043443cbc4d94c
2021-04-16 15:01:45 -04:00
TreeHugger Robot
c9eaa3d80f Merge "Rename IInputMethodManager#reportPerceptible" into sc-dev 2021-04-16 05:14:30 +00:00
Wilson Wu
40055cde56 Merge "Make IInputMethodPrivilegedOperations to async (2/N)" into sc-dev 2021-04-16 02:58:16 +00:00
TreeHugger Robot
6728857aaf Merge "[Telephoy] Add phone Id to support DSDS" into sc-dev 2021-04-15 19:55:10 +00:00
Mark Renouf
41f4544e59 Scroll Capture: Add configurable post-scroll capture delay
Default 60ms after next animation pulse, configurable with:

adb shell settings put global screenshot.scroll_capture_delay ##

Bug: 173700533
Test: manual - long screenshot Play Store/Google Photos
      observe that images are fully visible when captured
Change-Id: I84e0b1fd6b94d3ff7177fa00166da40b30f311cf
2021-04-15 13:31:39 -04:00
Wilson Wu
738468ba17 Make IInputMethodPrivilegedOperations to async (2/N)
-. Remove VoidResultCallback of reportStartInput
   and let it be truly asynchronous.
-. Rename this method to reportStartInputAsync.

Bug: 183587528
Test: atest CtsInputMethodTestCases
Change-Id: Ic8e7f888f78f7c536a9228db02a8b355555d7220
2021-04-15 19:02:53 +08:00
jasonwshsu
e9f44933ac Add icon for "Extra dim" used in accessibility shortcut
* foreground icon: 18 * 18
* background icon: 32 * 32 with color Google Gray 700

Fix: 184081577
Bug: 170973645
Test: manual test
Change-Id: Iedb919fef39f293988da757d3b654f904fc81ba0
2021-04-15 10:09:12 +00:00
Zoey Chen
1835f13c4e [Telephoy] Add phone Id to support DSDS
Bug: 185451283
Test: atest TelephonyRegistryTest
Change-Id: I6bf2285e37366ca517a3ea16194a203371e44964
2021-04-15 17:45:27 +08:00
Siddika Parlak Polatkan
9745794e85 Add sensor detection latency to LatencyTracker
Test: m and load on Redfin

Bug: 179267912
Change-Id: I8d3c52f7e232f4ffc11f4381147bb859bf465d54
2021-04-15 08:02:03 +00:00
Jeff Sharkey
4acdb1beff Update Bluetooth API annotations.
Recent work has introduced a new "Nearby devices" runtime permission
which protects all existing Bluetooth APIs; we've done this by
defining a <split-permission> to convert the old BLUETOOTH and
BLUETOOTH_ADMIN permissions into one of three new permissions:

* BLUETOOTH_ADVERTISE: Required to be able to advertise to nearby
                       Bluetooth devices.
* BLUETOOTH_CONNECT:   Allows applications to connect to paired
                       bluetooth devices.
* BLUETOOTH_SCAN:      Required to be able to discover and pair
                       nearby Bluetooth devices.

At its core, this change begins updating the Bluetooth APIs to have
correct @RequiresPermission indicating which permission is actually
enforced internally.  To ensure alignment across Binder, the newly
added "RequiresPermissionChecker" Error Prone checker was used to
discover any inconsistencies, ensuring correctness from server-side
enforcement up through to the public APIs.

In addition, since developers will continue building apps for both
modern and legacy platforms, this change introduces new auto-doc
annotations which will emit helpful consistent documentation
describing the behavior of older devices that are still using the
old permission model.

Bug: 183626724
Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true
Change-Id: I02aa127e8e07f239561f4f2a3bbdfc6fccb82f7f
2021-04-14 21:13:24 -06:00
Dmitri Plotnikov
8017f4ed5e Merge "Fix NullPointerException in BatteryUsageStats" into sc-dev 2021-04-14 19:10:36 +00:00
Julia Reynolds
706bd974d1 Merge "Update the notif expand button so it can be shared" into sc-dev 2021-04-14 19:06:34 +00:00
Dmitri Plotnikov
864454912a Merge "Remove POWER_COMPONENT_USAGE and TIME_COMPONENT_USAGE" into sc-dev 2021-04-14 17:50:25 +00:00
Siim Sammul
8a04f3a9ba Merge "Push the latency histograms to statsd" into sc-dev 2021-04-14 17:20:19 +00:00
Yohei Yukawa
3b99155905 Merge "Make removeImeSurfaceFromWindow to one-way" into sc-dev 2021-04-14 17:12:18 +00:00
Julia Reynolds
10f23c1e9b Update the notif expand button so it can be shared
.. with notification history

Test: manual
Bug: 184695652
Change-Id: Iaa61d2442539ee42ec776530b84bf98c76e038a9
2021-04-14 16:54:08 +00:00
Kholoud Mohamed
3dca1466a0 Merge "Fix bug in LockSettingsService" into sc-dev 2021-04-14 13:54:38 +00:00
Jeff DeCew
42cef834c7 Merge "Clean up MessagingLayout notifications" into sc-dev 2021-04-14 12:47:24 +00:00
Tianjie Xu
9bf277f905 Merge "Improve the error handling for armRebootEscrow" am: 246c14d6da am: cd4836d197 am: f3bde71026
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649651

Change-Id: Ie1a2e4e87e1dcda0b53044c0cb577b938455fdee
2021-04-14 07:17:25 +00:00
Wilson Wu
f18e567b2a Rename IInputMethodManager#reportPerceptible
Rename this method to reportPerceptibleAsync
for readability, because it was already a truly
one-way method when it create.

Bug: 185281885
Test: atest CtsInputMethodTestCases
Change-Id: I9c72b980678f0310c79b293ea06f465e9ca1d760
2021-04-14 14:50:30 +08:00
Tianjie Xu
f3bde71026 Merge "Improve the error handling for armRebootEscrow" am: 246c14d6da am: cd4836d197
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649651

Change-Id: I6aabf1250d67f6a79711e89fb05c68bf84849656
2021-04-14 06:32:31 +00:00
Tianjie Xu
246c14d6da Merge "Improve the error handling for armRebootEscrow" 2021-04-14 05:23:07 +00:00
Dmitri Plotnikov
153f2acfee Fix NullPointerException in BatteryUsageStats
Bug: 185287730
Test: Build and launch Settings on a crosshatch
Change-Id: Iccdd8a0f3839b98dbb5c09599f35ac15985daa4c
2021-04-13 22:14:05 -07:00
Wilson Wu
7ec569a5cd Make removeImeSurfaceFromWindow to one-way
We introduced IVoidResultCallback mechanism to
removeImeSurfaceFromWindow in CL[1] to simulate
two-way behavior before it become truly one-way.

InputMethodManagerService#removeImeSurfaceFromWindow()
simply post the task into its message queue hence we
should able to safely convert this method into one-way.

-. Remove IVoidResultCallback for this method
-. Rename it to removeImeSurfaceFromWindowAsync

[1]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067

Bug: 179668859
Bug: 185277968
Test: Manual test with b/179668859 steps, and works fine
Test: atest CtsInputMethodTestCases
Change-Id: Id28698e263a23ec4a6e4f89438eba5d19bbbabbb
2021-04-14 13:04:32 +08:00
Dmitri Plotnikov
9e19e96ad0 Remove POWER_COMPONENT_USAGE and TIME_COMPONENT_USAGE
... and use specific power components, such as POWER_COMPONENT_SCREEN

Bug: 184397335
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity
Change-Id: I551b2d37d2da77e21e622961f5290b55fb24da61
2021-04-13 21:59:26 -07:00
Bill Yi
4167bf213c Merge RQ2A.210405.006 to aosp-master - DO NOT MERGE
Merged-In: I735b41ed53ce7d374b5d36c4aee79f73d0334234
Merged-In: I9999bfe514fffa9f300643e74942db5ae556670a
Change-Id: If4b670a158e561d8feb03e12aef2d295c5109d43
2021-04-13 19:36:45 -07:00
Suprabh Shukla
9da117df72 Merge "Suspend dialog improvememts" into sc-dev 2021-04-13 23:57:38 +00:00
Dmitri Plotnikov
07bc3d6d95 Merge "Add BatteryConsumer.getCustomPowerComponentName() and getCustomPowerComponentCount()" into sc-dev 2021-04-13 23:44:29 +00:00
TreeHugger Robot
311c3aea77 Merge "ConfirmUserCreationActivity hide non-sys overlays" into sc-dev 2021-04-13 22:56:38 +00:00
Mark Renouf
eaefe1464f Merge "Do not inset scrollBounds by padding unless clipToPadding==true" into sc-dev 2021-04-13 21:06:39 +00:00
Siim Sammul
50ddece0e9 Merge "Change BinderLatencyBuckets to use int[] instead of ArrayList to improve performance." into sc-dev 2021-04-13 19:27:49 +00:00
Dmitri Plotnikov
3885aa960b Add BatteryConsumer.getCustomPowerComponentName() and getCustomPowerComponentCount()
Bug: 184207674
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Ic41cf53e553a25caa8bb6c84c30e3ea2b7627281
2021-04-13 12:16:13 -07:00
Mark Renouf
5ba19c973a Do not inset scrollBounds by padding unless clipToPadding==true
The intent is to avoid attempting to capture areas of a scrollable
view which will never display content. This is only the case when
clipToPadding = true (which is the default).

Bug: 185153400
Test: atest ScrollCaptureViewSupportTest
Change-Id: I2d97ba480320c3e83c056c0f51d7b4ca51715bd6
2021-04-13 10:53:14 -04:00
Suprabh Shukla
346118543b Suspend dialog improvememts
Finishing the suspend dialog when the package for which it was shown
gets unsuspended for any reason.

Also, attributing any interaction with this dialog to the suspending
package, as the system is showing the dialog on its behalf.

Test: Manual, from an unrooted shell:
adb shell pm suspend com.android.chrome
Tap to start chrome and wait for the dialog to appear. Then:
adb shell pm unsuspend com.android.chrome
The dialog should disappear. Further,
adb shell dumpsys usagestats
should show USER_INTERACTION for com.android.shell.

Bug: 169137795
Fixes: 180336589
Change-Id: I70b6f23e2994d8802335e35932ed09209754697c
2021-04-12 19:10:31 -07:00
Paul Hu
036d189a8d Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" into sc-dev 2021-04-13 02:05:21 +00:00
Siim Sammul
1aa3fb5e4c Change BinderLatencyBuckets to use int[] instead of ArrayList to improve
performance.

Cherry pick from master with no changes

Test: unit test
Bug: 179999191
Change-Id: Id996b52b5cb69a85f9c6a932ea8d30336fcaf12a
Merged-In: Id996b52b5cb69a85f9c6a932ea8d30336fcaf12a
(cherry picked from commit 9d02e6101e)
2021-04-12 20:58:00 +00:00
Siim Sammul
100497084a Push the latency histograms to statsd
Cherry pick from master with no changes

Test: unit tests, verified atom logging with statsd_testdrive
Bug: 180584913

Change-Id: I0b8db72c0cb3b285177bbe402ce37639c468dbf3
Merged-In: I0b8db72c0cb3b285177bbe402ce37639c468dbf3
(cherry picked from commit a28ccaf373)
2021-04-12 18:57:13 +00:00
Siim Sammul
650d60ad01 Merge "Store the collected binder latency samples in buckets to form a histogram. Add the ability to generate histograms with varying bucket counts and sizes." into sc-dev 2021-04-12 18:49:27 +00:00
Roland Levillain
9e2adae46b Merge "Fix typo in documentation of ZygoteCommandBuffer.nativeForkRepeatedly." am: 304329d202 am: 87744c8b58 am: 1e3aafb013
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1673345

Change-Id: I8ed55afb37e23af6c9190eed535b2f2ae1424890
2021-04-12 17:46:03 +00:00
Roland Levillain
1e3aafb013 Merge "Fix typo in documentation of ZygoteCommandBuffer.nativeForkRepeatedly." am: 304329d202 am: 87744c8b58
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1673345

Change-Id: I09389f60afbcf40532e140ce42e27f8ef9576ff6
2021-04-12 17:00:40 +00:00
Roland Levillain
904ec85b61 Fix typo in documentation of ZygoteCommandBuffer.nativeForkRepeatedly.
Test: none (documentation change)
Change-Id: I3373f33b1d3a292f79129048733f7ecacb5c4907
2021-04-12 13:37:03 +00:00
Tianjie
6066898f42 Improve the error handling for armRebootEscrow
The change including the following items
1. Add error code for armRebootEscrow
2. Fail the armRebootEscrow for mismatching ror providers.
3. clear the escrow data for fatal armRebootEscrow
4. clear the RoR preparation state in recovery system for fatal
   armRebootEscrow

Bug: 183140900
Test: atest FrameworksServicesTests:RebootEscrowManagerTests;
      atest FrameworksServicesTests:RecoverySystemServiceTest;
      Change provider before reboot, reboot-and-apply failed;
Change-Id: I266ea6f2e1c77994d5cc8c2713106c527c4e0722
2021-04-09 13:18:18 -07:00
Jeff DeCew
7e70261733 Merge "Use ImageResolver for BigPictureStyle when using BigPicture" into sc-dev 2021-04-09 14:24:34 +00:00
Jeff DeCew
f82dcec612 Clean up MessagingLayout notifications
* Collapsed state now appears with the 'headerless' style used for all other collapsed notification templates (except conversations / calls which have their own style).
* Expanded state contnues to use the 'header' treatment of all our big states, but messaging faces will now appear in the left icon gutter, and text will always align with other styles.
* Image messages show up in the 'right icon' location when collapsed, but will not be moved to the 'left icon' when grouped.
* 1-1 conversations will highlight the other user's name as the title, in the collapsed state.

Fixes: 173204301
Test: post and inspect lots of messaging notifications
Change-Id: I5a56d11ea98be1a22caca0d85040ab3fc375216f
2021-04-09 10:14:13 -04:00
kholoud mohamed
fecd017a1d Fix bug in LockSettingsService
Params for passwordToHistoryHash were
passed in the wrong order.
Also removed an used method.

Bug: 183716601
Test: N/A
Change-Id: I370f30ba2ad8fa0eba311c5219b8185dccda8e5e
2021-04-09 11:12:15 +01:00
paulhu
016950a485 Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.

Bug: 184735771
Test: m
Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
2021-04-09 15:47:36 +08:00
Siim Sammul
00f18654d3 Store the collected binder latency samples in buckets to form a
histogram. Add the ability to generate histograms with varying bucket
counts and sizes.

Bug: 179999191
Test: unit tests

Change-Id: I58d3cbdd9ae43c8da121ec41d994b077e29bb371
Merged-In: I58d3cbdd9ae43c8da121ec41d994b077e29bb371
(cherry picked from commit dcd3dc69a1)
2021-04-09 05:34:37 +00:00