Commit Graph

1104 Commits

Author SHA1 Message Date
Jeff Sharkey
92703e3432 Merge "Shift call statistics back to the original caller." into qt-dev am: c4289bdeca am: 143cc83668
am: ae8db8697c

Change-Id: I0aae36517fa81d99632c3f53e4ed83713d8d25df
2019-05-30 15:12:45 -07: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
1c79b46470 Merge "Add privapp config for cluster." into qt-dev am: 826c01e8e6 am: 600d39646a
am: d64a36175c

Change-Id: Iebeecabd83127b2ff83557cfc5de6ad1cf06a6ec
2019-05-29 10:45:13 -07: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
Selim Gurun
ca11f7b67f Merge "Add READ_LOGS permission" into qt-dev am: 5dcbc98f21 am: 0b264c2b97
am: d83190be77

Change-Id: I69a476541022920981bbb908d712c6fea558cc99
2019-05-28 20:01:11 -07: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
Abhijeet Kaur
2ae76e468b Merge "Migrate Shell app to use the new bugreport API." 2019-05-28 16:56:32 +00:00
Abhijeet Kaur
767c8bb96a Migrate Shell app to use the new bugreport API.
Add new calls to bugreport API, all the while keeping the previous code
and logic untouched.

Added feature flag in Settings which if untouched, runs the old dumpstate workflow
by default. To test the new workflow turn on the feature flag from UI or
`adb shell setprop settings_call_bugreport_api true`.

Add permission TRIGGER_SHELL_BUGREPORT so that not all can send
broadcasts to trigger bugreports.

Create new receiver BugreportRequestedReceiver for the new broadcast intent that the shell app will
use.

Whitelist Shell app to use the bugreport API.

Bug: 123617758

Test: manually built and flash to device. Turn on the feature flag, generate bugreports and check
the onProgress and onFinish notifications.
Test: Turn off the feature flag test old workflow.

Change-Id: I1c7c258a48815a0386d7d4771301cd76f9cae3d0
2019-05-28 14:31:57 +01: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 e5d6f0fa6c)
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
Bill Lin
54f1f21be2 Add privapp-permissions for DocumentsUI
DocumentsUI use @hide private permission:
    "android.permission.CHANGE_OVERLAY_PACKAGES"

Test: atest DocumentsUITests
Test: check CHANGE_OVERLAY_PACKAGES grant to DocumentsUI.apk
Test: check CHANGE_OVERLAY_PACKAGES grant to com.android.documentsui
Test: com.android.documentsui.xml locate in system/etc/permissions
Test: DocumentsUI.apk locate in /system/priv-app/

Bug: 128689309
Bug: 131331107
Bug: 132671058

Change-Id: Ie9bffbe152da511dc08882fd44e95dd426aef980
2019-05-15 05:13:24 +08:00
Evan Wu
e7c34cd7bb Merge "Upgrade AOSP Dialer to Android Q, add necessary permissions." into qt-dev 2019-05-14 18:01:09 +00:00
TreeHugger Robot
36e3f91918 Merge "Grant STATUS_BAR permission to com.android.shell" into qt-dev 2019-05-11 00:46:36 +00:00
TreeHugger Robot
aede3d1a2b Merge "Remove DefaultContainerService and its references." into qt-dev 2019-05-10 01:52:37 +00:00
Evan Wu
d6474c24a8 Upgrade AOSP Dialer to Android Q, add necessary permissions.
1.Protect Device Identifiers: Starting in Android Q, apps must have the READ_PRIVILEGED_PHONE_STATE privileged permission in order to access the device's non-resettable identifiers
IMEI and serial is used for the *#06# dialog. OEMs needs this to run factory tests. Perhaps it is something that should be moved to telephony, but as the current state dialer is showing it.

2.Limit pre-installed app network permission:Preinstalled apps that want to access restricted network needs to declare the CONNECTIVITY_USE_RESTRICTED_NETWORKS permission.
Restricted network is used for VVM access.

