2835 Commits

Author SHA1 Message Date
Hui Wu
b061e2e60e Merge "Adds more roles to the protectionlevel" into tm-dev 2022-04-01 21:50:00 +00:00
Hui Wu
b20414b8bd Adds more roles to the protectionlevel
MANAGE_CLOUDSEARCH is and will be wanted by many applications. privileged/role should be able to cover most use cases.

Bug: 227041245
Test: atest
Change-Id: Idfb85f9e181968df935c4f27490bae2babadd0d9
2022-04-01 14:25:26 -07:00
TreeHugger Robot
97dabec966 Merge "Move out PermissionController allowlist entries" into tm-dev 2022-04-01 19:39:20 +00:00
Vadim Caen
a28e989921 Merge "Some cleanup logging and test for back navigation" into tm-dev 2022-04-01 15:57:59 +00:00
Vadim Caen
71297c8aab Some cleanup logging and test for back navigation
- Better logging
 - Remove method form OnBackInvokedDispatcher interface (but not the
   implementation)
 - Add test for ag/17211289

Bug: 222675481
Test: BackNavigationControllerTests#testUnregisterCallbacksWithSystemCallback
Change-Id: I6a3ae30da7e29dddda116acd8fa0c9af4b9faa6e
2022-04-01 15:57:49 +00:00
Jay Sullivan
5c375eacdd Merge "Add perm split W_E_S to A_M_L and sort" into tm-dev 2022-03-31 22:59:24 +00:00
Jay Thomas Sullivan
5b9f6a592c Add perm split W_E_S to A_M_L and sort
Add a permission split:

    WRITE_EXTERNAL_STORAGE to ACCESS_MEDIA_LOCATION

...and sort split permissions.

The reason adding this is that the split-permission handling code
doesn't handle recursive split-permission mappings, but only direct
mappings.

The reason for sorting is that, given a tree of permission splits,
the entries in platform.xml must be sorted topologically, due to
current permission split code.

Bug: 227240947
Test: atest CtsPermissionTestCases CtsPermission3TestCases SplitPermissionsSystemTest
Change-Id: I62c2ab8687af2e8325fcc370a74af0f589d8e9f2
2022-03-29 17:46:18 -07:00
Sharon Su
acf4d5a89d Merge "Change android.permission.MANAGE_WALLPAPER_EFFECTS_GENERATION to signature| privileged Test: cts test Bug: 213238425 Change-Id: Iacaec0904a1d1c14ba8b0ec8f3871376ff33f01c" into tm-dev 2022-03-29 16:41:57 +00:00
Alex Johnston
4879dca57a Remove unused lost mode permission
Bug: 226945080
Test: NA
Change-Id: I339b6894b3a9e32a3d644a06e4ebc3a0f7f98a05
2022-03-29 15:36:49 +00:00
Jay Thomas Sullivan
9b78af4292 Add split perms from W_E_S to media
Add split permissions from WRITE_EXTERNAL_STORAGE to media permissions.

The reason for doing this is that the split-permission handling code
doesn't handle recursive split-permission mappings, but only direct
mappings.

This resulted in a problem with WRITE_EXTERNAL_STORAGE because:

1) WRITE_EXTERNAL_STORAGE splits into READ_EXTERNAL_STORAGE, and
2) Recently, we added split permissions from READ_EXTERNAL_STORAGE
to READ_MEDIA_AUDIO, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, and
ACCESS_MEDIA_LOCATION

The effect is that apps which request WRITE_EXTERNAL_STORAGE are not
being granted media storage permissions properly.

(Note that, for now, we've not yet added the split to
ACCESS_MEDIA_LOCATION, because this scenario has not yet been
thoroughly tested.)

Bug: 222238273
Test: atest CtsPermissionTestCases CtsPermission3TestCases SplitPermissionsSystemTest
Change-Id: I94694b37189ea8ad89edc4f478391ccfe1ccd5b8
2022-03-28 19:51:38 +00:00
Vadim Caen
09f7f6f69b Merge changes from topic "presubmit-am-b87ddd3bbf2947f1aa639cddcee6ecb8" into tm-dev
* changes:
  Remove callback before WindowState removal
  Improve startBackNavigation stability
