Commit Graph

1270 Commits

Author SHA1 Message Date
Philip P. Moltmann
89b044ffb8 Split access-media-storage from read-external-storage
And also pre-grant it to all apps that currently get any storage
permission pre-granted

cherry-pick for qt-qpr1-dev Ib9f50d25c002036f13cf2d42fc4d1b214f20920c

Test: - straight cherry-pick
      - atest SplitPermissionTest
Bug: 141048840,140961754
Change-Id: Ia2219639a2104965a382ffef647e5ebaa0f9d540
2019-09-20 10:31:19 -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
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
Philip P. Moltmann
889ecd2739 Run RuntimePermissionProperty tests when runtime permissions change
So that runtime permisions are less likely to be incorrectly declared.

Bug: 141033226
Test: atest --test-mapping frameworks/base/data/etc/platform.xml:presubmit
      atest --test-mapping frameworks/base/core/res/AndroidManifest.xml:presubmit
      atest --test-mapping frameworks/base/core/java/android/app/AppOpsManager.java:presubmit
Change-Id: I4cf58d2041b5fda6360ef148edb76c048371cca6
2019-09-13 21:21:25 -07:00
Elias Wald
c91d78a680 Merge "Add keylayout for original xbox controller" into qt-dev am: aaaee164de am: 0a7a87b548 am: ec53916597
am: 18e089ebac

Change-Id: I4f3522a393397da4093620a685d8424b15579c81
2019-09-11 22:58:11 -07:00
Siarhei Vishniakou
0c1c820d9d Add keylayout for original xbox controller
We are still missing a key layout for the original xbox controller with
product id 02dd. Add the missing layout here.

Bug: 140808513
Test: manual test by plugging in the actual joystick and using the
custom tester app

Change-Id: Ib84e3ac04ff58f890ce7743423cc9b869af347db
2019-09-11 22:07:41 +01:00
Jared Henderson
b08c0be8a0 Update Xbox BT controller mapping for new FW
The Xbox controller (product id 0x02fd) 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.

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

Bug: 139512030
Bug: 140808513

Merged-In: I8600ea79a0aa8557267d6ca712e5d56680e7a98b
Change-Id: I8600ea79a0aa8557267d6ca712e5d56680e7a98b
2019-09-11 15:13:07 +01:00
Chen Xu
c1f208cd69 Merge "remove symbols from greylist" 2019-09-04 23:31:25 +00:00
Heemin Seog
80f52056d1 Merge "Remove unused permission from privapp" 2019-09-04 19:32:23 +00:00
Chen Xu
27c4e658b3 remove symbols from greylist
telephony-common is not intended to used by any apps and
being in boot class is not updatability friendly.
We are removing telephony-common from bootclass and apply
<uses-library> in manifest instead.
for apps targeting < R will auto load telephony-common lib
for app compatibility. For apos >=R, only allow usage for
phone UID.

Bug: 135955937
Test: Build
Change-Id: Ia318661546df6d8516328886e5cc0c54d5cfafe6
2019-09-04 11:42:14 -07:00
Heemin Seog
f7f61995e8 Merge "Test Launcher privapp" 2019-09-04 14:44:42 +00:00
Yin-Chia Yeh
51d8516b7a Camera: add camera audio restriction API
Test: new CTS tests
Bug: 135676184
Change-Id: I4f28d28972b9ced0fee0afe996ef1c4f68d0d2c9
2019-08-30 14:44:46 -07:00
Heemin Seog
b23ad1a988 Test Launcher privapp
Bug: 139195033
Test: manual
Change-Id: I4c56f6c9580fdb2a96bc4024f6ce2552aa9fad92
2019-08-30 14:01:11 -07:00
Heemin Seog
1549e9c2e9 Remove unused permission from privapp
No need to include the removed permission from the privapp configs.

Bug: 139410948
Test: manual/build
Change-Id: I01db28dc7126c021e5a50bc64f37976b07d79334
2019-08-26 16:55:27 -07:00
Jared Henderson
a1ef1ea27f Merge "Update Xbox BT controller mapping to support upcoming controller firmware update" am: 87700db4ef am: 7f1e92a654 am: b2cfc86e8b am: 37f8b552d3
am: 71b94722cb