Bug: 132081872,132080738
Test: Compile and load build
Change-Id: I246ab62a252d8a0335b8cc9ac5bb2089910781c9
2019-05-07 00:18:35 +00:00
Antoan Angelov
61c8bb74e6 Merge "Add START_ACTIVITIES_FROM_BACKGROUND to ManagedProvisioning." into qt-dev 2019-05-02 14:59:58 +00:00
Nicholas Sauer
a067a1ca9a Merge "privapp configs for car related apps." into qt-dev 2019-05-02 14:00:46 +00:00
Tyler Gunn
425dac52b0 Change command like set-default-dialer to be a test override.
RoleManager likes to terminate apps when roles are changed which does
not work in CTS tests.  We need to use a temp override in Telecom
for now.

Test: Run the CTS tests over, and over and over again.
Bug: 131065482
Change-Id: Id36942f2813abdfa0020ce4805c492a69bd07d0e
(cherry picked from commit 509ef150f2)
2019-04-30 20:26:47 +00:00
arangelov
72e8f8e46c Add START_ACTIVITIES_FROM_BACKGROUND to ManagedProvisioning.
Fixes: 131240642
Fixes: 130371743
Test: Manual
Change-Id: I72a4ab31bc662af4e3580a2c1d50f550e6314f74
2019-04-30 12:56:41 +01:00
Nicholas Sauer
4037c7ee73 privapp configs for car related apps.
bug: 126582117
Test: lunch gcar_emu_x86-userdebug && m && emulator
Change-Id: Id1527857f11a3627f3215afa141feb3a73ef6c53
2019-04-29 07:54:02 -07:00
Lorenzo Colitti
eb970d77ab Add privapp permissions to network modules.
When built as part of the system, the network stack and the
captive portal login app should have the BYPASS_PRIVATE_DNS
and CONNECTIVITY_USE_RESTRICTED_NETWORKS permissions.
These are necessary to validate restricted networks, bypass VPNs,
bypass private DNS for captive portal login, etc. Add these
permissions to privapp-permissions-platform.xml.

When installed as mainline modules that cannot use signature
permissions, the modules get this ability by virtue of having the
MAINLINE_NETWORK_STACK permissions.

Additionally, add the CONNECTIVITY_USE_RESTRICTED_NETWORKS
permission to the captive portal login app manifest, which did
not contain it.

Bug: 129789428
Test: builds, boots
Test: dumpsys package shows permissions
Change-Id: I632359f7eff09fed71167733ac75824a5aa57894
Merged-In: I632359f7eff09fed71167733ac75824a5aa57894
(cherry picked from commit 109dbf9c05)
2019-04-25 03:58:51 +00:00
Varun Shah
ec9f62255d Remove DefaultContainerService and its references.
Pre-req for running tests marked with (*): adb shell setprop vold.has_adoptable 1

Bug: 111838160
Test: builds and flashes
*Test: atest cts.AdoptableHostTest
*Test: atest cts.StorageHostTest
Change-Id: Iaa376a6bc984cc449239b7fe54a4a2708ad05a72
2019-04-23 11:46:34 -04:00
Jack Yu
974607aac8 Fixed that emergency alert dialog not popped up
Fixed by granting START_ACTIVITIES_FROM_BACKGROUND
to the cell broadcast receiver.

Test: Manual
Bug: 130384940

Change-Id: Ie563a8f11ac991ab9568f65df6a4d14eebe47c5e
2019-04-21 17:21:43 -07:00
Evan Laird
deb46f3c36 Grant STATUS_BAR permission to com.android.shell
Allows for testing APIs protected by this permission from CTS tests

Test:  adb shell dumpsys package com.android.shell | grep "\bSTATUS_BAR:
granted=true" # should find the permission
Bug: 130178313

Change-Id: Ida0950664b98217d9c0801c0f19436c754ee6744
2019-04-19 16:23:40 +00:00
Philip P. Moltmann
3d6c31a320 Always request coarse location with fine location
If an app can access the fine location it can obviously also access the
coarse location. There is code inside checkPermission that encapsulates
the logic.

This code fixes two issues:
- checkPermission might return for the coarse location even though the
  permission is not even mentioned in PackageInfo.requestedPermissions.
  Now the coarse location is always added to requstedPermissions when
  the fine location is in the manifest even if the app does not have
  the coarse location in the manifest
