Commit Graph

21063 Commits

Author SHA1 Message Date
Evan Severson
b88fa4135b Merge "Don't block intent if op is restricted due to toggles" into sc-dev am: 2b11e7f25c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15245178

Change-Id: I6e6fea3721aed83e38d3b70f570036c1b3c72c03
2021-07-21 17:26:21 +00:00
Evan Severson
2b11e7f25c Merge "Don't block intent if op is restricted due to toggles" into sc-dev 2021-07-21 17:10:21 +00:00
Evan Severson
7b6d643171 Don't block intent if op is restricted due to toggles
Test: Create sdk 22 and 30 test apps and use the MEDIASTORE intents
Bug: 192635623
Change-Id: I250a5e398e72919ec8217e87b76273082e781f63
2021-07-21 08:37:00 -07:00
Andrii Kulian
85986bf974 Split activity organizer in WM Extensions
Reference implementation for the client-side organizer
for side-by-side split activity UI.

Bug: 190433398
Bug: 190432728
Bug: 190433500
Bug: 190433972
Bug: 191163577
Bug: 191163638
Test: Manual, using the sample in WM Jetpack
Change-Id: I27335d47f4f544e2b9f63c5daaac9bd1c272a89f
2021-07-20 20:31:10 -07:00
Andrii Kulian
1e2187cfea Add hidden ATM method to use in TaskFragmentOrganizer
getActivityBelow() is necessary to check if a split rule should
be applied for two activities on top of each other. This will
only report an activity that belongs to the same process.

When an application starts an activity B on top of an existing
activity A normally, there might be a split rule to put them
side-by-side. Organizer needs to know that activities A and B
are on top of each other to check, so it can either intercept
new activity launch or observe it after it happens and check the
rules then. The second approach results in a cleaner implementation,
but it also means that the organizer needs a reliable way to check
which activity is directly below the launched one. There is no
reliable source of info for that on the client side yet.

Bug: 190433398
Bug: 190433500
Test: Manual, using the reference implementation of the organizer.
Change-Id: I0e0116b1b0144e0ba4d19039d78c34495fbe4457
2021-07-20 17:46:55 -07:00
Shuo Qian
c45b4a0a53 Merge "Change the doc to reflect the default status of preferential network service" into sc-dev am: c03fb15e29
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15329706

Change-Id: Id3afae60a414750b735d171cc679122418465f99
2021-07-20 17:00:33 +00:00
Shuo Qian
2be8f7898d Change the doc to reflect the default status of preferential network service
Test: Build
Bug: 193913733
Change-Id: I648b85c39f9b4e66193188852d649e82371ee90c
2021-07-19 23:24:55 +00:00
Evan Rosky
6139cf51b2 Create a LegacyTransitions to manage combined WCT + remoteanimation
Use this to implement Drag-to-split transition

BYPASS_INCLUSIVE_LANGUAGE_REASON=using existing API.

Bug: 192291727
Test: drag from taskbar into split and observe. Also,
      drag same-app into split and observe no-op.
Change-Id: I710805c85c7d57ae8eebe18e5df7fca899f1b882
2021-07-16 19:06:14 -07:00
TreeHugger Robot
22b36a7a66 Merge "Don't allow PI crashes on unknown sender types" into sc-dev am: e0c972a2be
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15245014

Change-Id: I4dd8731a59b58e7376283eb41ae0e7185183566b
2021-07-16 01:51:54 +00:00
TreeHugger Robot
e0c972a2be Merge "Don't allow PI crashes on unknown sender types" into sc-dev 2021-07-15 03:14:15 +00:00
Hongwei Wang
ebe8550d03 Fix letterbox issue when auto-enter-pip from landscape
Included in this CL
- Skip layout of window when in transition to PiP mode
- Pass display cutout info via TaskInfo
- Removed TaskInfoCompat

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bpKcGg1eoOo5Jz5U6IwBYK
Bug: 191310680
Test: manual, auto-enter-pip from landscape with source rect hint being
      turned on, see the video
Change-Id: Ie657d15d9edb9d07555bd166b5919bb12cb217e6
Merged-In: Ie657d15d9edb9d07555bd166b5919bb12cb217e6
2021-07-13 15:07:18 -07:00
Hongwei Wang
70dd96cea7 Fix letterbox issue when auto-enter-pip from landscape
Included in this CL
- Skip layout of window when in transition to PiP mode
- Pass display cutout info via TaskInfo
- Removed TaskInfoCompat

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bpKcGg1eoOo5Jz5U6IwBYK
Bug: 191310680
Test: manual, auto-enter-pip from landscape with source rect hint being
      turned on, see the video
