448 Commits

Author SHA1 Message Date
Treehugger Robot
0fd118f5bb Merge "Add Lorenzo to OWNERS for privileged permissions whitelist" 2020-01-10 22:46:10 +00:00
Jeff Vander Stoep
641dc190b9 Add Lorenzo to OWNERS for privileged permissions whitelist
Test: With great power comes great responsibility.
Change-Id: I885baf50b2d901c4f052f2197c0d58386aae80b2
2020-01-10 20:34:26 +01:00
markchien
36aea56160 Give tethering TETHER_PRIVILEGED permission
This fix the crash when perform "Reset Wi-Fi,mobile & Bluetooth"

Bug: 146900199
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest
      -manual perform "Reset Wi-Fi,mobile & Bluetooth"

Change-Id: I036409358ed15a797bdb751bb66513425350d066
2020-01-10 14:49:24 +08:00
Neil Fuller
62ace8c46a Merge "Add new permissions" 2020-01-06 19:38:25 +00:00
Bonian Chen
62a1827a74 Merge "Add READ_PRIVILEGED_PHONE_STATE to the settings whitelist" 2019-12-23 05:53:14 +00:00
markchien
6d06f6d51a [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
Treehugger Robot
7b2a29361c Merge "Change Tethering package name" 2019-12-19 12:35:49 +00:00
Neil Fuller
09e8b7d841 Add new permissions
This adds new permissions required when setting the time /zone in
response to telephony signals and when setting the time / zone manually
along the lines of "principle of least privilege".

The intent is to later restrict the number of distinct processes that
can manipulate the device system clock / time zone property directly so
that all time changes go through the time / time zone detector services,
which can enforce policy, log the reasons for changes, and so on.

Bug: 140712361
Test: atest com.android.server.timedetector
Change-Id: Iabd3a5f449ad2ef2b6581475ef2535a4a8a88ef9
2019-12-19 11:11:48 +00:00
markchien
5a9d9f6935 Change Tethering package name
".apex" is easy to confuse.
Rename as below:
apex: com.android.tethering.apex -> com.android.tethering
apk: com.android.tethering -> com.android.networkstack.tethering

Bug: 146471733
Test: build

Change-Id: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
Merged-In: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
2019-12-19 13:06:50 +08:00
Mark Chien
30642b395c Merge "Add TETHER_PRIVILEGED permission to shell for CTS test." 2019-12-19 04:59:02 +00:00
Mark Chien
b04cf17d71 Merge "[Tether11] Grant privileged permissions for tethering" 2019-12-18 00:11:43 +00:00
markchien
840abdc14c [Tether11] Grant privileged permissions for tethering
Since tethering is moved from systemServer to networkStack
process, it would lose privileged capability. Grant privileged
permissions for tethering individually. Grant MANAGE_USB to control
usb rndis function. Grant MODIFY_PHONE_STATE to know whether DUN
is required. Grant READ_NETWORK_USAGE_HISTORY to update tethering
usage. Grant UPDATE_APP_OPS_STATS to check WRITE_SETTINGS permission.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Id6e71b58e027d6ba90551084367ef881652c2555
2019-12-18 01:06:36 +08:00
markchien
9fe658adc3 Add TETHER_PRIVILEGED permission to shell for CTS test.
Grant TETHER_PRIVILEGED permissions to the shell identity
for use within CTS tests.

Bug: 145490751
Test: atest CtsTetheringTest
Change-Id: Ifad265cdc5e0b1b1b2fa8f4f79eeb7dd18493624
Merged-In: Ifad265cdc5e0b1b1b2fa8f4f79eeb7dd18493624
2019-12-17 13:30:26 +00:00
paulhu
741e513050 Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission
Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission to phone
package in privapp permission list.

Bug: 146222771
Test: build, flash, boot to home
Change-Id: I1c88b892b1d2f50856b139a5cad5dc8b07a006be
2019-12-16 09:02:36 +00:00
Yoshiaki Naka
79351c3fab Add READ_PRIVILEGED_PHONE_STATE to the settings whitelist
Settings application needs the previleged permission to retrieve UICC
card information by using Telephony Manager API.

Bug: 141256483
Test: Manual and SimStatusDialogControllerTest

Change-Id: I33d3bb1947d828e283ee62b7cd0936b8baf73acb
2019-12-12 15:09:46 +00:00
Tyler Gunn
1d4fcf1703 Merge "Car mode InCallService changes." 2019-12-04 16:50:47 +00:00
Tyler Gunn
f701f7a765 Car mode InCallService changes.
1. Grant ENTER_CAR_MODE and CONTROL_INCALL_EXPERIENCE permissions to the
shell identity for use within CTS tests.
2. Remove un-needed Telecom shell command.

Test: unit tests, telecom CTS tests, manual testing
Bug: 144345414
Change-Id: I54a2e723d6ef9552117e6cadf4ab7c449dd5e3cb
2019-11-26 13:43:53 -08:00
Tyler Gunn
5474568b87 Merge "Add prioritized enableCarMode API in UiModeManager"
am: 8e7a1f8528

Change-Id: I81d8b4a457c567e19c3c8e499cc1f08e1c8af3b3
2019-11-20 00:17:34 -08:00
Tyler Gunn
f05f2c2cc2 Add prioritized enableCarMode API in UiModeManager
Per design doc (go/android-car-mode-design), added new system API to
enable car mode and specify a priority for the calling app.
Also modified UiModeManager to pass the package name of the caller to
UiModeManagerService.

Bug: 136109592
Test: Added new unit tests and CTS tests.
Test: Added Telecom test app functionality to verify.
Change-Id: I2848039c9ea18ba93e7694e04c4e5dc70759daa3
Merged-In: I2848039c9ea18ba93e7694e04c4e5dc70759daa3
2019-11-19 23:15:52 +00:00
Jordan Liu
608d940823 Merge "Move cell broadcast service module directory"
am: efa3cc419c

Change-Id: Ib742b26e57c2bbd1e3ea7bc766a35a7251b44221
2019-11-05 16:59:27 -08:00
Jordan Liu
776242c0c6 Move cell broadcast service module directory
Update the permissions and resource to reflect this move.

Bug: 135956699
Test: manual
Change-Id: I8c798f48e3a342cc2ce29d1f7f199ae1337ff2d0
Merged-In: I8c798f48e3a342cc2ce29d1f7f199ae1337ff2d0
2019-11-05 11:28:53 -08:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Jordan Liu
7aea30267c [DO NOT MERGE] Add CellBroadcastService and related permissions
CellBroadcastService is bound to by the platform to handle cell
broadcasts.

Bug: 135956699
Test: manual
Change-Id: I865c09d6d246779b706c06371df685d415618699
2019-10-18 14:20:50 -07:00
Tyler Gunn
8c4ced5b43 Merge "Explicitly grant START_ACTIVITIES_FROM_BACKGROUND to com.android.phone." 2019-10-14 16:15:28 +00:00
Alan Stokes
c3e775bb11 Explicitly grant START_ACTIVITIES_FROM_BACKGROUND to com.android.phone.
It's needed because when we broadcast ACTION_SIM_SLOT_STATUS_CHANGED
we want to allow the receiving app to start an activity from the
background.

The app already has it implicitly, since it has the same shared UID as
com.android.stk which has the permission for unrelated reasons. Making
it explicit makes it less likely it will lose the permission
accidentally re-introducing a subtly bug.

Bug: 132691768
Test: Builds
Change-Id: I85669423e628b4534a3f28efd17947ca2481454e
Merged-In: I85669423e628b4534a3f28efd17947ca2481454e
2019-10-10 12:58:35 -07:00
Jordan Liu
656502be63 [DO NOT MERGE] Revert "Add CellBroadcastService and related permissions"
This reverts commit b59c74f3026ce1b7f978cb15275ee01dd001cf3b.

Reason for revert: depends on ag/9477322 being CP'd, or else causes breakages downstream (b/142399383)

Change-Id: I25b1695757d5fec8c00f05d033c33501f4fc5389
2019-10-09 13:34:26 -07:00
Jordan Liu
b59c74f302 Add CellBroadcastService and related permissions
CellBroadcastService is bound to by the platform to handle cell
broadcasts.

Bug: 135956699
Test: manual
Change-Id: Ib1b20da03d271fc0b2736774b2ca6c6514944093
Merged-In: Ib1b20da03d271fc0b2736774b2ca6c6514944093
2019-10-08 11:20:46 -07:00
Philip P. Moltmann
ac7b10c135 [DO NOT MERGE] Split access-media-storage from read-external-storage
And also pre-grant it to all apps that currently get any storage
permission pre-granted

Test: atest SplitPermissionTest
      m -j gts && gts-tradefed run commandAndExit gts-dev -m GtsPermissionTestCases --test=com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testDefaultGrantsWithRemoteExceptions
      Manual testing:
         All combinations of
           - App targetSdk = 28 and 29 (and 22 for extra credit)
           - App having the <uses-permission> tag for
             ACCESS_MEDIA_LOCATION or not
           - Upgrade from P->Q-QPR and from vanilla Q->Q-QPR
         Further upgrade of targetSdk from 28->29 while on Q-QPR
         ==> All permission behavior should make sense. Sometimes there
             are weird, but expected behaviors. Hence we need to
             collect the results and then look at the unexpected ones.
             See SplitPermissionTest for some tests I added for the
             location-background permission which was split from
             the fine/coarse-location permissions
Fixes: 141048840,140961754
Change-Id: Ib9f50d25c002036f13cf2d42fc4d1b214f20920c
2019-09-20 16:45:58 +00:00
TreeHugger Robot
269907a310 Merge "Revert "Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for"" into qt-dev 2019-06-20 23:49:39 +00:00
Wenjie Zhou
46a4491253 Revert "Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for"
This reverts commit 0999f93e4a00a7991d13cfca185e99b9fbecbc38.

Reason for revert: There is a better choice (ag/8051966) than adding the permission to resolve b/130827484

Bug: 130827484
Change-Id: I1b8fd74a173d4b0ef981e51f7e0a9c5f84d5f416
2019-06-20 23:48:59 +00:00
Michal Karpinski
efa05d9179 Add START_ACTIVITIES_FROM_BACKGROUND permission for
com.android.providers.downloads

Required because DownloadManager needs to whitelist
a broadcast for bg activity starts.

Bug: 135515407
Test: builds, boots (it wouldn't without this)
Change-Id: Id6c22d1397417bbc10e2829e563f29cbccccd8bf
2019-06-18 15:39:50 +01:00
Hongyang Jiao
3206a17e5d Merge "Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for permissionController" into qt-dev 2019-06-07 21:08:02 +00:00
jiaohy
0999f93e4a Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for
permissionController

Bug:134429397
Test: Locally flash on sailfish
Change-Id: I650c08a7f0a823085e0eaa0e1cae8b5b44cabd8f
2019-06-07 11:46:00 -07:00
Fabian Kozynski
ade26fa73a Restore WATCH_APPOPS permission for systemui
This permission is necessary for Q as it allows systemui to tag
notifications of apps that are using certain AppOps. This is a P
feature that has regressed when the permission was made privileged.

This is used by AppOpsController in order to obtain updates on any apps
(onOpActiveChanged, onOpNoted). There is no other way to obtain the
updates from apps that are not systemui, as specified in AppOpsManager.

Talked to moltmann@ to verify that this is the correct API to use for this feature.
I'll remove this permission once SystemUI does not need it anymore.
In particular, if AppOpsController does not require it for being notified of AppOps changes.

Fixes: 134747188
Test: build
Test: dumpsys SystemUI. Check that AppOpsController is getting updates.
Change-Id: I08cca4361a7fbfa8b2eb419f1459b0b8bce93a5f
2019-06-07 17:38:01 +00:00
Jeff Sharkey
c4289bdeca Merge "Shift call statistics back to the original caller." into qt-dev 2019-05-30 21:29:21 +00:00
Jeff Sharkey
c0bb5985af Shift call statistics back to the original caller.
Most of the time MediaProvider is making Binder calls on behalf of
an external caller, so use PropagateWorkSourceTransactListener to
ensure that we record the original source.

Bug: 125725916
Test: atest --test-mapping packages/apps/MediaProvider
Change-Id: I591dfb2903a54239639452954ea2d780e79b280c
2019-05-30 12:18:34 -06:00
Nicholas Sauer
5f6a7901cd Add privapp config for cluster.
bug: 133809765
Test: lunch gcar && m && emulator
lunch aosp && m && emulator

Change-Id: I585bedf65113f2417da8af30eb89788bc120926a
2019-05-29 05:21:49 +00:00
TreeHugger Robot
5dcbc98f21 Merge "Add READ_LOGS permission" into qt-dev 2019-05-29 02:38:25 +00:00
Selim Gurun
5db6cdf0c5 Add READ_LOGS permission
car service and kitchensink needs READ_LOGS permission

Bug: 133607244
Test: Manual
Change-Id: Ic9382716bf901cfbdd7e43b8c3c1ca1974693d87
2019-05-28 15:02:47 -07:00
Ivan Chiang
1100dd8db9 Merge "Add privapp-permissions for DocumentsUI" into qt-dev 2019-05-27 02:33:22 +00:00
TreeHugger Robot
ebdb9db33b Merge "Fix the internet permission for native services" into qt-dev 2019-05-24 01:18:19 +00:00
Chenbo Feng
4c755833af Fix the internet permission for native services
The native services should specify their permissions in platform.xml if
they need internet permission, otherwise the eBPF program will block the
socket creation request. Fixing the known services that are in group
AID_INET but didn't specify their permission in the xml file.

Bug: 132217906
Test: CtsJdwpTestCases dumpsys netd trafficcontroller
Change-Id: I84cde7d3757953bc0bf761727d64a715bcdd68bb
Merged-In: I84cde7d3757953bc0bf761727d64a715bcdd68bb
(cherry picked from commit e5d6f0fa6c3fd77572f5b29f416acbf304abf9da)
2019-05-23 11:54:49 -07:00
TreeHugger Robot
73414d51d0 Merge "Allow wallpaper to access hidden methods" into qt-dev 2019-05-21 22:39:39 +00:00
Hyunyoung Song
41d8870bd8 Allow wallpaper to access hidden methods
Bug:133160356
Bug:129482731
Test: builds
Change-Id: Id4a95be17d54bc62c105041ef7e756cfa56081f4
2019-05-21 12:30:46 -07:00
Varun Shah
a248265d93 Add INTERACT_ACROSS_PROFILES permission to shell for CTS test.
Bug: 127804311
Test: atest CrossProfileAppsHostSideTest#testStartActivity
Change-Id: I1deb66409fae1ec654555adb8d4a61d670689d2a
2019-05-20 20:56:59 -07:00
Zimuzo Ezeozue
ab9c69fda4 Merge "Add ExplicitHealthCheckServiceImplTest" into qt-dev 2019-05-20 20:16:22 +00:00
TreeHugger Robot
a9607b296a Merge "Android Q is API 29" into qt-dev 2019-05-20 18:32:59 +00:00
Zimuzo
0d70a6ac49 Add ExplicitHealthCheckServiceImplTest
Test: atest
android.ext.services.watchdog.ExplicitHealthCheckServiceImplTest
Bug: 132640467

Change-Id: I2d1820a38adce238a157e925512898c184dadec0
2019-05-19 19:39:29 +01:00
Jeff Sharkey
b66f4f4bad Aggresive performance optimizations.
Now that we have LocalCallingIdentity, we can start caching it in
very narrow cases.  We must be careful to not cache too long, since
any changes to granted permissions for the UID mean we need to
re-evaluate any cached answers.

The best middle-ground for this in the Q release is to use an active
camera session as a proxy for when we should create a cache object
and then later invalidate it.  (It's very unlikely that a user
changes permissions while actively using the camera, and this is
a strong signal that the caller is sensitive to performance.)

Many other sprinkled optimizations to avoid extra binder calls into
the OS, such as aggressively caching VolumeInfo related details.

Track IDs that are owned by each LocalCallingIdentity, to speed up
all future security checks.

Dispatch all change notifications asynchronously, and delay them by
several seconds while the camera is being actively used, to give
more important foreground work a fighting chance.  Invalidate
thumbnails asynchronously.

Optimizations to ModernMediaScanner where it's safe to skip the
"reconcile" and "clean" steps when we're focused on a single file
that we successfully scanned.

Local tests show this CL improves performance of a test app that
takes 100 rapid shots by 45%.  (All the collective optimizations
done so far this week add up to a 70% improvement.)

Bug: 130758409
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial manifest change
Change-Id: I38cc826af47d41219ef44eae6fbd293caa0c01d5
2019-05-18 05:48:21 +00:00
Philip P. Moltmann
41b312003f Android Q is API 29
Hence mark the new split permissions as 29 instead of 10000.

Fixes: 132898943
Test: atest SplitPermissionTest
Change-Id: I0aa3e9b4d60cea1a59b891f2fb2d94a734efebf2
2019-05-16 14:03:46 -07:00