Commit Graph

18478 Commits

Author SHA1 Message Date
Alex Kershaw
2e6c54c293 DO NOT MERGE Correctly reset cross-profile app-op am: f764d9e98f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13236705

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iea45f7508d51a3a2f2a7be513549b2d8d34e1bb9
2020-12-17 17:22:22 +00:00
Alex Kershaw
f764d9e98f DO NOT MERGE Correctly reset cross-profile app-op
Delegate the resetting of the INTERACT_ACROSS_PROFILES app-op to
DevicePolicyManager, which knows whether it should be pre-granted and
knows to apply it equally across all users in the profile group.

Further unit tests for DevicePolicyManagerInternal will be added in
b/175440570 when we have the better infra for that.

The CrossProfileAppsServiceImpl changes look more complex than they are.
They consist of the following:
- Inclusive language changes to 'allowlist'
- Static imports of permissions to improve readability
- Previously, the setInteractAcrossProfilesAppOp method would set the
app-op for every user within the profile group of the 'calling user'.
However, given that we are now exposing this as a server-side internal
API where we need to pass in a user ID (from AppOpsService), we don't
necessarily have the guarantee that the 'calling user' is in the same
profile group. So we split it up: the client-side API and AIDL API still
set the app-op for the calling profile group, whereas the internal API
sets the app-op for every user within the profile group of the provided
user. The changes simply abstract away references to the 'calling user
ID'.

Fixes: 166561076
Bug: 175440570
Test: atest services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose -c
Test: manual
Change-Id: I2181fe66022aaf6c3e6d784c0569d2f41ab66537
(cherry picked from commit d004f41188)
2020-12-17 13:27:34 +00:00
Remi NGUYEN VAN
eb32604c2b Merge "Run LowpanManager on BackgroundThread" am: e9c000eee2 am: f4e6668082
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513142

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3c501da3c8a7b5217d1574d5e7e4e41e0535e227
2020-12-15 03:55:01 +00:00
Remi NGUYEN VAN
e9c000eee2 Merge "Run LowpanManager on BackgroundThread" 2020-12-15 03:10:36 +00:00
Treehugger Robot
c656403bed Merge "Add a path for GNSS time suggestions" am: 85ebf98dcf am: 4ef13ea0c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1528193

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idcef60976ab86fb527000594cc6698ae2cd7feb3
2020-12-14 19:18:04 +00:00
Treehugger Robot
85ebf98dcf Merge "Add a path for GNSS time suggestions" 2020-12-14 18:02:50 +00:00
TreeHugger Robot
78c4844b69 Merge "Revert "DO NOT MERGE Add RECORD_AUDIO_OUTPUT app op"" into rvc-qpr-dev-plus-aosp 2020-12-14 17:52:27 +00:00
Wale Ogunwale
dfbbd0e5d7 Merge "Add more OWNERS coverages(2/n)" am: a2c85ce0ba am: 700b3d812f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1527819

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1d1525ba52d4365241785b4789f7363aac0d32c4
2020-12-14 17:30:00 +00:00
Neil Fuller
3f5237157e Add a path for GNSS time suggestions
Add a path for GNSS time suggestions to get to the time detector.

Bug: 157265008
Test: atest services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
Test: atest android.app.timedetector
Change-Id: I5cb12b5545652ed885b72a3170940050ce0628a6
Merged-In: I5cb12b5545652ed885b72a3170940050ce0628a6
2020-12-14 16:59:39 +00:00
Nate Myren
06a8530e94 Revert "DO NOT MERGE Add RECORD_AUDIO_OUTPUT app op"
This reverts commit 471f8cec33.

Reason for revert: breaking tests

