Commit Graph

18289 Commits

Author SHA1 Message Date
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
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
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
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
Julia Reynolds
aaf6b40e17 Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
(cherry picked from commit a19f9ed2b1)
2020-09-16 23:28:52 +00:00
Andrii Kulian
27ef1fc697 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 f21c885ca7)
2020-09-16 23:28:42 +00:00
Jeff Sharkey
c0b288133a Merge changes from topic "sep11"
* changes:
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
2020-09-14 21:52:13 +00:00
Julia Reynolds
71c18d2afc Replace 'whitelist' with 'allowlist'
Change-Id: If7422064e59e6c055c9dae092ead298b81cf41e8
Test: atest
Bug: 161889253
Merged-In: I94a43c1c995052b034d8a5377786e1a15e4c9c59
2020-09-14 18:29:23 +00:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
Xin Li
c8c8e8e8be Merge RP1A.200720.011
Bug: 167588565
Merged-In: Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c
Change-Id: Ia8f5f008bc1f77115b644ab996aedc892fab68e7
2020-09-02 12:34:37 -07:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Steven Moreland
1997524011 ApplicationLoaders: improve classloader cache errs
When zygote preloads a classloader, but at runtime, a different one is
used, we get an error and fallback. This error is improved in the
following ways:
- print the zip name with the shared libraries, so we know which library
  the error is for
- distinguish cached from runtime dependencies in the error message
  itself

Bug: 163886868
Test: N/A
Change-Id: I3f4c4078e9eb05b83058982afc7b7ea0822d1257
2020-08-13 17:07:34 +00:00
Xin Li
da7d27b21e Merge QQ3A.200805.001
Bug: 162879794
Merged-In: I6e0bdc8c02bab54f6278096b3a3acadd97c064c6
Change-Id: Idbcffbd09045575e92297fd6e0071a56a4e3cbae
2020-08-05 17:40:02 +00:00
Michael Wachenschwanz
a57c974945 Update language to comply with Android’s inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: I6aac06e56507bb6ce69afd9b3db92be6b03a1400
Test: n/a
2020-07-31 18:54:02 +00:00
Nicole Borrelli
dd0406becb Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference


Bug: 161896447
Change-Id: I038fbac2bb59e97dc87f082eab98f3838263c909
2020-07-29 22:31:37 +00:00
Jing Ji
ed2c898865 Java docs update: Advise not to include PII in setProcessStateSummary
Bug: 161812603
Test: m -j offline-sdk-docs & manual verify the javadoc
Change-Id: I741bbf7b83badcd7f1610f31bbd41a49b8b975fb
(cherry picked from commit 3bda3bf8c6)
2020-07-23 23:03:59 +00:00
Julia Reynolds
100ea3d3f0 Remove gendered language
Test: atest
Bug: 161908447
Change-Id: Ie331cf630b94e600326e77dfa81d01fb3f8627f6
2020-07-23 13:04:05 -04:00
Rubin Xu
ac51bf8a40 [DO NOT MERGE] Rollup changes from R related to CertInstaller and KeyChain
This change includes the following commits that are related to
CertInstaller and KeyChain:

7a5c8fe4afd KeyChain: Unify manual and programmatic key installation flows
a894225c7da Added functionality to select type of certificate to be installed from the Settings app
a9131939a35 Add KeyChain.KEY_ALIAS_SELECTION_DENIED constant.
485be505f19 Fix KeyChain.KEY_ALIAS_SELECTION_DENIED

Bug: 161347472
Test: builds & manual testing
Change-Id: I560bade479b41a5b88f81ea6dfdecba689c2f4ad
2020-07-15 15:50:14 +01:00
Jing Ji
207e715943 Merge "Fix javadoc error in ApplicationExitInfo#getDefiningUid()" into rvc-dev am: 42ef19d57c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118644

Change-Id: I2a3a7609ca76fb24c5298589951b1cc3d4634c3d
2020-07-09 18:13:59 +00:00