Commit Graph

18379 Commits

Author SHA1 Message Date
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
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
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
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
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
Treehugger Robot
6f7c5e0914 Merge "Migrate CALLBACK_ON_CLEAR_CHANGE" 2020-11-18 09:19:29 +00:00
Paul Hu
c5ec644861 Merge "Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API" 2020-11-18 08:35:15 +00:00
paulhu
030fd23caa Expose BroadcastOptions#setMaxManifestReceiverApiLevel as system API
Connectivity service is going to become a mainline module which
will not able to access hidden APIs. But it needs
BroadcastOptions#setMaxManifestReceiverApiLevel to restrict the
receiving of CONNECTIVITY_ACTION intent. Thus, expose it as a
system API to support the usage.

Bug: 170593746
Test: atest FrameworksNetTests
Test: atest CtsNetApi23TestCases
Test: atest KeyChainTests
Change-Id: Ic45552174c3f9e74141db4495bb99a582000b574
Merged-In: Ic45552174c3f9e74141db4495bb99a582000b574
2020-11-17 16:10:26 +00:00
Aurimas Liutikas
e1bb600fc7 Merge "Remove legacy style metalava suppression" 2020-11-16 17:40:07 +00:00
Patrick Baumann
2288e2adff Remove pi.append_native_lib_paths property
This change removes the "pi.append_native_lib_paths" property added as a kill switch for a feature that has been out in the wild now for several releases now.

Change-Id: I21f9d158f60d0cf47e3631bb37ece711b3450494
Merged-In: I21f9d158f60d0cf47e3631bb37ece711b3450494
Fixes: 173103133
(cherry picked from commit 22efaa8422)
2020-11-13 13:27:59 +09:00
Aurimas Liutikas
46a165215b Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Merged-In: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:30:12 -08:00
Tobias Thierer
107c4a524e Fix malformed OWNERS.
Per go/android-owners, include directions should be of the form
[gerrit_project_name]:[absolute_path_to_included_file].

Exempt-From-Owner-Approval: Only editing OWNERS file that ought
to be owned by ourselves, anyway.

Bug: 159055442
Test: Treehugger
Change-Id: I4238c3b0895819a96ca5ab0151f772ecdde588ff
2020-11-11 20:45:39 +00:00
Andrei Onea
6f1512c660 Migrate CALLBACK_ON_CLEAR_CHANGE
Use @EnabledSince instead of @EnabledAfter for CALLBACK_ON_CLEAR_CHANGE.

Test: m
Bug: 172238506
Change-Id: I74d558cbf5c572fad11329269266fab017afde8e
2020-11-09 21:21:20 +00:00
sqian
74207ec1fb Introduce new App Ops permission for 3rd-party InCallService
This permission is intended to be used internally as a system App Ops permission, and let CompanionDeviceManager or RoleManager to grant with
users. If it is granted by user, the corresponding companion app has the ability to query the details of the ongoing calls, and also manage its life cycle.

Bug: 169595473
Test: atest ThirdPartyInCallServiceAppOpsPermissionTest
Change-Id: Ie0f790aab2edcd52cfdbded2630347b9f8dd4d49
Merged-In: Ie0f790aab2edcd52cfdbded2630347b9f8dd4d49
(cherry picked from commit 334ab546e4)
2020-11-09 21:00:55 +00:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
vichang
ffcc7427a8 Merge "Remove android.icu.impl.ICUBinary.dataPath for apps targeting S+" 2020-11-06 10:51:53 +00:00
Paul Hu
01bec3bb2b Merge "Expose AppOpsManager#OPSTR_ACTIVATE_PLATFORM_VPN as system API" 2020-11-05 07:55:10 +00:00
Bill Yi
f2d4156f5b Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE
Merged-In: Ic1e07d28a41eea2ce59cc21702dae95d61adc24e
Change-Id: Ibc69b3e372167485bb70ae3277222bbe8ef7ff27
2020-11-04 13:57:54 -08:00
Eran Messeri
bdd52cb48b DO NOT MERGE: Introduce DPMS shim for active DO/PO check
Introduce a shim into DevicePolicyManagerInternal &
DevicePolicyManagerService so that NetworkStatsAccessTest would not
diverge from internal development branches.

The DevicePolicyManagerService refactoring on the internal branch
removed isActiveAdminWithPolicy in favour of isActiveDeviceOwner and
isActiveProfileOwner.