Fixes: 175508982
Change-Id: Ic66ac892d857e53cd613e769f837782be125db67
2020-12-14 16:27:01 +00:00
Wale Ogunwale
a2c85ce0ba Merge "Add more OWNERS coverages(2/n)" 2020-12-14 16:25:16 +00:00
Eran Messeri
2768a0acf3 Merge "Device Policy Manager OWNERS: Add Enterprise team" am: f4555b5fe2 am: feb6b04243
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If1ec5ca4642e6665a18b1246300d41697313ba3f
2020-12-14 14:40:46 +00:00
Neil Fuller
7c7b231319 Merge "Modify / add OWNERS files related to time / tz" am: 5ffc4b11f5 am: 762b9e9d79
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1526742

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3502729562057e50c847200237383f7821b8c328
2020-12-14 14:39:46 +00:00
Eran Messeri
f4555b5fe2 Merge "Device Policy Manager OWNERS: Add Enterprise team" 2020-12-14 13:51:23 +00:00
Neil Fuller
2b5f56c8c8 Modify / add OWNERS files related to time / tz
Test: None
Change-Id: Ib6fe305a1091201bbb80c14a57e04c93912e2342
2020-12-14 11:32:44 +00:00
Remi NGUYEN VAN
cad9420134 Run LowpanManager on BackgroundThread
The ConnectivityThread class is being separated into a specific
connectivity JAR; transport-specific managers like LowpanManager should
not be sharing the ConnectivityThread.

As callbacks from ILowpanManager / ILowpanManagerListener already do not
have any ordering guarantee with ConnectivityManager callbacks, the
impact of this change should be minimal.

LowpanManager is unused in AOSP, and not part of the API.

Bug: 174436414
Test: m
Change-Id: I23483ed7c4a6c5283b365430a3e503a0dd86c2cb
2020-12-14 17:46:23 +09:00
Charles Chen
2c86c2cf8a Add more OWNERS coverages(2/n)
Test: manual
Bug: 174932174
Change-Id: Id6a4c60734f24a3d8fdec27b11baead550296441
2020-12-14 15:00:22 +08:00
Nate Myren
471f8cec33 DO NOT MERGE Add RECORD_AUDIO_OUTPUT app op
To be used when recording app output via the REMOTE_SUBMIX source
Test: presubmit
Bug: 173797503

Change-Id: I5851197ae42fb431f3b89c961e46b9f9e77d3eab
2020-12-11 21:41:59 +00:00
Wale Ogunwale
926aa8da2c Merge "Add more OWNERS coverages" am: 32ff0144bf am: 60f676c7d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I32e5f8566ba916c892898f3f521a5a4309646142
2020-12-11 16:58:45 +00:00
Charles Chen
09f4e85ac2 Add more OWNERS coverages
Test: manual
Bug: 174932174
Change-Id: Ia798bdbce8516a3d675c55028ab637ad7f0695cf
2020-12-11 19:16:38 +08:00
Tobias Thierer
c6d183923c BackupManagerService: Make new behavior conditional on ChangeId.
Base CL ag/12885739 introduced unconditional enforcement of the BACKUP
permission for callers of BackupManagerService.isBackupServiceActive()
in the service, but dropped the enforcement on the app process side
(BackupManager).

This CL makes the behavior change conditional on a compat ChangeId.

Bug: 158482162
Test: Manually checked that an app similar to the code sample from
      http://b/158482162#comment1 can reproduce the behavior.
      This is true both before the base CL and after this CL, when
      the app targets an old SDK version (26).
Test: Checked that both (a) before this CL, (b) after this CL where
      the change is manually enabled for the app via the below commands,
      the app runs into a SecurityException instead:
$ adb shell am compat enable 158482162 com.example.tester
$ adb shell dumpsys platform_compat | grep 158482162
ChangeId(158482162; name=IS_BACKUP_SERVICE_ACTIVE_ENFORCE_PERMISSION_IN_SERVICE; enableSinceTargetSdk=31; packageOverrides={com.example.tester=true})