Change-Id: Ie657d15d9edb9d07555bd166b5919bb12cb217e6
2021-07-13 14:59:52 -07:00
TreeHugger Robot
192785cba9 Merge "Apply pending AppInfo on Activity override change" into sc-dev am: d2dd630204
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15260966

Change-Id: I65f9630fe8c10ed833292cb1c609cacac3fcf343
2021-07-13 00:02:52 +00:00
TreeHugger Robot
d2dd630204 Merge "Apply pending AppInfo on Activity override change" into sc-dev 2021-07-12 23:46:03 +00:00
TreeHugger Robot
496e98d41b Merge "Remove isAppStartModeDisabled binder entry point" into sc-dev am: f59bf68628
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15246166

Change-Id: Ic847445732f37587b8b03713b7cb1451ae0ce1af
2021-07-12 22:30:52 +00:00
TreeHugger Robot
f59bf68628 Merge "Remove isAppStartModeDisabled binder entry point" into sc-dev 2021-07-12 22:14:30 +00:00
Ryan Mitchell
290e51fce3 Apply pending AppInfo on Activity override change
When the activity override configuration changes, we need to apply any
pending application info changes so that when the activity is
recreated, it will have updated overlays.

Bug: 193256671
Test: change live wallpaper and observe launcher colors
Change-Id: I6b8c25a6e6756f612a0f57c921625bc58ac1ecf6
2021-07-12 22:00:43 +00:00
Jeff DeCew
e390215973 Merge "Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton" into sc-dev am: d14c60be51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237912

Change-Id: Ie1b2c82414463188f6a9404a2ad3015290e07c94
2021-07-12 19:55:51 +00:00
Jeff DeCew
d14c60be51 Merge "Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton" into sc-dev 2021-07-12 19:48:58 +00:00
Charles Chen
427a66fa71 Merge "Send DA's config directly when attaching to DA" into sc-v2-dev 2021-07-10 05:02:32 +00:00
TreeHugger Robot
c4fe42e347 Merge "Optimize AttributionSource tokens - base" into sc-dev am: 2b90cc827b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15247205

Change-Id: I4b1d8d446ea18a308c4a523298682b3a7d217421
2021-07-10 02:27:03 +00:00
Svet Ganov
1babd5bf51 Optimize AttributionSource tokens - base
For cases where the attribution soruce doesn't need to be
registered as trusted we are now using a shares static
token since the only purpose of the token in these cases
is for watching the source process dying as opposed to that
and security for registered cases.

bug: 192415943

Test: CtsPermissionTestCases
      CtsPermission2TestCases
      CtsPermission3TestCases
      CtsPermission4TestCases
      CtsPermission5TestCases

Change-Id: I93fde9ca1cacada7929761533dcae11b2736ce1e
2021-07-10 00:24:30 +00:00
Christopher Tate
6054148ef9 Remove isAppStartModeDisabled binder entry point
Obsolete: the use cases for which it was introduced now have a clean
internal API layer to use instead, and this reduces informational
exposure about package presence & states.

Bug: 185513355
Test: atest SyncManagerTest
Test: atest CtsSyncManagerTest
Change-Id: I4aa1848950061dce3a1378f7d0117364e62ba59f
2021-07-09 14:28:37 -07:00
Jeff DeCew
8d6f3cc158 Use SRC_ATOP instead of SRC_IN for blending the NotificationExpandButton
Bug: 191969252
Bug: 193157438
Test: check for number of layers in the scene
Change-Id: I65bd80c71b55582347da1559cf707e9d023b7f13
2021-07-09 15:40:31 -04:00
Soonil Nagarkar
8fba7cf989 Don't allow PI crashes on unknown sender types
Bug: 193207800
Test: presubmits
Change-Id: I2a674549f4cfe45841dc0094709666c25c2d743b
2021-07-09 09:08:47 -07:00
Amith Yamasani
4993c552e7 Merge "Fix FGS notification mismatch" into sc-dev am: 9eed97ac10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15226946

Change-Id: Ib6cae8c9e8fbb1361da3555074eabc803f23878d
2021-07-09 02:01:45 +00:00
Amith Yamasani
9eed97ac10 Merge "Fix FGS notification mismatch" into sc-dev 2021-07-09 01:45:59 +00:00
Chris Li
c769062301 Merge "Revert "Revert "Not show size compat UI when task is not visible""" into sc-dev am: 50c03ea7ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237129

