Commit Graph

1270 Commits

Author SHA1 Message Date
TreeHugger Robot
77c1c938a5 Merge "Add keylayout for Xbox One USB controller" into qt-dev 2019-06-13 16:51:03 +00:00
Siarhei Vishniakou
07749b72c6 Add keylayout for Xbox One USB controller
We are currently missing the key layout for the Xbox One USB controller
with the following meta information:
vendor 045e, product 02ea

This layout was copied from product 02d1.

Also fix the mappings of the middle buttons to generate "select - mode -
start", similar to what has already been done for the other xbox
controllers in ag/4836521 and ag/3162575

Bug: 132451971
Bug: 133514907

Test: tested using 'gamepadtester'. CTS tests will be added later.

Change-Id: Ie18bce987b512211d3e91bd1f7334afe11d83cf8
2019-06-11 11:12:21 -07:00
Jichao Li
8878b39ccb Revert "Merge "Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for permissionController" into qt-dev am: 3206a17e5d am: c109f431a4"
This reverts commit de80ad4df7.

Reason for revert: Revert in R, as a more complete solution in PermissionController will make the permission unnecessary.

Change-Id: Ic8401cd88438d7fb177a21f33db1c2ee1e51aa6a
2019-06-07 21:42:12 +00:00
Hongyang Jiao
de80ad4df7 Merge "Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for permissionController" into qt-dev am: 3206a17e5d am: c109f431a4
am: 0d3ce1d0b6

Change-Id: Ie5fa6cebfd7c4c83ab9149e0704f42430475c811
2019-06-07 14:36:59 -07:00
Hongyang Jiao
3206a17e5d Merge "Whitelist START_ACTIVITIES_FROM_BACKGROUND permission for permissionController" into qt-dev 2019-06-07 21:08:02 +00:00
Fabian Kozynski
e1247b3478 Merge "Restore WATCH_APPOPS permission for systemui" into qt-dev am: 76de5167ab am: 7b82702b18
am: 133e74adad

Change-Id: I2d9a72eae56a4c078a7d52f4b6ca13827ffe191a
2019-06-07 12:11:37 -07: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
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
Chenbo Feng
e5d6f0fa6c 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
2019-05-22 17:59:29 -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
Lorenzo Colitti
f11bd352b4 Merge "Add privapp permissions to network modules." 2019-04-25 02:05:19 +00:00
Lorenzo Colitti
6c13b4e0f4 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
2019-04-24 23:13:29 +09: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
4337bc1f09 Fixed that emergency alert dialog not popped up
Fixed by granting START_ACTIVITIES_FROM_BACKGROUND
to the cell broadcast receiver.

Test: Manual
Bug: 130384940

Merged-In: Ie563a8f11ac991ab9568f65df6a4d14eebe47c5e
Change-Id: Ie563a8f11ac991ab9568f65df6a4d14eebe47c5e
(cherry picked from commit 974607aac8)
2019-04-22 11:57:05 -07: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