Commit Graph

640958 Commits

Author SHA1 Message Date
Mark Renouf
1cd1c555c2 ScrollCaptureConnection: fix npe on close() when active
A reference to the callback was being removed while still
needed. Instead use a local copy for posted callback.

Bug: 12345678
Test: atest ScrollCaptureConnectionTest#testCloseWhileActive
Change-Id: I3a11ac86a8c291972f442ebce962ba8a3a1ddee6
2021-04-15 13:31:48 -04: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
Alexander Dorokhine
10f4c55099 Merge "Remove ParcelableException from AppSearch." into sc-dev 2021-04-15 17:21:32 +00:00
Jan Tomljanovic
a8494eeedf Merge "Stop rate-limiting toasts while the package is in the foreground." into sc-dev 2021-04-15 17:19:02 +00:00
George Chang
b1031e1054 Merge changes from topic "nfcc_aon_listener" am: 2195e2b514 am: 2f336d3401 am: e3cba3971a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669508

Change-Id: I3a234b2714f8254df7f4082b909b1f960b5d03f7
2021-04-15 17:14:40 +00:00
George Chang
84ca324df6 Update ControllerAlwaysOnStateCallback to ControllerAlwaysOnListener am: 78fad0d6d3 am: 9aa1fc83e5 am: 5293a03622
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675631

Change-Id: Ib6e7a448fcc62cc9af7600a2fb8df640ee7e9606
2021-04-15 17:14:23 +00:00
Fabian Kozynski
a869fe01e6 Ensure the no calling icon is not ignored
It should never be ignored at the start of the animation.

Test: manual
Fixes: 185423438
Change-Id: I46cf37f6978c59e35fd6188fd7b4052ca5863be2
2021-04-15 13:12:32 -04:00
TreeHugger Robot
bbf0d29880 Merge "Check usb functions support with USB Gadget Hal version" into sc-dev 2021-04-15 17:07:19 +00:00
Evan Severson
eeeb46976e Merge "Set user restriction when mic/camera toggles are used" into sc-dev 2021-04-15 17:04:14 +00:00
Donald Chai
6b5e6bba9b Merge "Fix typo" 2021-04-15 16:50:02 +00:00
TreeHugger Robot
d3c45ffecc Merge "Make @RequiresPermission RetentionPolicy.CLASS." into sc-dev 2021-04-15 16:47:03 +00:00
George Chang
e3cba3971a Merge changes from topic "nfcc_aon_listener" am: 2195e2b514 am: 2f336d3401
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669508

Change-Id: I34dad38dbe3ddf236655976e887b7ad19d87ddbf
2021-04-15 16:27:56 +00:00
George Chang
5293a03622 Update ControllerAlwaysOnStateCallback to ControllerAlwaysOnListener am: 78fad0d6d3 am: 9aa1fc83e5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675631

Change-Id: I02383b4083d6df09d78861df0274451295103754
2021-04-15 16:27:50 +00:00
Kweku Adams
02def92892 Add intra-package job concurrency limits.
Add limits so that individual packages can't run more than X number
of jobs concurrently (so that we allow other apps to run their jobs
as well). For now, limit packages to 3 concurrent expedited jobs and
8 concurrent regular jobs. TOP apps are not subject to this restriction,
and the restriction also only comes into effect if there are more jobs
running+pending than slots available.

Bug: 171305774
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job
Test: atest CtsJobSchedulerTestCases
Change-Id: Id9d6f118b078ab54e3abafffd7d0ed00795d19c6
2021-04-15 09:24:27 -07:00
junyulai
c219d421eb [VCN20] Change requestBackgroundNetwork argument order
Test: atest FrameworksNetTests FrameworksVcnTests
Fix: 185215095
Merged-In: Id281678fe85ce0894b0e92e11c0283d4d1b4ecdb
Change-Id: Id281678fe85ce0894b0e92e11c0283d4d1b4ecdb
  (cherry-picked from ag/14198667)
2021-04-16 00:16:21 +08:00
Aaron Huang
abbee6e7c6 Handle null pointer cases in ConnectivityService
If a method is called by adb command "service call"
with no parameters. It will cause to crash because
of a null object reference.

Add a null check for them to avoid system server crash.

Bug: 172885426
Test: FrameworksNetTest
      adb shell service call connectivity #
Change-Id: I8748fc5c6a7a6e82db3581e3026a3f75909a357e
2021-04-16 00:15:25 +08:00
TreeHugger Robot
d7889c0282 Merge "Skip domain approval logic if host is invalid" into sc-dev 2021-04-15 16:00:35 +00:00
Alex Johnston
24f078ee95 Merge "DPMS setProfileOwner access control" into sc-dev 2021-04-15 15:59:25 +00:00
Anna Zappone
6fac9c780a Launch app unavailable dialog when WP is off
Test: LaunchConversationActivityTest
Bug: 180113387
Change-Id: I35460bd14840ff70654bd15fe65c23f59cb35153
2021-04-15 15:58:24 +00:00
Junyu Lai
d07729d71f Merge "[VCN20] Change requestBackgroundNetwork argument order" into sc-dev 2021-04-15 15:57:42 +00:00
Lee Shombert
6e67ca77fb Improve PackageManager snapshot statistics
Bug: 184751735