These methods are being made available in AOSP for
NetworkStatsAccessTest.

Bug: 170459325
Test: atest NetworkStatsAccessTest
Change-Id: Ic7e0898989fb8222aaba2b35436765c04eb3250c
2020-11-04 10:07:06 +00:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Victor Chang
2bce8f9a06 Remove android.icu.impl.ICUBinary.dataPath for apps targeting S+
Bug: 139480281
Bug: 171979766
Test: ZygoteHooksTest
Change-Id: Ic25e240fbcedc08f9de799c025841e88f521d0bf
2020-11-03 15:05:06 +00:00
Shuo Qian
324ef4ff23 Merge "Try to add AppOps Keys into Proto to unblock my project" 2020-11-02 21:43:07 +00:00
paulhu
86054e5e42 Expose AppOpsManager#OPSTR_ACTIVATE_PLATFORM_VPN as system API
Connectivity service module is using some AppOpsManager @hide
APIs but they are not able to call after CS become a
mainline module. Thus, expose them to System APIs.

Bug: 170593746
Test: make update-api
Change-Id: Idb8ee13394ccbd266061eef0cab08a5e28948a3e
2020-11-03 00:54:55 +08:00
Tobias Thierer
0be136593e Merge "Backup platform: Update OWNERS." 2020-10-31 01:08:22 +00:00
Shuo Qian
e3edd0a3c3 Try to add AppOps Keys into Proto to unblock my project
My code https://googleplex-android-review.git.corp.google.com/q/topic:%223rd-incall%22+(status:open%20OR%20status:merged),
 which is adding a proto enum for a new AppOps, is causing presubmit
 failure (https://android-build.googleplex.com/builds/tests/view?invocationId=I62800006309385464&redirect=http%3A%2F%2Fsponge2%2F8a607de5-e0c3-4349-b3c4-0ee397685e18&testResultId=TR55614315792892488).
I cannot check in my code because of this failure.

To solve this failure, one of the next step is:
adding AppOps 100-102 there

Test: Treehugger
Bug: 169595473
Change-Id: Ibd0f85575c9bc3d7aca9d5b011f1e5f0cbf960c1
Merged-In: Ibd0f85575c9bc3d7aca9d5b011f1e5f0cbf960c1
(cherry picked from commit 503ee6ad3b)
2020-10-29 22:15:08 +00:00
Tobias Thierer
e00178d61b Backup platform: Update OWNERS.
Strictly speaking other owners for SettingsProvider/test/...
should exist but there aren't any right now, so it's not
worth keeping a per-file rule since I don't think that
those can be combined with include.

Bug: 159055442
Test: Treehugger
Change-Id: I38c9c227e16c91f72ee0fc761670f82160e46ae2
2020-10-29 20:54:16 +00:00
Benedict Wong
e2dacc7411 Add shell VcnManagementService
This patch adds a shell of the VcnManagementService and VcnManager

Bug: 163431877
Test: Compiles, Boots
Change-Id: I1f3d8ab9c9bff7d419ea6d3edaae3b6b41b1d775
2020-10-27 20:09:06 -07:00
JW Wang
b5f26d897d Let #getUiAutomation return null if UiAutomation fails to connect (3/n)
Now #getUiAutomation returns null if the underlying UiAutomation fails
to connect for targetSdkVersion > R. This gives the caller a chance to
retry and decide when to give up.

Bug: 147785023
Test: presubmit
Change-Id: Ibf201fa042b80c067f2a0c3b0bde23adf9c60546
Merged-In: Ibf201fa042b80c067f2a0c3b0bde23adf9c60546
2020-10-27 16:32:19 +00:00
JW Wang
0c56d28a19 Allow #disconnect to be called safely on connection timeout (2/n)
Now #disconnect won't throw if the previous #connect failed due to
timeout. Note we also introduce generation id so we won't receive
notifications or modifications from the previous client to disrupt
UiAutomation's status when making the next connection.

Bug: 147785023
Test: m
Change-Id: Idf77207124494bd78770b8ea5d9ac4b1fd1a490a
Merged-In: Idf77207124494bd78770b8ea5d9ac4b1fd1a490a
2020-10-27 16:31:43 +00:00
JW Wang
67c91c405c Add #connectWithTimeout (1/n)
Add #connectWithTimeout which allows us to specify the timeout before
giving up the connection. The method throws a TimeoutException so the
caller can catch it and retry connection again.

Note we don't change the exception spec. of #connect in order to be
source and binary compatible.

Bug: 147785023
Test: m
Change-Id: I5ac61ed0aef107f4e38166c0b95bc3a3fb419387
Merged-In: I5ac61ed0aef107f4e38166c0b95bc3a3fb419387
2020-10-23 15:23:01 +00:00
Anton Hansson
dd7d52f963 Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-19 16:41:01 +01:00
Makoto Onuki
b547383444 Do not send WTF when ETHERNET_SERVICE
Not all devices have the ETHERNET_SERVICE service, which is expected,
so do not send WTF even when it's not available.

Fix: 169024836
Test: Build

Change-Id: Ia1fa2d1753aa40e1d09996be11082d65afc5458f
2020-10-13 13:17:31 -07:00
Andrii Kulian
11725e1206 Require permission to create trusted displays
Bug: 162627132
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bubbles
Test: atest DisplayTest
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay
Test: adb logcat -b events

Change-Id: Id06b2013ef5fdeadf321f14f8b611c733031d54d
Merged-In: Id06b2013ef5fdeadf321f14f8b611c733031d54d
(cherry picked from commit ef7b1333f0)
2020-10-13 01:06:48 +00:00
Rubin Xu
d40199b5b2 Fix non-inclusive terms in framework device policy logic
Bug: 170188829
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Merged-In: I8b8ab1442c3f592a4e3ce70852025b1b169d5f18
Change-Id: I8b8ab1442c3f592a4e3ce70852025b1b169d5f18
2020-10-08 14:22:47 +00:00
Charles Chen
018f36d04b [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe am: 6c079ef0b5 am: fb1170dc82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: I2063abae809ec23db3faf6aa849e071c53863732
2020-09-29 06:54:04 +00:00
Charles Chen
f0daa2119f [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe am: 6c079ef0b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: I306a382fa9ae3b9abc096c343316365c6a6ce8dd
2020-09-29 06:36:04 +00:00
Charles Chen
fb1170dc82 [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe am: 6c079ef0b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: If160b7e93e79cd73468cbbdb2df614ccb7ab45c8
2020-09-29 06:35:44 +00:00
Charles Chen
6c079ef0b5 [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: If1a42b8cd7cab0c97f45fc3f452dbe4bc054cf41
2020-09-29 06:17:52 +00:00
Charles Chen
ae03031efe [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays"
This reverts commit f21c885ca7.

Reason for revert: Have regression b/168268396.
Needs to pull out from Nov. builds.

Bug: 162627132

Change-Id: I29fa3937d1655a0cc7591abcfa2067f4fb2b2bcb
2020-09-29 03:21:52 +00:00
Charles Chen
3ac4e62a75 Revert "Require permission to create trusted displays"
This reverts commit f21c885ca7.

Reason for revert: Have regression b/168268396.
Needs to pull out from Nov. builds.

Bug: 162627132

Change-Id: I29fa3937d1655a0cc7591abcfa2067f4fb2b2bcb
(cherry picked from commit ac67bee2165e7762f969258d1c39445229d1068d)
2020-09-28 20:57:58 +00:00
TreeHugger Robot
97c1d214fb Merge "Revert "Allow package verifier to hide specific fgs notifications."" into rvc-qpr-dev am: f7741b10f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12652691

Change-Id: I3290012f9a62af93b6633f8f8f3c69773e6ecdb6
2020-09-25 17:23:16 +00:00
TreeHugger Robot
f7741b10f3 Merge "Revert "Allow package verifier to hide specific fgs notifications."" into rvc-qpr-dev 2020-09-25 17:16:49 +00:00
TreeHugger Robot
33d7e9308e Merge "Make process level rotated config and display metrics consistent" into rvc-qpr-dev am: d6af5b5d1e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12670488

Change-Id: I1ca8add8df59a72e35ced7d0f888c662e01d7dc2
2020-09-25 05:28:24 +00:00
TreeHugger Robot
d6af5b5d1e Merge "Make process level rotated config and display metrics consistent" into rvc-qpr-dev 2020-09-25 03:54:37 +00:00
Ryan Mitchell
030e4702d0 Merge "Reduce RM createResources lock contention" into rvc-qpr-dev 2020-09-24 15:26:25 +00:00