Commit Graph

1220 Commits

Author SHA1 Message Date
Hui Yu
20f42909f8 BG-FGS-launch restriction exemptions.
1. Add a new permission START_FOREGROUND_SERVICES_FROM_BACKGROUND.
2. Add a new bind flag BIND_ALLOW_FOREGROUND_SERVICE_STARTS_FROM_BACKGROUND
3. BroadcastOptions.setTemporaryAppWhitelistDuration() is currently
protected with CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission, also open
it for START_ACTIVITIES_FROM_BACKGROUND and
START_FOREGROUND_SERVICES_FROM_BACKGROUND permission.
4. Exempt SYSTEM_ALERT_WINDOW permission.
5. if Context.startForegroundService() or Service.startForeground() is
restricted by BG-FGS-launch restriction, and app's targetSdkVersion is S
and above, throw a IllegalStateException.

Bug: 171305836
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagFGS
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagActivity
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartSystemAlertWindow
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartFromBGException

Change-Id: Iff3ed65e174a8406d4d6045cda42bdde6cecf30d
2020-11-23 11:19:59 -08:00
Xin Li
d8364506d2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie8dc4d9a00afc1c933310cd9e6f9dca972faab28
2020-11-17 22:51:39 +00:00
Paul Chang
37aaf66ede Merge "Replace broadcast with adding a method in BugreportCallback" 2020-11-14 12:21:49 +00:00
Paul Chang
ec91d7700d Replace broadcast with adding a method in BugreportCallback
BUG: 154298410
Test: BetterBug can work normally in bug report shortcut flow
Change-Id: Ibc1a5a8ac308c303399d28eb8c177096b805fdf9
2020-11-14 12:11:34 +00:00
TreeHugger Robot
d315f3320b Merge "Add READ_PROJECTION_STATE to shell permissions for test purposes." 2020-11-14 01:15:24 +00:00
Kurt Dresner
f606540a21 Add READ_PROJECTION_STATE to shell permissions for test purposes.
Bug: 172283966
Bug: 134997071
Test: this is for a test
Change-Id: I1fb64d9dd59e1892907ac9b827f06a882a7cecef
2020-11-12 12:11:22 -08:00
Kweku Adams
39d93256cc Add FLAG_IMMUTABLE to heap dump notification PendingIntent.
Bug: 171987666
Test: Android builds
Change-Id: I0be6f837e7948db8d7a50c5ef6497aeb1854acde
2020-11-11 14:04:52 -08:00
Bill Yi
9d2a433850 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I437e2d79b1b25e73e16cf050b102510f6fb08504
2020-11-10 01:24:53 +00:00
Kurt Dresner
1830221dc7 Merge "Add projection state APIs to UiModeManager and UiModeManagerService." am: 136ce9f5cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12730437

Change-Id: If661980d99f3968a72e430f40547f5d810cb8ffc
2020-11-07 05:49:08 +00:00
Kurt Dresner
3d21c80934 Add projection state APIs to UiModeManager and UiModeManagerService.
Bug: 134997071
Bug: 169702986
Test: Code builds, runs, unit tests added for new functionality.
Change-Id: I29cfb198101cdc5d1f4de84f8701928643b756c3
2020-11-06 14:12:39 -08:00
Gavin Corkery
a1b868bd6e Merge "Add immutability flag to PendingIntents" am: 59423ff19a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12876398

Change-Id: I8846084189a7b72299d85686afad87e7e8a5a389
2020-10-29 18:41:10 +00:00
Gavin Corkery
59423ff19a Merge "Add immutability flag to PendingIntents" 2020-10-29 18:35:23 +00:00
Louis Chang
7d65f4e722 Merge "Deprecate MANAGE_ACTIVITY_STACKS permission" am: 34a8fd02af
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12831401

