Commit Graph

1207 Commits

Author SHA1 Message Date
Evan Severson
cc6e1f6ea8 Merge "Give PermissionController UsageStats for one-time permission" 2019-10-15 15:55:07 +00:00
Roshan Pius
73266f2f64 Add a new wifi protection level
Wifi mainline module needs some permissions which are currently only
granted to signature components. Since mainline modules are not going to
be signed with OEM's signature, we need a new protection level to grant
some of these permissions to the wifi mainline APK.

Bug: 142234604
Test: Verified that wifi can get INTERACT_ACROSS_USERS_FULL permission
Change-Id: I26b0edff62497b5e08c2f2f504b0cd5f950682ad
2019-10-12 20:23:10 +00:00
Rashed Abdel-Tawab
243c9bd0ce Merge "Reword outdated fonts comment" am: ea2bea3bed am: f0871b9488 am: 9aeb110410
am: 043eb740c4

Change-Id: I0f967af6788f4ec7d06da8866d37d9cd121caff5
2019-10-12 00:35:02 -07:00
Rashed Abdel-Tawab
043eb740c4 Merge "Reword outdated fonts comment" am: ea2bea3bed am: f0871b9488
am: 9aeb110410

Change-Id: I20dd9d98e4169ce65c01ca5d639100787d4c9f1c
2019-10-12 00:28:02 -07:00
Rashed Abdel-Tawab
9aeb110410 Merge "Reword outdated fonts comment" am: ea2bea3bed
am: f0871b9488

Change-Id: I242eb7e60f7f244d6c2bde610e7c35183de9adbe
2019-10-12 00:21:13 -07: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
Yan Zhu
0a8b2fff58 Merge "Add permissions for EmbeddedKitchenSinkApp and car tests" 2019-10-11 20:26:46 +00:00
Yan Zhu
b90747079e Add permissions for EmbeddedKitchenSinkApp and car tests
- add more permissions for EmbeddedKitchenSinkApp to run as non system
app
- add addional permissions for car tests

Bug: 140900347, Bug: 140900347
Test: build, sync and test each fragments manually in the app

(at root of the project)
make EmbeddedKitchenSinkApp

Change-Id: If84ecc62e351d171cd8b568488fd4ae60bc0743f
2019-10-11 10:44:02 -07:00
Roshan Pius
8e10895db0 WifiStack: Rename wifi stack package name
Bug: 142478358
Test: Connects to wifi networ
Change-Id: I3d0d83fbba80d7b736200ba7997badbb898fbc0e
2019-10-10 11:27:14 -07:00
Jordan Liu
96c51f58db Merge "[DO NOT MERGE] Revert "Add CellBroadcastService and related permissions"" am: 8172f45111 am: 21fedfab99
am: 87d2acb711

Change-Id: I0b26a92e8c15a710a54576f8ce499ae441748dde
2019-10-09 15:01:32 -07:00
Jordan Liu
87d2acb711 Merge "[DO NOT MERGE] Revert "Add CellBroadcastService and related permissions"" am: 8172f45111
am: 21fedfab99

Change-Id: I1f62d488adf1bfa111efb7273a3ffa2046be7186
2019-10-09 14:50:29 -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
cb0c6c90a9 Merge "Add CellBroadcastService and related permissions" am: 32382561a6 am: a2ca902d2f
am: d208c955e5

Change-Id: If6bcb53773c511d4c6a52da186401eea27b0446b
2019-10-09 09:43:10 -07:00
Jordan Liu
d208c955e5 Merge "Add CellBroadcastService and related permissions" am: 32382561a6
am: a2ca902d2f

Change-Id: I31ba9b8fdd540f07ccd88543c144a85c4eacc67b
2019-10-09 09:33:42 -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
Evan Severson
66de1f0edd Give PermissionController UsageStats for one-time permission
Bug: 136219229
Test: Manual

Change-Id: I8d902cc95e4c63b5cab8443d55bb18ad133a6d9d
2019-10-07 15:31:49 -07:00
Wale Ogunwale
9a777f342f Merge "Unify Activity level of window hierarchy (50/n)." 2019-10-06 03:33:34 +00:00
Wale Ogunwale
da8b827e21 Unify Activity level of window hierarchy (50/n).
Make ActivityRecord extend AppWindowToken so we have a single object
for acitvities in the hierarchy.

Bug: 80414790
Test: Existing tests pass.
Change-Id: Ia7f52ef444cba88223f4e8a9586f6c12b1b5e4ea
2019-10-05 15:08:45 -07:00
Jordan Liu
b6ac1d67bc Merge "Add CellBroadcastService and related permissions" 2019-10-04 18:03:04 +00:00
Jordan Liu
289dfd037f Add CellBroadcastService and related permissions
CellBroadcastService is bound to by the platform to handle cell
broadcasts.

Bug: 135956699
Test: manual
Change-Id: Ib1b20da03d271fc0b2736774b2ca6c6514944093
2019-10-03 14:56:52 -07:00
Roshan Pius
71fd312054 network_stack: Move network_stack @hide bypass to platform
Bug: 142071767
Bug: 141954427
Test: Device boots up and connects to wifi networks
Change-Id: I0577b8a1f55b7b8dfb2fc87209d9ff94ecf7efd9
2019-10-03 12:54:16 -07:00
Adrian Roos
b125e0be9f Revert "Revert "ProtoLog deployment for WM batch 1""
This reverts commit a91c41254d.

