Commit Graph

1131 Commits

Author SHA1 Message Date
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
Rashed Abdel-Tawab
3046630c6a Reword outdated fonts comment
ADDITIONAL_FONTS_FILE is dead as of 3328d1ce55.
Explain how to install new fonts on /product instead.

Change-Id: I8a519d2a7a50847e7682473c43e58c4bfe1add5b
2019-10-11 14:18:30 -07: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 b59c74f302.

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
Jungshik Shin
2aff67d492 Use NotoSansMyanmar (pure Unicode) fonts
Instead NotoSansMyanmar*-ZawDecode (Unicode-Zawgyi hybrid) fonts,
go back to NotoSansMyanmar and NotoSansMyanmarUI (pure Unicode) fonts.

Bug: 141019225
Change-Id: Ib2494b9b5cb148f598e69271c5676e7104f66ae3
2019-09-18 01:01:09 -07:00
Jared Henderson
7f1e92a654 Merge "Update Xbox BT controller mapping to support upcoming controller firmware update"
am: 87700db4ef

Change-Id: Ia43fd4b1458c8979da8d803083696e8dff26ae73
2019-08-23 03:15:53 -07:00
Jared Henderson
f829b5df5e Update Xbox BT controller mapping to support upcoming controller firmware update
The Xbox controller (product id 0x2fd) is going to have a new firmware update this fall that sends a different keycode (316/BUTTON_MODE) for the Xbox button.  The goal is to enable the Xbox button to make it to apps on all Android versions -- with our without a controller-specific key mapping file.

Unfortunately, the new Vendor_045e_Product_02fd.kl key mapping file that was added to Android Q maps the pre-firmware-update Xbox key code (172) to BUTTON_MODE, yet it makes no mention of key 316.  This results in apps getting a raw 316 scan code instead of a BUTTON_MODE KeyEvent when using a controller with the latest firmware on Android Q.

The fix is to add an additional key mapping for 316 that *also* maps to BUTTON_MODE.  With both mappings in place, both pre and post firmware-updated controllers will get the correct behavior for the Xbox button on Android Q.

Test: AFAIK, no CTS tests exist for Xbox controller key mappings; we'll need to add some at a later date.  I was unable to test this change because I'm unable to write to the system directory on any of my devices, but I know that mapping 316 to BUTTON_MODE will fix the issue.

Change-Id: I8600ea79a0aa8557267d6ca712e5d56680e7a98b
Signed-off-by: Jared Henderson <jaredh.microsoft@gmail.com>

Bug: 139372370
2019-08-22 21:18:57 +00:00
Siarhei Vishniakou
4fef274c01 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
Bug: 139512030
Test: tested using custom app. CTS tests will be added later.

Change-Id: Ie18bce987b512211d3e91bd1f7334afe11d83cf8
Merged-In: Ie18bce987b512211d3e91bd1f7334afe11d83cf8
2019-08-19 13:21:15 -05:00
Siarhei Vishniakou
9d81ccc929 Keylayout for xbox controllers
Add layout for Xbox elite controller

Test: tested with a custom app
Bug: 132451971
Bug: 139512030
Change-Id: I1c600bc2c41db9d79d7a4e184ef41abe2b5f860e
Merged-In: I1c600bc2c41db9d79d7a4e184ef41abe2b5f860e
2019-08-19 13:18:05 -05:00
Siarhei Vishniakou
75cf61f687 Keylayout for xbox pdp controller
Add layout for Xbox pdp controller

Test: tested with a custom app
Bug: 132451971
Change-Id: I35e0998e2643eae031141186637e5eb349334bcd
2019-06-24 14:41:51 -07:00
TreeHugger Robot
287b20ae0e Merge "Keylayout for xbox controllers" into qt-dev 2019-06-24 19:40:19 +00:00
Siarhei Vishniakou
57a20b70c8 Keylayout for xbox controllers
Add layout for Xbox elite controller

Test: tested with a custom app
Bug: 132451971
Change-Id: I1c600bc2c41db9d79d7a4e184ef41abe2b5f860e
2019-06-24 11:30:01 -07: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 0999f93e4a.

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
TreeHugger Robot
6eca92dd43 Merge "Add key layout for Nintendo Switch controller" into qt-dev 2019-06-15 00:00:06 +00:00
Siarhei Vishniakou
94db68e031 Add key layout for Nintendo Switch controller
The controller for Nintendo Switch is currently missing a key layout,
and the resulting codes are incorrect. Provide the appropriate map here.

Also, update some button mappings for the Xbox 360 controller.

Bug: 135136477
Test: Tested using "gamepad tester". CTS test will be added in a future
release. Tested using custom app.

Change-Id: I1ffcabdcc11aa83316c483ea49cb10fc85f6264f
2019-06-14 11:45:21 -07:00
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
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 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