Change-Id: If3d23854ba967939d61d095c0358b678ddcb68ac
2019-08-26 12:05:53 -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
Jayant Chowdhary
393ad6e0ad Add SYSTEM_CAMERA capability to camera2 and define @SystemApi SYSTEM_CAMERA permissions.
In order to access system-only cameras client processes need
SYSTEM_CAMERA permissions in addition to CAMERA permissions. A
permission was preferred over other mechanisms such as having private
connections would need to hard-code the package name(s) of clients using
system only camera devices. A system | signature permission on the other hand,
would make this more flexible and would be better for security.

Bug: 133508924

Test: cts CameraManagerTest, CameraDeviceTest
Test: Give cts test SYSTEM_CAMERA permissions by using
      adoptShellPermissions and run some camera tests.

Change-Id: Ibcd6ccdb231dcca949ed4fb14712d033a5801d36
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-08-20 15:24:28 -07: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
Julia Reynolds
e53e4eca99 Merge "Fix crash in ExtServices" 2019-08-15 14:23:06 +00:00
Roshan Pius
07820f85ac Merge changes from topic "wifi_mainline_apk_separation"
* changes:
  Sysui/WifiTracker: Changes to support late starting wifi service
  WifiManager: Retrieve IWifiManager service lazily
  WifiStackClient: Register wifi API services from system_server
  Mainline wifi stack module
  NetworkStackClient: Refactor network stack process interaction
2019-08-14 19:33:10 +00:00
Julia Reynolds
d7f4333826 Fix crash in ExtServices
Bug: 138848702
Test: boot test on aosp targets
Change-Id: I50ecbf9e64020821f50da0ad4c798ff292cbca65
2019-08-14 12:56:49 -04:00
Jeff Sharkey
d14e9c0518 Migrate MTP service into separate project.
As part of getting MediaProvider to compile against supported APIs,
we're moving MTP related logic into its own repository.

Bug: 135340257
Test: manual
Change-Id: Ie274b1c0da435c024385eba1e4301639991a785b
2019-08-12 13:45:05 -06:00
Roshan Pius
6f5338dd8f Mainline wifi stack module
a) Moved wifi service to a separate APK
b) Use the IWifiStackConnector to load the wifi stack from
SystemServer (similar to network stack).
c) Create a new WifiStackClient interface for system server to interact
with the wifi stack (under new services/wifi folder). Note: This not planned
to be updated via wifi-sdk Apex.
d) Add priv-app permissions for the new wifi stack APK.

Bug: 113174748
Test: Device boots up & connects to wifi networks, hotspot toggle, etc.
Test: Will send for regression tests
Change-Id: I54b3a11ed30668bad5a387370484b2bb0eabca5f
Merged-In: I54b3a11ed30668bad5a387370484b2bb0eabca5f
2019-08-12 07:22:56 -07:00
Nate Myren
1a8d1110c0 Merge "Permission flag updates now notify listeners" 2019-07-10 16:03:07 +00:00
Artur Satayev
7e8dbfd719 Add warning about play updatable apps.
Test: comment change

Change-Id: I2e3adf16e43a797732aa15f7f042e885d1238d04
2019-07-05 12:29:52 +01:00
Nate Myren
d3a6385686 Permission flag updates now notify listeners
Added a version of the onPermissionUpdated and
onInstallPermissionUpdated methods which will notify
OnPermissionChangedListeners, and added this to the
PermissionManagerService "updatePermissionFlags" and
"updatePermissionFlagsForAllApps" methods. Also adds
OnPermissionsChangedListener to @TestApi

Fixes: 135937566
Test: atest PermissionUpdateListenerTest
Change-Id: I906598c366234c3daaa202261678bca04837cb13
2019-06-28 16:56:26 +00:00
Andreea Iovan
97af579aca Merge "Add default alarm tone." 2019-06-27 23:48:17 +00:00
Andreea
1ab0502d37 Add default alarm tone.
Alarms were removed previously to reduce the space required for the
system image. But we still need a default one for the RingtoneManager
tests.