Change-Id: I664311c4f691ff8cc8802d9418c910fa68855bf4
2020-10-28 13:48:46 +00:00
Louis Chang
34a8fd02af Merge "Deprecate MANAGE_ACTIVITY_STACKS permission" 2020-10-28 13:33:14 +00:00
Gavin Corkery
2d38f6e4f0 Add immutability flag to PendingIntents
Explicitly set FLAG_IMMUTABLE for all PendingIntents
in BugreportProgressService.

Test: Builds
Bug: 170165227
Bug: 171830604
Change-Id: Iae1489b9c8fa323448e60615e99ad96aee1cd1d7
2020-10-28 11:23:41 +00:00
Darryl Johnson
1cd88cf5ad Merge "Add DeviceStateManagerService shell commands to get and override state." am: fa01004977
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12606219

Change-Id: I1082813a07d262b56ead9c804618011bee215032
2020-10-28 02:13:39 +00:00
Darryl Johnson
fa01004977 Merge "Add DeviceStateManagerService shell commands to get and override state." 2020-10-28 01:51:39 +00:00
Louis Chang
5510ecdfa9 Deprecate MANAGE_ACTIVITY_STACKS permission
Adding MANAGE_ACTIVITY_TASKS permission as the replacement, but
still grant the deprecated MANAGE_ACTIVITY_STACKS permission for
app compatibility.

Bug: 157876448
Test: presubmit

Change-Id: I894ee66e058b1024a731d3be4b33b69626451f08
2020-10-28 09:20:00 +08:00
Jeff Sharkey
f80597de7e Merge "Enable Error Prone to detect obscure bugs." am: f7dee0be43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12911914

Change-Id: Ic8d1a73aaa0549bea697788fbcf228c4cae59352
2020-10-24 17:30:53 +00:00
Jeff Sharkey
d23b5379c0 Enable Error Prone to detect obscure bugs.
We've been writing many new framework-specific Error Prone checkers
to help detect obscure platform bugs, and this change starts enabling
those checkers for more packages across the platform.

Bug: 155703208
Test: manual
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: I1db3412b0be40f6f78c68331ae01756887192071
2020-10-23 16:55:30 -06:00
Bill Yi
3481efac31 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic4ce9190cc04482e787425913a72cd335bcc29f9
2020-10-21 11:48:28 +00:00
TreeHugger Robot
17eef970a7 Merge "Apply FLAG_IMMUTABLE to various PendingIntents." am: cd3296568a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12885272

Change-Id: Icec1e3a3a0bd5ba44b797319a4bd553d0e74cbf3
2020-10-21 00:25:21 +00:00
Jeff Sharkey
864524af17 Apply FLAG_IMMUTABLE to various PendingIntents.
Some careful spot-checking has revealed common cases where it's
reasonable to blanket apply the new FLAG_IMMUTABLE option to newly
created PendingIntents.  Specifically these situations:

-- Simple notification content clicks are immutable; there's no need
to communicate customized data back to the creator
-- Simple notification action clicks are immutable; there's no need
to communicate customized data back to the creator
-- Broadcast intents sent by AlarmManager are immutable; the system
dispatches them without customization.

Bug: 170165227, 170424283, 170425388, 170425877
Bug: 169791183, 170771965, 170226088, 170224928, 170767530
Test: none
Change-Id: I5ed68710d2ccad4635a30fd91136a9e6ad76a01d
2020-10-20 16:20:54 -06:00
Eugene Susla
c754bc382a Merge "Expose get/set notification listeners as a @SystemAPI" am: 4587809e21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12775487

Change-Id: I1eae8fb1cb92326b47ecd4e86beed4f4c13f7bd3
2020-10-14 23:31:21 +00:00
Darryl L Johnson
fa539d136e Add DeviceStateManagerService shell commands to get and override state.
This also introduces the CONTROL_DEVICE_STATE permission to protect
against setting the device state. The permission is granted to the shell
to allow overriding via ADB.

Two ADB commands are introduced with this change:

-> adb shell cmd device_state print-states
will print the list of states supported by the device
Ex:
$ adb shell cmd device_state print-states
[ 0, 1, 2 ]