2022-03-28 18:53:26 +00:00
Ganesh Olekar
3795120659 Merge "Add broadcast receiver to listen for safety center flag changes" into tm-dev 2022-03-28 18:32:53 +00:00
Sharon Su
c5d3f167f7 Change android.permission.MANAGE_WALLPAPER_EFFECTS_GENERATION to signature| privileged
Test: cts test
Bug: 213238425
Change-Id: Iacaec0904a1d1c14ba8b0ec8f3871376ff33f01c
2022-03-25 23:57:32 +00:00
Ganesh Olekar
ff11a6e291 Add broadcast receiver to listen for safety center flag changes
Change-Id: I0a22edd85d10bdd1ccb6f26a48615e88a30e7cb3
Bug: 225294614
Test: atest com.android.systemui.qs.HeaderPrivacyIconsControllerTest -c
2022-03-25 17:36:10 +00:00
Philip Junker
1ccb6f2a4c Merge "Add support for more keycodes to reference remote control." into tm-dev 2022-03-25 09:02:35 +00:00
Philip Junker
b22e51a372 Add support for more keycodes to reference remote control.
Add support for KEYCODE_PROFILE_SWITCH, KEYCODE_ALL_APPS, KEYCODE_PERIOD and KEYCODE_MEDIA_RECORD.
Add support for KEYCODE_PROFILE_SWITCH and KEYCODE_ALL_APPS in
Generic.kl.

Bug: 223113454
Test: atest GoogleAtvReferenceRemoteControlTest
Change-Id: Ife171662224e520dea249ce03675c278adf67870
2022-03-24 17:13:51 +00:00
Vadim Caen
6a074eca5c Improve startBackNavigation stability
- Use the focused window instead of the topApp window
    - Instead we now rely on WindowManagerService to get
     the focused window.
    - SystemUI does not have ActivityRecord so we can't rely
     on the top window of the Task to find the correct
      window on which the callback will be called.

  - Introduce a Builder for BackNavigationInfo
    - This reduces the number of variable needed outside the synchonized
    block.
    - It also reduces the number of early return of BackNavigationInfo
    instances

  - Adding log messages to help further debug the method.

Test: BackNavigationControllerTests
Test: Manual dismiss of SystemUi dialog in QS
Bug: 216604581
Fixes: 221458292
Change-Id: I9ba2c7f89956f34d6338824502c210b3e58dc076

Introduce builder for BackNavigationInfo

Change-Id: I14b4a4b3abc8f417998b7b32831cb3d5c4faa491
2022-03-24 14:14:26 +01:00
Chris Li
94d10aec87 Merge "Disable all input on ActivityRecord during trusted animation" into tm-dev 2022-03-24 07:35:28 +00:00
Evan Rosky
7ca26cc4d7 Merge "Move the pendingTransaction stuff into BLASTSyncEngine" into tm-dev 2022-03-23 23:13:01 +00:00
Chris Li
a3e1134c46 Merge "Disable all input on ActivityRecord during untrusted animation" into tm-dev 2022-03-23 13:47:59 +00:00
Chris Li
b4c0c4e81b Disable all input on ActivityRecord during trusted animation
As a followup to ag/17258046, since we don't have any use case to
rely on handling input during animation, disable input even if it
is trusted embedding so that it could cover some edge-cases when
a previously truste host starts doing something bad.

Bug: 197364677
Test: atest WmTests:AppTransitionControllerTest
Change-Id: I7312b6ed961891c5c58adad73f660d4a18084c52
2022-03-23 17:49:56 +08:00
Chris Li
a53b05ca8c Disable all input on ActivityRecord during untrusted animation
For cross-process embedding, there can be activity of other app embedded
in untrusted mode. When it happens, we need to disable all input on the
Task if we are going to play client-driven animation to make sure the
host client can't abuse the animation leash.

Bug: 197364677
Test: atest WmTests:AppTransitionControllerTest
Change-Id: I3e299c0a43ac823b7df6af9d02c7168bd65d3271
2022-03-23 10:01:40 +08:00
Evan Rosky
35c049de96 Move the pendingTransaction stuff into BLASTSyncEngine
The functionality has morphed since its original transitions-only
incarnation. Now it is a general queue mechanism for SyncEngine.

So, move it into BLASTSyncEngine and clean-up the abstraction
a little-bit. This should make it more usable for some upcoming
fixes.