Change-Id: I58e5d2a0b438296137fd76720636c8fdce740ded
Merged-In: I58e5d2a0b438296137fd76720636c8fdce740ded
(cherry picked from commit 7671f0d95c)
2020-12-11 00:53:23 +00:00
Tobias Thierer
79192da3f3 Enforce BACKUP permission on Service end.
BackupManager runs in the client process, whereas BackupManagerService
runs in the system server process. Therefore, apps permissions need should
be enforced on the service side.

Bug: 158482162
Test: Manually checked that a sample app  encounters SecurityException
      after but not before this CL, when running code similar to the
      sample in http://b/158482162#comment1 to figure out whether
      isBackupServiceActive() for its own uid.
Change-Id: I59693819542a80a065a9c88373393b0ba0dbef65
Merged-In: I59693819542a80a065a9c88373393b0ba0dbef65
(cherry picked from commit b2ab2c414f)
2020-12-11 00:50:23 +00:00
Jeff Sharkey
845bfdd0ba Merge "Additional per-file OWNERS for shared directories." am: 8b102a5988 am: 7a9f3e10de
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1523618

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9df0f96893728df43b3ae402ac69ec3e02079f51
2020-12-10 16:32:34 +00:00
Jeff Sharkey
e2cc3f8bec Additional per-file OWNERS for shared directories.
Iteration based on areas of tree where detailed ownership was found
to be missing during routine code reviews.

Also add more detailed examples to OWNERS.md.

Bug: 174932174
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I46ccef33b34594181ae8dc62973d68020f827d6b
2020-12-10 08:37:23 -07:00
Eran Messeri
a6ac235ae8 Device Policy Manager OWNERS: Add Enterprise team
Add the Enterprise team to the owners of the admin/ java
directory.

Bug: 174932174
Test: N/A
Change-Id: I565cd3bdc3f00e843071863c10832c9e81cad748
2020-12-09 11:21:28 +00:00
Jeff Sharkey
358f0d4fc8 Merge changes from topic "dec5" am: c2793cf12b am: 9af6ac78b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2776a545a24f007ccb4b9ee14705978571265ef3
2020-12-08 16:43:19 +00:00
Jeff Sharkey
24d251403b Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c am: c7c4a74a78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5120a3701af3564f363900b20bca75f3ad2a854c
2020-12-08 16:43:17 +00:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
c7c4a74a78 Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0211462ecbcd9ad66f66af87e31cf12e1582fc65
2020-12-08 16:01:16 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Xin Li
8836e88707 DO NOT MERGE - Merge RQ1A.201205.011
Bug: 172690556
Merged-In: I26bed08456197721d07f2fab563be0c54e43efd2
Change-Id: Ic1ac100efa50687ccfcbb87ee91a57703105afad
2020-12-07 00:39:42 -08:00
Brian Stack
c57e2123d4 Expose UwbManager through Context.getSystemService am: 3163bf0d35 am: 2557747c4d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I5213f04b2bf1f0db39a872ab7dd7f0d45fd60103
2020-12-04 18:00:40 +00:00
Brian Stack
2557747c4d Expose UwbManager through Context.getSystemService am: 3163bf0d35
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I14aa423224f37447024ddb4cc67cabe06d60a30a
2020-12-04 17:39:49 +00:00
TreeHugger Robot
12f1567f76 Merge "Update link for Permissions samples in Javadoc" into rvc-dev am: 82a1ff7a94 am: 4224da2b2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13159866

Change-Id: I2dda484cb7780e15153442d29bc180045604aadb
2020-12-03 18:43:31 +00:00
Tiem Song
a9565b2cb0 Update link for Permissions samples in Javadoc
Bug: 158042826
Change-Id: I71ab17b21b31ff6584facd023e4c4818b0ab1b55
Merged-In: I71ab17b21b31ff6584facd023e4c4818b0ab1b55
Test: N/A
2020-12-02 20:50:04 -08:00
Brian Stack
3163bf0d35 Expose UwbManager through Context.getSystemService
Bug: 170323306
Test: atest UwbManagerTests
Change-Id: I04c1263a191fcfeee5824be5d6d1944354819d02
Merged-In: I04c1263a191fcfeee5824be5d6d1944354819d02
2020-12-02 13:58:28 -08:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Treehugger Robot
7078bd5162 Merge "Update link for Permissions samples in Javadoc" am: a7564ec175 am: fd9c04868e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513929

