Commit Graph

1239 Commits

Author SHA1 Message Date
Nick Moukhine
10902afb00 Merge "Allow shell to invoke music recognition api" am: a7d6351972 am: 7f1f7169c2 am: 1dc6a7ab17
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517737

Change-Id: I2c06ecc3fb8934240c56377e025c07adea83c4c7
2020-12-07 21:13:16 +00:00
Nick Moukhine
1dc6a7ab17 Merge "Allow shell to invoke music recognition api" am: a7d6351972 am: 7f1f7169c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517737

Change-Id: I3087d7b8dc5fb6471b89afcf8e44408aa30c76b1
2020-12-07 17:33:52 +00:00
Nick Moukhine
a7d6351972 Merge "Allow shell to invoke music recognition api" 2020-12-07 16:15:31 +00:00
Nick Moukhine
a06b55ee9e Allow shell to invoke music recognition api
Needed to allow MusicRecognitionManagerTest in cts to exercise the api.

Bug: 158194857
Test: patched and verified on internal master
Change-Id: Ia1b250de28c492c4058c7dd8f6573a0f0a178505
2020-12-07 10:04:32 +01:00
Bill Yi
506e8d1697 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Id2c26adb70f2403ba0dfa3a0065be715825f9446
2020-12-05 23:36:10 +00:00
Malcolm Chen
80054bd6f7 Expose CarrierMessagingServiceWrapper as System API.
Also adding Executor when callback, according to API council's
feedback.

Bug: 172087216
Test: build
Change-Id: Iaff6c75c1f92840424deeffbc4504a3ecf9bc1ee
2020-12-04 11:52:50 -08:00
TreeHugger Robot
34ead1a1a8 Merge "Add SIM Account management permission to shell" 2020-12-04 00:16:56 +00:00
Bernardo Rufino
505fe3a5c7 Merge "Add BROADCAST_CLOSE_SYSTEM_DIALOGS to shell for tests" 2020-12-03 17:58:45 +00:00
Gary Mai
b6805ff61a Add SIM Account management permission to shell
To enable SIM categorization CTS tests

Test: atest CtsContactsProviderTestCases
Bug: 174703455
Change-Id: I7f9e800086002d639e40846f2e6349637ed92686
2020-12-02 17:49:08 -08:00
Marin Shalamanov
019f990cd1 Add TestApi for setRefreshRateSwitchingType
This CLs adds a test API to replicted the behaviour of the
MATCH_CONTENT_FRAME_RATE user setting. This is intended to
be used from CTS.

Bug: 157504046
Bug: 171952409
Test: atest MatchContentFrameRateTest
Change-Id: I90d9a0d019cdb908b3b13328a78fe370676ad064
2020-12-01 16:15:41 +01:00
Treehugger Robot
4766b92976 Merge "Add permission for protecting UI tracing" am: 854bb5b5eb am: 6f53cbb440 am: 0ea696e448
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1500510

Change-Id: Ica7298518b7b3376666bbd511480d428c6f3fd7d
2020-12-01 14:43:03 +00:00
Treehugger Robot
0ea696e448 Merge "Add permission for protecting UI tracing" am: 854bb5b5eb am: 6f53cbb440
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1500510

Change-Id: Ie88e8640db85513fd16c383833731f4a014d97e7
2020-12-01 14:28:59 +00:00
Bernardo Rufino
4c9a6d5cde Add BROADCAST_CLOSE_SYSTEM_DIALOGS to shell for tests
Tests that interact with the UI send Intent.ACSD before execution to
prevent the test from failing in case there are unexpected dialogs on
screen.

Those tests will be able to keep that via the instrumentation bridge
with the shell, given the shell has the proper permission to close
system dialogs.

Bug: 159105552
Test: Verify that shell has permission via adb shell dumpsys package
Change-Id: I07266573ae73d086446c6107248f5e187edcd64a
2020-11-25 12:25:11 +00:00
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
Ioana Stefan
2ad02a383b Add permission for protecting UI tracing
The new permission will protect the UI traces, allowing only wanted
development tools to start the tracing. At the moment, the permission is
planned to be used for WindowManager and InputMethod traces.

Bug: 172444310
Test: N/A
Change-Id: Ibdeb38dc9a066cb8ed2904adcdac29014b166526
2020-11-19 11:59:50 +00: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
Dieter Hsu
9c82a7477b Enable bug report tests in pre/postsubmit am: 6765448386 am: 3fcbbccd90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440639

Change-Id: I6b4eeb01521a1b6af68b4ef7e7225b5b9e0bb517
2020-10-21 12:28:53 +00:00
Dieter Hsu
3fcbbccd90 Enable bug report tests in pre/postsubmit am: 6765448386
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440639

Change-Id: I1188d3101d62d630b0982804643cd022e22868a8
2020-10-21 12:06:27 +00: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
Gavin Corkery
8fafabfed1 Merge changes from topic "bugreporting-aosp-sync"
* changes:
  Fix consent timed out to sharing bugreport data
  Add BugreportManagerTestCases to bugreport presubmit
  Enable bug report tests in pre/postsubmit
  Run bugreport unit test without script
2020-10-21 11:48:11 +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
Bill Yi
db3f7703bb Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1420e9937d8d303da1f1abbb8ff37da74275bea1
2020-10-05 06:27:38 -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