This makes some small improvements to the snapshot statistics.
The change emphasizes long rebuild times over short snapshot
lifetimes.

1. The pm_snapshot_rebuild "elapsed" field is renamed "lifetime".
   This is the number of times the previous snapshot (the snapshot
   that was replaced by this rebuild)  was used.

2. The pm_snapshot_stats cumulative build time is now a long.
   Wrap-around of the 32-bit int was seen during testing.  Also, the
   "quick_rebuilds" has been renamed to "short_lived".

3. pm_snapshot_rebuild events are only logged for long rebuild times.
   Short lifetimes are still counted but do not generate their own
   events.  Also, any rebuild time that is greater than the current
   maximum rebuild time is logged, even if the number of logged events
   is greater than the limit.

4. Snapshot statistics are included in the package manager dump.   Two
   sets of statistics are presented: there is a set of 10, rolling
   over every minute, and a set of two, rolling over every week.
   The snapshot statistics are part of the default "package" dumpsys
   output and can be selected individually with "package snapshot".

5. The SnapshotStatistics class is now in its own file.  At the
   momement, the class has code that is specific to
   PackageManagerService, but it should be possible to make the class
   more generic in the future, if desired.

See the bug for sample output.

Test: manual steps -
 * Create a bug report and verify that the new statistics are present.
 * Verify that pm_snapshot_rebuild events are generated for long
   rebuild times.

Change-Id: I3197d6b76e86ecfcdaff36f47e8a6b5d4a6e456d
2021-04-15 08:52:49 -07:00
Nataniel Borges
f226bc0878 Remove quicksearchbox from home window list
Previously Winscope considered only the `isVisible` property to determine if the window was visible or not. This failed in cases such as `com.google.android.googlequicksearchbox/android.app.ContextImpl` when launching apps, where `isVisible=true` and `alpha=0`

Bug: 181630910
Bug: 182720234
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I75fab0c6de02e43265002986901353f8e230baa5
2021-04-15 17:50:34 +02:00
George Chang
2f336d3401 Merge changes from topic "nfcc_aon_listener" am: 2195e2b514
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669508

Change-Id: I451ca24cbfecd944ccda61bcb23df26f3c349642
2021-04-15 15:47:25 +00:00
TYM Tsai
7bb9eab0a8 Enable IME to control the source of suggestions
Allow IME to control the applications and AutofillService to display
inline suggestions in the inline strip.

Bug: 184731683
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ifa99e51d93e844f5c28861e4466c2433f92d7881
2021-04-15 23:44:56 +08:00
George Chang
9aa1fc83e5 Update ControllerAlwaysOnStateCallback to ControllerAlwaysOnListener am: 78fad0d6d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675631

Change-Id: I0639426eac7ad74ddd2dee3097f5e0791b235329
2021-04-15 15:44:09 +00:00
Winson Chiu
062dde5e2b Merge "Fix overlay reference app visibility" into sc-dev 2021-04-15 15:40:05 +00:00
Alex Johnston
a1ef67897d Merge "PasswordPolicy.getMinMetrics PIN" into sc-dev 2021-04-15 15:21:01 +00:00
Alex Johnston
3fd4388757 PasswordPolicy.getMinMetrics PIN
* If the password quality is NUMERIC
  or NUMERIC_COMPLEX, the credential
  type should be CREDENTIAL_TYPE_PIN

Bug: 184103377
Test: atest com.android.server.devicepolicy.PasswordPolicyTest
      atest android.app.admin.PasswordMetricsTest
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
      CtsVerifier > Device owner tests > policy transparency test
      > set password quality
Change-Id: Ibad35d22c34b6cd9ed34b2e671b38503becd7da5
2021-04-15 15:20:12 +00:00
Ashwini Oruganti
aeb5dbf1c5 Merge "Enforce the PI mutability flag requirement for test apps" into sc-dev 2021-04-15 15:13:23 +00:00
Neil Fuller
41b2271b38 Merge "Add a permission check to a stubbed method" into sc-dev 2021-04-15 15:13:16 +00:00
George Chang
2195e2b514 Merge changes from topic "nfcc_aon_listener"
* changes:
  Add NfcManagerTests
  Update ControllerAlwaysOnStateCallback to ControllerAlwaysOnListener
2021-04-15 15:09:00 +00:00
Orion Hodson
56b6ff07c3 Merge "Revert "Change PlaybackState#isActiveState to isActive"" into sc-dev 2021-04-15 15:07:24 +00:00
Riddle Hsu
ed94e99260 Merge "Fix NPE if display is off and then removed" into sc-dev 2021-04-15 14:48:41 +00:00
Robert Horvath
8c878d61bb Conditionally show bootanimation for quiescent boots
Allow bootanimation to play if the boot is quiescent and the system
property ro.bootanim.quiescent.enabled is set to true.
This allows the bootanimation to become visible if the display is
turned on during the bootanimation. If OEMs want this behavior and the
device implements suppression of video/audio during quiescent boot,
they can set the system property
ro.bootanim.quiescent.enabled.