Bug: 110449143
Test: cts -m CtsMediaTestCases -t android.media.cts.RingtoneManagerTest#testSetType
Change-Id: Iee91156059f3440fbb6a0b28765dd3bb0b997cf5
(cherry picked from commit ecf1bfc3e4109d6f43b3fe4d27bc8035fbd462d8)
2019-06-27 14:12:29 -07:00
Siarhei Vishniakou
98498749fd Merge "Keylayout for xbox pdp controller" into qt-dev am: 927d44d9eb am: 9dec042f6a
am: f8020cc19b

Change-Id: I4104420c5ddd4943ed89f23a6f44822a58e7e997
2019-06-25 02:13:21 -07:00
Alan Stokes
cc327c3c94 Merge "Explicitly grant START_ACTIVITIES_FROM_BACKGROUND to com.android.phone." 2019-06-25 07:36:41 +00: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
Siarhei Vishniakou
f178783e33 Merge "Keylayout for xbox controllers" into qt-dev am: 287b20ae0e am: f6e540e970
am: cb43b6a351

Change-Id: Ifb116b223e6ffd5b9224fc4bdb5593fe215bdaae
2019-06-24 13:19:00 -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
TreeHugger Robot
ba93bf275e Merge "Add mapping for KEYCODE_ASSIST" 2019-06-20 16:05:14 +00:00
Siarhei Vishniakou
4055c79b56 Add mapping for KEYCODE_ASSIST
Linux has defined KEY_ASSISTANT, but it is not currently mapped in
Android by default. Add the missing mapping here.

Bug: None
Test: None
Change-Id: I85dfecf599ebb69dd2b9ac602b1fc425e13f93c4
2019-06-19 15:31:04 -07:00
Michal Karpinski
a98e7b66b3 Merge "Merge "Add START_ACTIVITIES_FROM_BACKGROUND permission for com.android.providers.downloads" into qt-dev am: ec3ba99e95 am: 8fdf790def" into qt-r1-dev-plus-aosp
am: 0b89f2ead7

Change-Id: Iebe47e816a89243874eb62aa97ab393a47ca320b
2019-06-18 15:28:07 -07:00
Roshan Pius
bf56cc0089 privapps-permission: Grant REQUEST_NETWORK_SCORES to car system apps
NETWORK_REQUEST_SCORES is being changed to a privileged permission from
signature only permission. The wifi stack needs to obtain this permission,
so it can no longer be signature only.

Bug: 113174748
Bug: 135480528
Test: Compiles
Change-Id: Ia824676ee4ddc935346ae22b0aabd6ed4661743f
2019-06-18 09:46:28 -07: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
Roshan Pius
b5a227d22a Merge "privapps-permission: Make REQUEST_NETWORK_SCORES a privilged permission" 2019-06-17 19:59:52 +00:00
Roshan Pius
82f37f83a8 privapps-permission: Make REQUEST_NETWORK_SCORES a privilged permission
The wifi stack (signed by Google on non-Pixel devices) need to obtain this permission,
so it can no longer be signature only.

Bug: 113174748
Test: Compiles
Change-Id: Id9557a6d164a40698ee7d1e5926e56fd616868d0
2019-06-17 08:56:43 -07:00
Siarhei Vishniakou
6380bcddf9 Merge "Add key layout for Nintendo Switch controller" into qt-dev am: 6eca92dd43 am: 471367ad9b
am: afb0fa5351

Change-Id: Ic22ea32882d89dad2ad436c90408c289848c35c6
2019-06-14 17:42:03 -07: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
Alan Stokes
953484ea44 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
2019-06-14 16:06:36 +01:00
Siarhei Vishniakou
6b77f74756 Merge "Add keylayout for Xbox One USB controller" into qt-dev am: 77c1c938a5 am: a0c0e2f8c9
am: b18b8c081a

Change-Id: I19c3e94230748d1fa61b5de74cc070a5b90964f8
2019-06-13 10:23:06 -07:00