Change-Id: I9ca103a83da51c4553b192df6520737cd0936c9b
2020-11-30 23:50:08 +00:00
Tiem Song
eff0b0673c Update link for Permissions samples in Javadoc
Bug: 158042826
Change-Id: I71ab17b21b31ff6584facd023e4c4818b0ab1b55
Test: N/A
2020-11-30 18:17:43 +00:00
Almaz Mingaleev
c7a7943a2a Merge "Make manual suggestions synchronous/return result" am: 08466f6151 am: 413f8199da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1252169

Change-Id: I8d41c4ab3688a5e1cc2a7d2b52d25e52c059c808
2020-11-25 12:18:38 +00:00
Neil Fuller
1395dffdb1 Make manual suggestions synchronous/return result
Modify the suggestManual...() methods on TimeDetector and
TimeZoneDetector to be synchronous, and have them return true/false to
indicate if the call "succeeded". This is being done before adding more
calls that will be used by apps like SettingsUI; generally all calls
that are user facing and could conceivably fail should return
success/failure information and therefore need to happen synchronously.

Test: atest services/tests/servicestests/src/com/android/server/timedetector/
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Bug: 140712361
Merged-In: I5b6b7fb5af2ffe88392b2ca8d1e8fff2a187521b
Change-Id: I5b6b7fb5af2ffe88392b2ca8d1e8fff2a187521b
2020-11-25 09:57:07 +00:00
Ahaan Ugale
5d69e8ed59 Allow only preloaded voice recognition services to blame calling apps. am: 19e29925ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13095463

Change-Id: I48f2f854ee8efc9db99ceaaba28a48888a39f1d7
2020-11-21 13:48:04 +00:00
Ahaan Ugale
19e29925ee Allow only preloaded voice recognition services to blame calling apps.
Bug: 170795434
Test: manual
Merged-In: Ided2b19661d937ff0b4ec881f2e629afe47435e5
Change-Id: I92a146e5763afd07a44f8e9c7a3c71a27d1f16bd
2020-11-21 03:29:40 +00:00
Jordan Jozwiak
a26bcb66cf Merge "Do not power off display on lockNow() on automotive builds." into rvc-qpr-dev am: cad8a4f55e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13037790

Change-Id: I2eae34c713b8ebc41e7332eca7a89f594da84c59
2020-11-18 18:11:11 +00:00
Jordan Jozwiak
cad8a4f55e Merge "Do not power off display on lockNow() on automotive builds." into rvc-qpr-dev 2020-11-18 17:46:30 +00:00
Treehugger Robot
4c7226a1a4 Merge "Migrate CALLBACK_ON_CLEAR_CHANGE" am: 6f7c5e0914 am: 62d7bd9555 am: f669aaa6ce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492844

Change-Id: Ica16e03e57745c946c42d4b8e09385fbac793ae4
2020-11-18 09:58:10 +00:00
Paul Hu
3f3766a881 Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" am: c5ec644861 am: cb9a7b819c am: b12dfe489f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466224

Change-Id: Id6b1eab77eee4fb38e9fe8e97bac28c2caec61c0
2020-11-18 09:57:10 +00:00
Treehugger Robot
f669aaa6ce Merge "Migrate CALLBACK_ON_CLEAR_CHANGE" am: 6f7c5e0914 am: 62d7bd9555
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492844

Change-Id: I40fc10b8f269530f671d8511435c5c62d0c1f655
2020-11-18 09:28:59 +00:00
Paul Hu
b12dfe489f Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" am: c5ec644861 am: cb9a7b819c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466224

Change-Id: Ifba72e9bd6cb8551d825898e2ffc8ad34bf238b3
2020-11-18 09:28:18 +00:00