Bug: 185118020
Test: PRODUCT_PRODUCT_PROPERTIES += ro.bootanim.quiescent.enabled=true
      adb reboot quiescent
      Spam `adb shell input keyevent POWER` during boot
Test: Repeat the above test with the property set to 0
Change-Id: I54a4ad552704106ca06c4992fed4a2d501aa3fa5
2021-04-15 16:47:59 +02:00
Chavi Weingarten
476d1d4558 Merge "Use separate Transaction object in SV" into sc-dev 2021-04-15 14:30:38 +00:00
Rhed Jao
1efdc1f4c0 Apply package visibility to the getSyncAdapterPackages
Bug: 184525389
Test: atest AppEnumerationTests
Test: atest AppStandbyControllerTests
Change-Id: I592c32c05b2276221c03ce751dd41a94a78d4b65
2021-04-15 22:24:41 +08:00
TreeHugger Robot
0190323cf1 Merge "Separate initial layout from placeholder layout" into sc-dev 2021-04-15 13:57:14 +00:00
Jeff Sharkey
6f2b69d362 Make @RequiresPermission RetentionPolicy.CLASS.
As part of Error Prone checks, we're now placing these annotations
directly on AIDL interfaces.  However, many portions of the OS are
built using prebuilt AIDL files, where RetentionPolicy.SOURCE
annotations have been stripped away.

To retain these annotations for aiding permission enforcement
checks, this change upgrades to RetentionPolicy.CLASS.

Bug: 183626724
Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true
Change-Id: Ic88cbf470efc1d50926fe2ff16f0e2f6cd7b1173
2021-04-15 07:55:10 -06:00
Jeff Sharkey
cd5c179783 Merge changes from topic "apr10" into sc-dev
* changes:
  Update Bluetooth API annotations.
  Error Prone for RequiresPermission across AIDL.
2021-04-15 13:43:03 +00:00
Martijn Coenen
7c64d3164f Merge "Revert "Register PackageChangedReceiver to AppSearchManagerService."" into sc-dev 2021-04-15 13:31:41 +00:00
TreeHugger Robot
2f69e9ff46 Merge "Manage/Clear all pill color" into sc-dev 2021-04-15 13:25:58 +00:00
Siim Sammul
0ad62a2471 Add dplotnikov and gaillard as owners for binder proto file too.
Change-Id: I83774866d1713ec17e5bc547c22e3da6b7b0a2b2
Test: n/a
Bug: 180584913
2021-04-15 13:22:52 +00:00
Fabian Kozynski
a900a21aae Merge "Remove QS drag handle" into sc-dev 2021-04-15 13:22:33 +00:00
Fabian Kozynski
b0351d8b70 Merge changes from topics "FK_remove_qs_flag", "FK_remove_qs_flag_2" into sc-dev
* changes:
  Remove QS flag
  Fold in QS overlay resources and set flag to true
2021-04-15 13:21:59 +00:00
Chiachang Wang
a4e5f189c9 Merge "Remove hidden method link in public addRoute API" am: fe09ad78cd am: ee651a8d1a am: 11325e1594
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676435

Change-Id: I80ed5448b854960cea0ae58c93491990d54ffd86
2021-04-15 13:16:16 +00:00
Pedro Loureiro
9def6bf7a3 [automerger skipped] Merge "Add lint baseline to address NewApi errors" am: c91722d3b1 am: 302a822623 am: 7f37bd676f -s ours
am skip reason: skip tag Change-Id Ide8a8fe80ba31396f23853ab266afcbcc33af9a6 with SHA-1 d34f536b59 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675513

Change-Id: I38fa1bddcae4183a5cc6818c7150ae817711f2af
2021-04-15 13:15:19 +00:00
Alex Johnston
53fdbbcc97 DPMS setProfileOwner access control
* Check whether the caller is system or has
  permission to set the profile owner before
  checking whether the package exists on
  device.

Manual testing
* Call DPMS setProfileOwner with an installed
  package but not as the system caller
* Call DPMS setProfileOwner with an uninstalled
  package and not as the system caller
* Both calls should give the same error message
  and logs.

Bug: 184525740
Test: manual testing
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.ProfileOwnerTest
Change-Id: I24e4d33442b0cf9baae290c0dbde45d725843055
2021-04-15 14:06:50 +01:00
Chiachang Wang
11325e1594 Merge "Remove hidden method link in public addRoute API" am: fe09ad78cd am: ee651a8d1a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676435

Change-Id: I3477f3a78ebee26d950ce6c6eaf45cdef8a5ee6d
2021-04-15 12:46:41 +00:00
Pedro Loureiro
7f37bd676f Merge "Add lint baseline to address NewApi errors" am: c91722d3b1 am: 302a822623
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675513

Change-Id: I163b338c59903fdbc1be9f9d0d57ab802c37218e
2021-04-15 12:26:57 +00:00
Chiachang Wang
ee651a8d1a Merge "Remove hidden method link in public addRoute API" am: fe09ad78cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676435

Change-Id: Ide004783057673561ea631e0a59ce4c01c2841af
2021-04-15 11:53:02 +00:00