Change-Id: I8c2e257e5a2b7d89814288d5d8cd2e24af76c722
2021-07-08 22:03:19 +00:00
Chris Li
a23a2bb5db Revert "Revert "Not show size compat UI when task is not visible""
This reverts commit 76370b6fe6.

Reason for revert: Fix the merge break in ShellTaskOrganizerTests.java

Fix: 193069342
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I02c4bddc407eaac0ebb7cd5abb0b394f242d4d6e
2021-07-08 12:09:40 -07:00
Chris Li
e7ed99bfc2 Merge "Remove TaskInfo#topActivityToken usage in size compat for security" into sc-dev 2021-07-08 18:05:40 +00:00
Evan Rosky
5ca3820ae6 Hook up split-launch to legacy transition system
Part 1 of hooking up stage-split to legacy stuff. This
actually routes the legacy remoteAnimation through shell
in order to gather the dividerbar and interract with the
WindowProcessController

Bug: 192279476
Test: atest WindowOrganizerTests.
      use SPLIT_SELECT to launch 2 apps in split and observe.
Change-Id: I4f8802e6eb33f068fae0e4b3c12942bea76e332b
2021-07-08 09:02:59 -07:00
Bernardo Rufino
bef6e7a3c6 Merge "Require proper permission for togglePanel()/handleSystemKey()" into sc-dev am: 6b1896db4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15216476

Change-Id: Ibba7df55a23bffb6ff0a28322f242278c9a0d8cf
2021-07-08 10:30:42 +00:00
Leon Jeng
979db138fe Revert "Not show size compat UI when task is not visible" am: 76370b6fe6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15232572

Change-Id: Ib61cabd6c4d77d4fa5cd3f64b2272fcd684db153
2021-07-08 10:01:44 +00:00
Leon Jeng
76370b6fe6 Revert "Not show size compat UI when task is not visible"
This reverts commit adb92508c0.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=coral-userdebug&lkgb=7530814&lkbb=7530923&fkbb=7530923, bug b/193105445

Bug: 193105445
Change-Id: I697229da6986d6466d7f13872e9ae7a727b80838
2021-07-08 09:48:10 +00:00
Chris Li
2d8b03190d Merge "Not show size compat UI when task is not visible" into sc-dev am: 927c644bfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225378

Change-Id: Ic80035d84e4e2f2a5471bd4f85cc90ff61cda49f
2021-07-08 07:01:54 +00:00
Chris Li
927c644bfa Merge "Not show size compat UI when task is not visible" into sc-dev 2021-07-08 05:53:15 +00:00
Chris Li
1245aefa49 Remove TaskInfo#topActivityToken usage in size compat for security
Security report shows that this can cause leak token of different app.

Replace the functionality with a callback to the TaskOrganizerController
to restart activity when size compat restart button is clicked.

Bug: 186776724
Test: manually verify the restart button still works
Change-Id: I097b9f02e8435e6765695b9d5a531a4e165bac66
Merged-In: I097b9f02e8435e6765695b9d5a531a4e165bac66
2021-07-07 21:09:24 -07:00
Christopher Tate
ac4c63c682 Fix FGS notification mismatch
Mistakenly matching against id alone, rather than the (id,tag) tuple,
led to some notifications mistakenly being flagged as FGS-related.

Bug: 191518901
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Test: atest CtsAppTestCases:android.app.cts.NotificationManagerTest
Test: manual
Change-Id: I11c3993c13ded7859a5a860dcc99728f3db9809f
2021-07-07 19:15:08 -07:00
Chris Li
adb92508c0 Not show size compat UI when task is not visible
Before, when a size compat task was hidden, the size compat UI might
still be showing. Now, remove the UI when the task is no longer visible.

Bug: 193069342
Test: manually verify the size compat button is not showing in recents
Change-Id: Ia17a97f5e7a9af497d8da16b31bb5169dd502d53
2021-07-07 17:46:08 -07:00
Chris Li
ae54032e9a Remove TaskInfo#topActivityToken usage in size compat for security
Security report shows that this can cause leak token of different app.

Replace the functionality with a callback to the TaskOrganizerController
to restart activity when size compat restart button is clicked.