-> adb shell cmd device_state state [reset|OVERRIDE_DEVICE_STATE]
will print the current device state or override the current device
state with the supplied override state.
Ex:
$ adb shell cmd device_state 0

Ex:
$ adb shell cmd device_state state
Device state: 0
----------------------
Base state: 2
Override state: 0

Bug: 159401801
Test: atest DeviceStateManagerServiceTest
Test: adb shell cmd device_state print-states
Test: adb shell cmd device_state state

Change-Id: I8a74f1f2bf8189523bdae861fb38f86988c21b2a
2020-10-14 15:47:09 -07:00
Eugene Susla
0642113b7c Expose get/set notification listeners as a @SystemAPI
We need to grant/revoke notification listener privileges from
PermissionController maniline module.
This exposes a @SystemApi API to do so

Bug: 165951651
Test: atest NotificationManagerTest
Change-Id: I81502756e9c7f11ce0347f5f3c006a1539f91b37
2020-10-13 13:26:47 -07:00
Kevin Chyn
4277a38f1d Merge "Add wireframe for biometric TestApis" am: 98e742cfdd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12746444

Change-Id: Ibe00e53bf6b48df3bc1764f408389c759de39cd9
2020-10-09 22:02:48 +00:00
Kevin Chyn
fc26e8a0e0 Add wireframe for biometric TestApis
1) Adds BiometricTestSession and empty implementations
2) Adds TEST_BIOMETRIC permission
3) Grants Shell USE_BIOMETRIC and TEST_BIOMETRIC permission

Bug: 169459906
Test: make -j update-api && make -j

Change-Id: Iea9fd37d7234eb7e5e34a7a2698cbf0ca7a33a77
2020-10-09 11:15:03 -07:00
Neil Fuller
42b6cb61a9 Merge "Add a new permission in AOSP" am: 4b22e7c281 am: 1f728acac0 am: 8a0ce64177 am: 75ae324fb9 am: 7a3481c35c am: 7e11d634fc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440636

Change-Id: I1bd82a9a7b91d55d79b93a8a3e2a1531eb476222
2020-09-30 10:35:57 +00:00
Neil Fuller
7e11d634fc Merge "Add a new permission in AOSP" am: 4b22e7c281 am: 1f728acac0 am: 8a0ce64177 am: 75ae324fb9 am: 7a3481c35c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440636

Change-Id: I3a2b428be82d029c3cb7c8fa9b3102dd62eec8dc
2020-09-30 10:30:38 +00:00
Neil Fuller
8a0ce64177 Merge "Add a new permission in AOSP" am: 4b22e7c281 am: 1f728acac0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440636

Change-Id: I2a65d7c9a91f5b3f5772ba8b2b199bfe3096077b
2020-09-30 09:35:03 +00:00
Neil Fuller
770f5ab2db Add a new permission in AOSP
This adds a new permission in AOSP, so it can be referenced by the Shell
command, which presubmit suggests has to be maintained in AOSP.

Bug: 159891384
Test: build only
Exempt-From-Owner-Approval: jsharkey@ approved but it appears to have reset...?
Change-Id: Ic7d403e20731e9d6bd82d5b2e2758cc61989cc59
2020-09-30 08:39:25 +00:00
Treehugger Robot
f7868bb36a Merge "Update language to comply with Android's inclusive language guidance" am: 986e49df72 am: 21e5a00fb3 am: bc3cef1dce am: 91d640572f am: 58ebc4f303 am: ee6cd5fc5b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382481

Change-Id: Iaa1c3bb9493e3764fe3d95377d562c0cf7950438
2020-09-28 16:41:07 +00:00
Treehugger Robot
ee6cd5fc5b Merge "Update language to comply with Android's inclusive language guidance" am: 986e49df72 am: 21e5a00fb3 am: bc3cef1dce am: 91d640572f am: 58ebc4f303
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382481