Bug: 222033492
Test: existing tests pass (just a refactor)
Change-Id: Ia057e816ad5635e9681d3273d139e494c18216d9
2022-03-22 16:01:49 -07:00
Issei Suzuki
f51bb0783b Merge "Migrate DEBUG_ANIM logcat message to ProtoLog." into tm-dev 2022-03-22 18:19:19 +00:00
TreeHugger Robot
697afc9660 Merge "Move DEBUG_INPUT_METHOD logs into proto logs for debugging IME snapshot" into tm-dev 2022-03-22 14:40:16 +00:00
Chris Li
6cc0fa4d00 Merge "Reparent ImeContainer under parent when organized." into tm-dev 2022-03-22 07:32:39 +00:00
Issei Suzuki
f3732b4991 Migrate DEBUG_ANIM logcat message to ProtoLog.
Added more log messages around animatingExit.

Bug: 205335975
Test: Existing builds and tests pass.
Change-Id: I4461eddd4a24c7bba1adef1571ce0fbf6d7db0a2
2022-03-21 14:00:13 +01:00
Ionut Hulub
8bda50023d Reparent ImeContainer under parent when organized.
If, for whatever reason, the SystemUI process crashed and restarted,
the IME wasn't functional anymore (it would not become visible).

That happened because, after the SystemUI crash, the IME was
unorganized for a while and the framework reparented its surface
under an activity.

With this commit we fix this issue by reparenting the IME under its
parent when it becomes organized again.

Manual Test: Checked that the IME becomes visible after a systemui
             crash.
Test: atest DisplayContentTests
      #testImeContainerIsReparentedUnderParentWhenOrganized
Bug: 224800157
Change-Id: I303baf96c905a9c4b444189b731f63c7d51a11f2

Change-Id: I4d2934516e528bf353395e1759f59612542bdb56
2022-03-21 16:16:20 +08:00
Ming-Shin Lu
db1e72190f Move DEBUG_INPUT_METHOD logs into proto logs for debugging IME snapshot
Bug: 224664116
Test: build, verify with enabling proto log:
 adb shell wm logging enable WM_DEBUG_IME, see if IME snapshot logs
 printed.

Change-Id: Ia61e6f3955178d9a4deb68ba1d8ae7d4ebb341d1
2022-03-21 15:32:42 +08:00
Jack He
9d8b6c7b32 Merge "Shell: Grant BLUETOOTH_PRIVILEGED permission to Shell" am: 69e560995c am: eada5871f4 am: 384882aada
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031463

Change-Id: Id694d0b7240a3ffb757b9ba0f87469b97aca0dd8
2022-03-19 00:55:12 +00:00
Jack He
384882aada Merge "Shell: Grant BLUETOOTH_PRIVILEGED permission to Shell" am: 69e560995c am: eada5871f4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031463

Change-Id: I82645039ddaa7514992d3967b9a64efc77444896
2022-03-19 00:35:45 +00:00
Beth Thibodeau
77472b3e78 Merge "Revert^2 "Use compat framework to gate session actions"" into tm-dev 2022-03-18 19:56:38 +00:00
Jack He
fedd79c9d7 Shell: Grant BLUETOOTH_PRIVILEGED permission to Shell
* So that we can run CTS test with Shell permission

Bug: 225250442
Test: make
Change-Id: I9bf52d9325732c8ea1fef102591da1198b8c4fae
2022-03-18 00:33:22 -07:00
Naomi Musgrave
4b563a2d37 Merge "Capture the contents of a single task" into tm-dev 2022-03-17 17:03:48 +00:00
Beth Thibodeau
a14e2883b5 Revert^2 "Use compat framework to gate session actions"
This adds ag/17208491 (check compat change with UserHandle) to the
original change

da972b8c711698476b82665703bec53dce19d3cd

Bug: 220034304
Test: manual
Test: make tradefed-all javac-check -j64 RUN_ERROR_PRONE=true
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.media.QSMediaPlayerContent

Change-Id: Ibaec0c9a0443fd3b0f2c5fae7c74b2110371b425
2022-03-16 13:56:51 -04:00
Andrei-Valentin Onea
61189993a0 Merge "Revert^2 "Move out allowlists for com.android.cellbroadcast"" into tm-dev 2022-03-16 14:05:43 +00:00
Miguel Aranda
f9b72c1f9e Merge "Revert "Use compat framework to gate session actions"" into tm-dev 2022-03-16 11:45:14 +00:00
Miguel Aranda
da972b8c71 Revert "Use compat framework to gate session actions"
Revert "Update media flag descriptions"

Revert submission 17161599-b220034304-media-compat

Reason for revert: This seems to cause the break in b/224895002
BUG: 224895002
Reverted Changes:
Ifeecb4e13:Update media flag descriptions
Ie032fe9ec:Use compat framework to gate session actions