Change-Id: Id752bb714174b5f21ba265f0c306a0eb99748634
2019-10-02 15:29:46 +02:00
Wale Ogunwale
a91c41254d Revert "ProtoLog deployment for WM batch 1"
This reverts commit 6f22c2a9fd.

Reason for revert: Error messages are not friendly when something goes wrong.

Change-Id: I13a6a2908a44ebd4599138cd2a61ff4b3cf055eb
2019-09-28 17:53:01 -07:00
TreeHugger Robot
733181fd9d Merge "ProtoLog deployment for WM batch 1" 2019-09-28 08:24:39 +00:00
jungshik
716ebd4dd0 Merge "Use NotoSansMyanmar (pure Unicode) fonts" am: b44f88b3c9 am: 47d023fb40 am: b5ccb7e1b9
am: 62b7c9e758

Change-Id: Ie51dda8d500849044f9010a799e16c635c0ccf78
2019-09-27 20:33:20 -07:00
jungshik
62b7c9e758 Merge "Use NotoSansMyanmar (pure Unicode) fonts" am: b44f88b3c9 am: 47d023fb40
am: b5ccb7e1b9

Change-Id: Ibc72c60e7f1568a45c6cea80d406f5d29fa61079
2019-09-27 20:12:58 -07:00
jungshik
b5ccb7e1b9 Merge "Use NotoSansMyanmar (pure Unicode) fonts" am: b44f88b3c9
am: 47d023fb40

Change-Id: I920fd37942467469f332092e8f279fce870bd8be
2019-09-27 19:58:58 -07:00
Adam Pardyl
6f22c2a9fd ProtoLog deployment for WM batch 1
First batch of around 20% Slog calls changed to ProtoLog.
365 log statements converted to ProtoLog, including 295 that
were previously disabled with a compile time constant (excluded from
resultant binary).
Size impact: +33kB on services.jar, +99kB on services.odex
(around 100b per added log call). By using ProtoLog we save +21kb
compared to Slog on both files.

Bug:
Test: atest WmTests
Change-Id: Idd712135e81997df84f323ba9a7585d54ba20d23
2019-09-27 16:45:19 +02:00
Adam Pardyl
5e0e771f16 Remove line numbers from protolog config.
Having line numbers in log statement location info in protolog viewer
config makes the config file invalid after every code merge.

Bug:
Test: atest protologtool-tests
Change-Id: I7e9ae434517bc94ecfc7f421e71d21b07f3c233f
2019-09-26 16:15:16 +02:00
Chen Xu
8dcf873d9a Merge "Revert "remove symbols from greylist"" 2019-09-26 03:45:27 +00:00
TreeHugger Robot
be0f335f5a Merge "Whitelist packages for user types" 2019-09-25 18:45:13 +00:00
Adam Pardyl
a4e572d944 ProtoLog improvements
- Added log statement location info to viewer config
- Fixed a NPE in ProtoLogImpl
- Reworked early return for log calls
- Changed type of message hash field to signed (for Java compat)
- Fix flaky tests for ProtoLogImpl

Bug:
Test: atest protologtool-tests FrameworksServicesTests:com.android.server.protolog
Change-Id: I7874475083ab5d01fe46fd3013a058743acd3884
2019-09-25 12:36:32 +02:00
Bookatz
04d7ae5c6f Whitelist packages for user types
Creates a new SystemConfig xml entry which allows a device to whitelist
system packages to be installed on users when they are created, based on
the type of user.

System packages will be installed on users when they are created, or
during OTAs, based on this whitelist. The whitelist can be
enabled/disabled via a Config resource.

For any user type, system packages can be whitelisted or blacklisted.
If it is both (for the same user type), the blacklist takes priority.
If it is neither, it won't be installed (since it isn't whitelisted).

If a system package isn't mentioned in the whitelist file at all, for
any user, then its behaviour depends on the Config resource value, which
can optionally implicitly whitelist all such apps on all users.

For now, the list is mostly empty and the default config is set to be
enabled but implicitly whitelist all system packages that are not
mentioned.

Test: atest FrameworksServicesTests:SystemConfigTest
Test: atest com.android.server.pm.UserManagerServicePackageWhitelistTest
Test: manually test user 0 by flashall -w and checking packages
Test: manually test OTA by setting setprop persist.pm.mock-upgrade 1
Bug: 134605778

Change-Id: Ia098c1f597f66a1c946cfcc9b7771c25e8ceabf7
2019-09-24 09:38:58 -07:00
Adam Pardyl
e75b4a7d08 Merge "WindowManager ProtoLog feature" 2019-09-24 09:23:39 +00:00
Philip P. Moltmann
e30ed0599d Merge "Run RuntimePermissionProperty tests when runtime permissions change" 2019-09-24 03:48:06 +00:00
Chen Xu
6155eb9663 Revert "remove symbols from greylist"
This reverts commit 27c4e658b3.

Reason for revert: <potential performance regression. revert for now and looking for possible optimization from ART team>

Change-Id: I5bf728e4f6789d7e6398cf90f22fbf3a24d481c2
2019-09-23 18:51:02 -07:00
Adam Pardyl
0f1b3d4602 WindowManager ProtoLog feature
This CL implements the on-device part of ProtoLog
- the new logging system for WindowManager.

Design doc: go/windowmanager-log2proto

Change-Id: I2c88c97dabb3465ffc0615b8017b335a494bca59
Bug:
Test: atest FrameworksServicesTests:com.android.server.protolog protologtool-tests
2019-09-23 15:47:29 +00:00
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