Change-Id: I23744e158143a09d887e0ff1de912f687ffd0ded
2020-09-28 16:12:12 +00:00
Treehugger Robot
bc3cef1dce Merge "Update language to comply with Android's inclusive language guidance" am: 986e49df72 am: 21e5a00fb3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382481

Change-Id: Ia71942419b1b736f06875ff87a348d952f74dd7b
2020-09-28 15:15:40 +00:00
Treehugger Robot
986e49df72 Merge "Update language to comply with Android's inclusive language guidance" 2020-09-28 14:11:49 +00:00
Marin Shalamanov
f6c22656b4 Merge "Add TestApi to always select the app requested display mode" am: 768cbbd32c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12346262

Change-Id: I7684427c3ee7fd0c2cdf9a831bcf1e53ef5035ff
2020-09-21 13:05:48 +00:00
Marin Shalamanov
794938dfa7 Merge "Add permission to override display mode requests" am: 7fb5deb779 am: 83a8725d55
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1420968

Change-Id: I59da44847b84fc262248409dbe8e49c608743886
2020-09-21 13:01:37 +00:00
Marin Shalamanov
7fb5deb779 Merge "Add permission to override display mode requests" 2020-09-21 12:23:13 +00:00
Marin Shalamanov
8f2f6d1465 Add permission to override display mode requests
This permission will be used for testing purposes
to override the display mode requests in DisplayModeDirector.

Bug: 159113268
Bug: 158316271
Test: m
Change-Id: Ibcafc50badcda929c3c3b446b6d0d9045c2a5b6d
Merged-In: I257636ae2a6ed74044e71e49a99024682c3a92c5
2020-09-21 14:04:48 +02:00
Marin Shalamanov
97ba024fb0 Add TestApi to always select the app requested display mode
The added test API is used to ignore all votes in
DisplayModeDirector app votes. This way only the app
requested display mode will be picked. The API will be
used for testing app mode switch requests.

Bug: 159113268
Bug: 158316271
Test: m
Change-Id: I257636ae2a6ed74044e71e49a99024682c3a92c5
2020-09-18 13:32:54 +02:00
Bill Yi
5b49c68d11 Merge mainline-release 6664920 to master - DO NOT MERGE
Merged-In: Id04ea331831e8b26ba99478848392b40a92548d5
Change-Id: I888da0c9475f2d00602d917d2f58169f8d7c93a4
2020-09-17 21:56:59 -07:00
Sergey Nikolaienkov
6cc4dfee87 Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" am: 104d2f92b3 am: ec82033d3e am: 4bf2a8e322 am: d851ed5dde am: 541541b868 am: 35c1bb7cf7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1385856

Change-Id: If08697d2acbe19af9174726b1c5bf7872ba10cf9
2020-09-09 08:59:14 +00:00
Sergey Nikolaienkov
35c1bb7cf7 Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" am: 104d2f92b3 am: ec82033d3e am: 4bf2a8e322 am: d851ed5dde am: 541541b868
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1385856

Change-Id: I281b6085d164227cfa4fee46ab90d3c167416639
2020-09-09 08:57:39 +00:00
Sergey Nikolaienkov
4bf2a8e322 Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" am: 104d2f92b3 am: ec82033d3e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1385856

Change-Id: I3a835c92cf86985d6861382f33c58d5df000f2d7
2020-09-09 07:57:43 +00:00
Sergey Nikolaienkov
ec82033d3e Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" am: 104d2f92b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1385856

Change-Id: Ice3e441cc9c0df8d0a6acc016bb74375e081bd67
2020-09-09 07:23:52 +00:00
Sergey Nikolaienkov
104d2f92b3 Merge "Add GET_INTENT_SENDER_INTENT permission to Shell" 2020-09-09 07:09:11 +00:00
Bill Yi
7ffaf9920b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie97ecf1dd2063063851b827c19f7d17c27e7a158
2020-09-04 21:58:37 +00:00
Bill Yi
1a29d74066 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9bf56140e3ab788a4765fc80c4125f90796727a5
2020-09-03 04:54:48 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00