Bug: 186776724
Test: manually verify the restart button still works
Change-Id: I097b9f02e8435e6765695b9d5a531a4e165bac66
2021-07-07 12:50:53 -07:00
Bernardo Rufino
224dd7ca0d Require proper permission for togglePanel()/handleSystemKey()
In S, we're preventing apps from closing notification shade unless they
fall into certain exemptions. The methods togglePanel() and
handleSystemKey() weren't properly protected, so fixing that.

These methods were @hide, only available in the AIDL and their only
usages were inside the system

Introducing @TestApis to be able to verify this in CTS.

Bug: 192946152
Test: atest -d CtsAppTestCases:android.app.cts.StatusBarManagerTest
Test: atest -d CtsLegacyNotification30TestCases:android.app.notification.legacy30.cts.StatusBarManagerApi30Test
Test: 1. adb shell input keyevent KEYCODE_SYSTEM_NAVIGATION_DOWN
      2. Verify status bar expands
      3. adb shell input keyevent KEYCODE_SYSTEM_NAVIGATION_UP
      4. Verify status bar collapses

Change-Id: I925e3570c8d275a1159e4b6912e4628c9528cb61
2021-07-07 11:12:50 +01:00
Riddle Hsu
ee37f56c37 Merge "Fix NPE caused by config change on a destroyed activity" into sc-v2-dev 2021-07-06 11:59:57 +00:00
Riddle Hsu
9a2454c595 Fix NPE caused by config change on a destroyed activity
The config callback from view root may not know the state
of activity. That may trigger a stale callback, so
 - Restore the null check when getting mSizeConfigurations.
 - Clear the callback if the activity will be removed.

Bug: 192603207
Test: ActivityLifecycleTopResumedStateTests
Change-Id: I17ea8fc2ba994f630d5ad7baa3de298d90a32827
2021-07-06 12:36:39 +08:00
Alex Johnston
540cfa9bbf Merge "Update API contract PASSWORD_COMPLEXITY_LOW" into sc-dev am: 61a9cafe83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156192

Change-Id: I200f120fdacc35b63423c4217de2bb6d09f9d442
2021-07-05 09:09:55 +00:00
Alex Johnston
61a9cafe83 Merge "Update API contract PASSWORD_COMPLEXITY_LOW" into sc-dev 2021-07-05 08:56:48 +00:00
Charles Chen
eb07884f01 Send DA's config directly when attaching to DA
WindowContext relies on WindowTokenClient#onConfigurationChanged after
calling WMS#attachWindowContextToDisplayArea.
However, it took some time to wait for onConfigurationChanged callback
from the server side so that we may get a stale value right after
creating WindowContext.
This confuses developers especially when the foreground activity is in
size compat mode or freeform because the process config is overridden
by activity's config.
This CL makes #attachWindowContextToDisplayArea return DA's configuration
and applies to WindowContext direcly.
It also benefits WindowProviderService because it can obtain DA's
 configuration before onCreate() based on [1] and this CL.

Bug: 190019118
Bug: 190745506
Test: manual - 1. launch an Activity in size compat mode
               2. create a WindowContext and verify if WindowMetrics
                  matches DA bounds.
Test: atest WindowContextTest WindowContextTests
Test: atest WindowContextControllerTest ContextGetDisplayTest
[1]: dd4a748af0

Change-Id: I8dd3987b731662502bc01e9d2ed67e718ada5f46
2021-07-05 14:02:02 +08:00
TreeHugger Robot
57ef687087 Merge "Add OPSTR_RECORD_AUDIO_HOTWORD to TestApi" into sc-dev am: 881dc456c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15166612

Change-Id: I5607b1df1e275ac5d3bf0f2a0bf75e67521b1cd6
2021-07-03 10:45:17 +00:00
TreeHugger Robot
881dc456c8 Merge "Add OPSTR_RECORD_AUDIO_HOTWORD to TestApi" into sc-dev 2021-07-03 10:30:16 +00:00
Alex Johnston
abc113dccb Update API contract PASSWORD_COMPLEXITY_LOW
* Mention any PIN is allowed, not necessarily
  just ordered or repeating PINs.
* Mention alphanumeric and alphabetic passwords
  are allowed.

Bug: 181873824
Test: build
Change-Id: Iac75dbdde18de39e0b66ab03463830f5b4f28033
2021-07-02 22:20:19 +01:00
TreeHugger Robot
c505abbf84 Merge "Do not update RM config with previous sequence" into sc-dev am: 9b1891b428
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15190447

Change-Id: Id2d6ce9139d214fb172b7fe789b11367ef201fb0
2021-07-02 20:46:59 +00:00