Commit Graph

18323 Commits

Author SHA1 Message Date
Shuo Qian
b570ddfa05 Merge "Introduce new App Ops permission for 3rd-party InCallService" am: 9666e05985 am: 84838b0a56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1484359

Change-Id: Ibc6de7ee13fde894e793cc1a7ba1fa88e034cb75
2020-11-10 04:24:03 +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
5a448e27ed Merge "Add maxTargetSdk restriction to unused APIs." am: f8abe13db4 am: eb80316624
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1468245

Change-Id: I60222cb1879651cf283e385519b5c4d156ab68a1
2020-11-09 15:24:20 +00:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
vichang
aa95c6d0b9 Merge "Remove android.icu.impl.ICUBinary.dataPath for apps targeting S+" am: ffcc7427a8 am: 6cb4bb76d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1481307

Change-Id: If52898da0b66bf70ed7533bc991251a1f927f19c
2020-11-06 11:57:38 +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
b892146fb4 Merge "Expose AppOpsManager#OPSTR_ACTIVATE_PLATFORM_VPN as system API" am: 01bec3bb2b am: b8eb5b0ee1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1484021

Change-Id: I280d5f807ee40838ab8abe865a3d272e58ce8cbb
2020-11-05 09:14:16 +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
fcebc45fb0 DO NOT MERGE: Introduce DPMS shim for active DO/PO check am: bdd52cb48b am: 9e6305e3b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1486196

Change-Id: I467120ce7e419a75749efac109609bb30cc35eff
2020-11-04 12:46:45 +00: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
6d396415d3 Merge "Try to add AppOps Keys into Proto to unblock my project" am: 324ef4ff23 am: 053e5b3d7f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1477127

Change-Id: I165d4b7e9a2396fd677d2beb435a2da5119c8614
2020-11-02 22:55:40 +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
6acfa90ddd Merge "Backup platform: Update OWNERS." am: 0be136593e am: 04af92eeba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1479959

Change-Id: I785a8988c233d9963460ace4c51d0111e70d4f3a
2020-10-31 01:52:51 +00:00
Tobias Thierer
0be136593e Merge "Backup platform: Update OWNERS." 2020-10-31 01:08:22 +00:00
Benedict Wong
e0eb89cf66 Merge "Add shell VcnManagementService" am: fa2c588ab5 am: 1ee8f22e8a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456942

Change-Id: I41d115e53d3b83c89695d860bca69d4f752a1e44
2020-10-29 22:37:57 +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
Treehugger Robot
0c6faf40fd Merge changes from topic "BackportUiAutomatorRetry" am: ff062f6e73 am: ed29b2da3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1471402

Change-Id: I57d108c24027a44fcadee9ee54c69df9696916c8
2020-10-27 18:47:13 +00:00
JW Wang
125259951c Allow #disconnect to be called safely on connection timeout (2/n) am: 0c56d28a19 am: 68569ea618
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470701

Change-Id: I229063cf0f85a110a15c9aa4dd6ca013f1c06a96
2020-10-27 18:47:10 +00:00
JW Wang
167b921a80 Add #connectWithTimeout (1/n) am: 67c91c405c am: 4fba545a90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470700

Change-Id: Ib1d6e7967c63e1e3af632d1ca1760cba705f4a09
2020-10-27 18:47:05 +00: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
14897c256d Merge "Remove @TestApi from @SystemApi symbols" am: d2d4637685 am: cbe282347e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466264

Change-Id: I86daec690141893837ec58ab1d75aecc88557ff9
2020-10-20 19:45:04 +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
Charles Chen
1bb9fbbac3 [RESTRICT AUTOMERGE] Revert "[RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays"" am: c947b10f99 am: 1e0cf0c900
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12816011

Change-Id: I34c9cd32c258445c8d7f1d5815cc1f55325a8eef
2020-10-16 18:56:25 +00:00
Charles Chen
1e0cf0c900 [RESTRICT AUTOMERGE] Revert "[RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays"" am: c947b10f99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12816011

Change-Id: I174d70795eae849ca346fb79528e418a5003f76a
2020-10-16 18:39:01 +00:00
Treehugger Robot
9ab252e8ed Merge "Do not send WTF when ETHERNET_SERVICE" am: f03005d5e0 am: e7e458954c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458804

Change-Id: I7e06f19d39feb659a7345160db443059e4a69912
2020-10-14 01:24:26 +00: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
Charles Chen
c947b10f99 [RESTRICT AUTOMERGE] Revert "[RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays""
This reverts commit ae03031efe.

Reason for revert: Merge the reverted patch by accident.

Bug: 162627132
Change-Id: Ic2f072730050cb47926cec6ed24af7ef9e5e7055
2020-10-13 01:14:25 +00:00
Linus Tufvesson
2e33ba4687 Update javadoc for setLaunchDisplayId am: 334190f26e am: c37e102250
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12794770

Change-Id: I3d140d6f77e5600179f20fd84031e0a2c389b3ed
2020-10-09 21:42:02 +00:00
Treehugger Robot
a95dc0e13f Merge "Fix non-inclusive terms in framework device policy logic" am: 64add27a7c am: 3d3e16e2a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1454737

Change-Id: I4a64cac98249a47797d2b3c4f937559f4f681261
2020-10-09 17:19:43 +00:00
Linus Tufvesson
334190f26e Update javadoc for setLaunchDisplayId
.. to match behavior post I1f9662c2bd14b34e00fbc8ebb926538f0329c37a

Bug: 167593637
Test: Javadoc change only.
Change-Id: I4cb9fe4a5ae74b1474f9da39b6aeb3a374f8cf12
2020-10-09 09:54:40 +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
Pinyao Ting
c4f2ea4b87 Fix the issue provider can be wrong when requesting slice permission am: e3eba1322b am: df8bc34ba6 am: 0726759259
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12687714

Change-Id: I315091bf76fb38fad002e68304b124524105f657
2020-10-05 23:46:38 +00:00
Pinyao Ting
df8bc34ba6 Fix the issue provider can be wrong when requesting slice permission am: e3eba1322b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12687714

Change-Id: Ie3fefe8638c85c5b887b62612cfd5c5a338b827b
2020-10-05 23:01:26 +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
5c393cb830 Merge "[RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays"" into rvc-dev 2020-09-29 05:59:59 +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
Pinyao Ting
e3eba1322b Fix the issue provider can be wrong when requesting slice permission
SlicePermissionActivity reads provider_pkg from intent, which can be
modified at will. As a result user might see incorrect package name in
the dialog granting slice permission.

Bug: 159145361
Test: manual
Merged-In: I8b66c02786df4096dad74b7e76255d5ddd1d609d
Change-Id: I8b66c02786df4096dad74b7e76255d5ddd1d609d
(cherry picked from commit 0ad32a2d70)
2020-09-24 19:06:07 +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
741c0a78cc Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I7da537200efe31e803234bd1a0236843064186c8
2020-09-14 23:10:42 +00:00