Change-Id: I8b309a69282f41b4a45bd82bd3dcc9f85751da7e
2022-03-16 11:34:51 +00:00
Andrei Onea
97cc1818c4 Move out PermissionController allowlist entries
These entries will now be bundled inside the apex instead.

Test: boots
Bug: 190375768
Change-Id: Ifa1479051ed60687b88e1eea1a4153dc93db4760
2022-03-15 20:22:55 +00:00
TreeHugger Robot
96a7b9ee75 Merge "Use compat framework to gate session actions" into tm-dev 2022-03-15 17:03:06 +00:00
Naomi Musgrave
13194c3ca4 Capture the contents of a single task
Introduces layer mirorring of a single task, given the task is both
identified (future work - dependency on setup flow in SysUI) and the
flag is enabled (currently disabled).

Error handling (tearing down the VirtualDisplay if task recording setup failed)
will come in a future change

Bug: 216625226
Test: atest WmTests:DisplayContentTests
Test: atest WmTests:ContentRecorderTests
Change-Id: I16abd55ce75537ff8fbbb379e4970668ea02a230
2022-03-15 14:13:11 +00:00
Shan Huang
7c722ca403 Merge "Implement back to launcher animation from shell and WM animation controllers." into tm-dev 2022-03-15 05:38:25 +00:00
Etan Cohen
19b2879e24 Merge "Add MANAGE_WIFI_INTERFACES to the shell permission" am: dc2f8bfaee am: 8dcf52fdd9 am: ab6b6abfcd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2021397

Change-Id: I9356201e6a6817e3ab69c196e2f86ab622cc4c53
2022-03-15 00:21:17 +00:00
Etan Cohen
ab6b6abfcd Merge "Add MANAGE_WIFI_INTERFACES to the shell permission" am: dc2f8bfaee am: 8dcf52fdd9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2021397

Change-Id: I30705a0db0969c8bafbaa827761a25aca815d455
2022-03-15 00:05:02 +00:00
Beth Thibodeau
85dddfc3c6 Use compat framework to gate session actions
Adds CompatChange to check if an app posting media controls targets T,
and if so, that app's controls will use PlaybackState actions.
Otherwise, the notification actions will be used.

The MEDIA_SESSION_ACTIONS flag is set to false by default, and can be
used to override this and use session actions for all apps.

Fixes: 220034304
Test: atest com.android.systemui.media
Test: manual - verify in developer settings, override behavior works

Change-Id: Ie032fe9ec8ce7d46b1f9dc8f590ed6fbfa7ee9aa
2022-03-14 19:46:19 -04:00
Shan Huang
0e9d709e2f Implement back to launcher animation from shell and WM animation
controllers.

Test: m -j.
Test: Open and swipe back on pre-T and T apps.
Test: atest BackNavigationControllerTests
Test: atest BackAnimationControllerTest
Bug: 195946584

Change-Id: I981f8deff9fad75355ee0e8bbe08b375f4da6e74
2022-03-14 23:12:41 +00:00
Etan Cohen
dc2f8bfaee Merge "Add MANAGE_WIFI_INTERFACES to the shell permission" 2022-03-14 23:03:25 +00:00
TreeHugger Robot
8ee22a3455 Merge changes from topic "da-rearc" into sc-v2-dev-plus-aosp
* changes:
  [automerge] DO NOT MERGE add android.car.permission.CONTROL_CAR_APP_LAUNCH permission 2p: f7b9a4dd28
  DO NOT MERGE add android.car.permission.CONTROL_CAR_APP_LAUNCH permission
2022-03-11 05:08:36 +00:00
Oscar Shu
6793c6fd69 Merge "Rename MANAGE_WIFI_AUTO_JOIN to MANAGE_WIFI_NETWORK_SELECTION" am: 2349f6f641 am: 64c4227b11 am: c917ab08d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2019225

Change-Id: If94a79731f5a7605717e10cf978f9c42b78cea11
2022-03-11 01:32:42 +00:00
Oscar Shu
c917ab08d9 Merge "Rename MANAGE_WIFI_AUTO_JOIN to MANAGE_WIFI_NETWORK_SELECTION" am: 2349f6f641 am: 64c4227b11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2019225

Change-Id: I532f058cee7aaa0142fdcbb1bc1108e5e05daa88
2022-03-11 01:12:09 +00:00