- If the app requests the fine location only we might unintentionally
  kill the requesting app.
  1. App does not have any permissions granted
  2. App request FINE_LOCATION
  3. Permission controller reads (and caches) permission state: FINE=revoked,
     COARSE=revoked
  4. User grants FINE_LOCATION -> Perm controller updates internal
     state: FINE=revoked, COARSE=revoke
  5. Perm controller applies FINE_LOCATION state to the system
  6. Perm controller looks as COARSE and checks if it is granted.
     Because it is implied, it now shows up as granted. Hence perm
     controller will try to revoke it which kills the app
  The solution is that it will be impossible to only request
  FINE_LOCATION by itself. This change will automatically add requesting
  COARSE_LOCATION, whenever FINE_LOCATION is requested

Fixes: 130358762
Test: Reproduced scenario in bug 130358762
Change-Id: I217c0b23063617f60b98c805af1d122a6ec0608e
2019-04-16 14:49:05 -07:00
Lucas Dupin
046282eabd Dark Theme QS tile
Creates Dark Theme tile and adds it to the default config,
under the fold.

Test: manually toggle tile
Fixes: 130253100
Change-Id: I2859d2eb20db1c6d9dd8e8e24979294316b905bb
2019-04-11 09:58:11 -07:00
Julia Reynolds
dc6adc6ca8 Adjust testapis/permissions for CTS tests
Test: cts
Bug: 127341023
Change-Id: Ice19dc337a06a3f20edca583ecbe5ef3148fd96d
2019-04-09 17:55:39 +00:00
TreeHugger Robot
1f616bc492 Merge "Move product only fonts out of AOSP." 2019-04-03 22:14:48 +00:00
Amin Shaikh
2b22df1e29 Move product only fonts out of AOSP.
Bug: 122975603
Test: make
Change-Id: Iee9cceebca1978631e22f9bd47032168de690c1a
2019-04-02 21:19:31 +00:00
Philip P. Moltmann
129a0b0c5e Remove dual storage permission model
- Also remove typed media permissions
- Leave typed media app-ops

Bug: 129716569
Test: Used apps, looked at permissions in the UI
Change-Id: If7714fb1a6955584157e1a60ab72b09e35287827
2019-04-01 16:30:11 -07:00
TreeHugger Robot
5595790416 Merge "Grant com.android.shell access to DynamicSystem" 2019-03-31 15:12:39 +00:00
Mark Chien
be40054bee Merge "[KA09] add keepalive offload permission to shell" 2019-03-29 04:20:39 +00:00
Hall Liu
d272ec184b Merge "Add shell permissions for CTS testing" 2019-03-29 00:04:54 +00:00
Hall Liu
9cf3e7ae68 Add shell permissions for CTS testing
Add NETWORK_SCAN to shell permissions to enable CTS testing of the
network scan changes

Bug: 126779616
Test: CTS
Change-Id: I1f75c9005620b3b0e06f066677cba6190f1d266c
2019-03-28 12:57:02 -07:00
Po-Chien Hsueh
e56f2f583d Grant com.android.shell access to DynamicSystem
Add permission INSTALL_DYNAMIC_SYSTEM to Shell's AndroidManifest.xml
and privapp-permissions-platform.xml.

Bug: 124637092
Test: adb shell am start-activity
Change-Id: Id7727a195f61c2fbffa0b2f52f3098784feeee52
2019-03-28 17:25:36 +08:00
Anton Hansson
aecff3d7c4 Merge "Move EmergencyInfo perm whitelist to /product" am: ae957afaa6 am: 300026a5e9
am: e6039fbffe

Change-Id: Id4df504d0c5a4622605b4803e8b3f2cb49003156
2019-03-26 06:22:22 -07:00
Anton Hansson
38cb100224 Move EmergencyInfo perm whitelist to /product
The app is moving to /product, to separate out its permission
grants to a separate file and move that file to /product as well.

Bug: 122353713
Test: boot aosp_arm64 emulator
Change-Id: Ic165aae180a002c3566e3c1b1495a1d50dfd0e4a
2019-03-25 20:13:54 +00:00
Anton Hansson
aaf15d2222 Grant PermissionController SUBSTITUTE_NOTIFICATION_APP_NAME
This app will pretend to be the Settings app when sending
location access notifications.

Bug: 128608303
Test: boot
Change-Id: I447510bbe323f3de40828a5cb4a37abe1c44c990
2019-03-25 16:13:26 +00:00
TreeHugger Robot
0369790fac Merge "Add Shell permission for CTS test." 2019-03-22 22:31:32 +00:00