Commit Graph

2352 Commits

Author SHA1 Message Date
Chris Li
abdb320b70 Merge "Don't start app transition when there is empty TaskFragment" into sc-v2-dev 2021-09-24 03:34:03 +00:00
Keun young Park
5ffbc2c1c5 add CONTROL_APP_BLOCKING permission to car ks app.
- This is for testing purpose.

Bug: 193247516
Test: build, check boot up
Change-Id: I6c6d860a4b884d8856ede3aa4c73c64a9c568dd5
Merged-In: I6c6d860a4b884d8856ede3aa4c73c64a9c568dd5
(cherry picked from commit d8a331bdcb)
2021-09-23 23:39:44 +00:00
Chris Li
c6ab0bb710 Don't start app transition when there is empty TaskFragment
TaskFragment can be empty for either 1. wait for new launch activity, or
2. last activity just removed.

For 1, we want to wait for the activity launch.
For 2, we want to wait for organizer to remove the TaskFragment.

Bug: 196173550
Test: atest WmTests:AppTransitionControllerTest
      #testTransitionGoodToGoForTaskFragments
Change-Id: I73ac239ef2e5a75d05af6f6ae97e3f2278ebb4c3
2021-09-23 21:53:55 +08:00
Vishnu Nair
d6f2c5882f WM: Handle primary display orientation when calculating the transform hint
Query the surface flinger property
ro.surface_flinger.primary_display_orientation to determine the
primary display's install orientation. If the window is on the
primary display, then update the transform hint passed on to the
client.

Bug: 196167822
Test: check initial buffer transforms on displays with a different
install orientation

Change-Id: Idf010cd6be73172ba708820f87046c3ba3cf8001
2021-09-22 17:06:10 +00:00
Evan Rosky
e7b6834733 Merge "Don't let IME move to recents activity during recents transition" into sc-v2-dev 2021-09-13 19:37:56 +00:00
Rui Qiu
936f28842e Merge "[RESTRICT AUTOMERGE][CarTelemetryService] Add permission to kitchen sink for CarServiceTest" into sc-v2-dev 2021-09-08 17:04:49 +00:00
Evan Rosky
e02fc4cbba Don't let IME move to recents activity during recents transition
In shell transitions, recents opens on top, but in transient mode
(meaning it doesn't cause the other apps to pause). This means the
other apps should be running un-interrupted. This includes not
taking the IME away.

To handle this, adjust the IME logic so that transient-launching
activities are NOT canBeImeTarget.

Also fix a bug in isVisibleOrAdding where it was using
visibleRequested instead of visible (if you look at the change
history, !hiddenRequested was incorrectly replaced by
visibleRequested instead of visible).

Also fix a bug where a defer/continue of updateImeTarget was
updating the target even when an update was never requested while
it was deferred. This was causing it to be called prematurely
during activitystarter (where global lock is held).

Bug: 193565597
Test: atest ReOpenImeWindowTest SwitchImeWindowsFromGestureNavTest
Change-Id: Ic537d77c8b0e10e80444dd46d7b49e5a9bd63d6c
2021-09-07 11:33:50 -07:00
Rui Qiu
2fbcfd327b [RESTRICT AUTOMERGE][CarTelemetryService] Add permission to kitchen sink for CarServiceTest
Adds the USE_CAR_TELEMETRY_SERVICE permission to the allowlist.
This permission is needed for CarTelemetryManagerTest to pass. Otherwise
there will be a security exception whenever the CarTelemetryManager API
is invoked.

Bug: 198309792
Test: atest CarServiceTest:CarTelemetryManagerTest in ag/15752577

Change-Id: I4f95c71f0d9c1891f600e83f7f90f33144300a5c
2021-09-07 18:29:12 +00:00
Naomi Musgrave
fcef782559 [MediaProjection] Do not start layer mirroring without a surface
An app may pass a null surface to MediaProjection#createVirtualDisplay,
and later set the surface on the VirtualDisplay. The display's state
will change from off to on when the surface is set.

When determining if layer mirroring should be started/updated in
DisplayContent, take the presence of the surface/display state
into account, to prevent the app from crashing.

Bug: 197863746
Test: atest WmTests:DisplayContentTests
Change-Id: I01af07fff681aab6fc8235c861375eb79118cbfe
2021-09-03 14:42:52 +01:00
Chris Li
9541f4a48a Merge "Allow TaskFragmentOrganizer to set remote animation" into sc-v2-dev 2021-08-31 17:49:33 +00:00
Ming-Shin Lu
6902904e97 Refine WindowInsets logs
- Add WM_DEBUG_WINDOW_INSETS ProtoLogGroup to use for logging
  general Insets logs in WM core.
- Refine InsetsSourceProvider#updateVisibility proto log format
  to add insets type information.
- Add InsetsSurceControl#toString to print control target info.

Bug: 197189357
Test: adb shell wm logging enable-text WM_DEBUG_WINDOW_INSETS
Test: atest ProtoLogImplTest \
            ProtoLogViewerConfigReaderTest \
            WmTests:ProtoLogIntegrationTest \
            LogDataTypeTest \
            protologtool-tests
Change-Id: I1f01ce4d9fe5cb17f7bd60a424689260682b1dfc
2021-08-30 22:43:46 +08:00
TreeHugger Robot
a1a0c3c59a Merge "Grant CHANGE_COMPONENT_ENABLED_STATE permission for CarLauncher app." into sc-v2-dev 2021-08-28 01:44:15 +00:00
Chris Li
14ac35839a Allow TaskFragmentOrganizer to set remote animation
When all windows in the transition is belong to organized TaskFragments,
have the TaskFragmentOrganizer to control the animation on client side.

Bug: 196173550
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Test: atest WmTests:AppTransitionControllerTest
Change-Id: I835467e23863286a5bd34380424cc9eca2c7372f
2021-08-27 12:02:45 -07:00
Lakshman Annadorai
4e537fb6c1 Grant CHANGE_COMPONENT_ENABLED_STATE permission for CarLauncher app.
Test: Launcher can enable apps.
Bug: 195697674

Change-Id: Iea613b997921934b2d8b0b29f699a266838fa4b9
2021-08-26 16:48:48 +00:00
Louis Chang
40fc6de5a7 Keeps the intercepted activity on the existing secondary container
When intercepting an activity start request, a new split pair
was always created and launch the activity to the side of the
caller activity.

This CL launches the activity on top of the caller activity
if the caller activity is already on the secondary container.

This is needed for the case that the activity is started
into a new Task, or new Task will be escaped from the current
host Task and be displayed in fullscreen.

However, the interception won't work if the activity is started
from another process.

Also adding logs for TaskFragment errors.

Bug: 194997356
Test: manually, start activity with sample app
Change-Id: I268c1dad191cdfdbf48cac84e18f1dfda761b0d3
2021-08-13 13:47:06 +08:00
Chris Li
8c67051b97 Do not preload recents activity if it will be visible
Before, even if the launcher was not launched, RecentsAnimation would
start the activity in background as invisible. It would cause issue
because ensureVisibility would make it visible because there is no
opaque activity on top, while that may not be collected in any app
transition.

Now, in case the recents activity should be visible, we ignore the
 preload recents activity.

Bug: 193565751
Test: pass failed launcher test
Change-Id: I93f5a716177bcbf69f5e4d5915826bd9f61f53a4
2021-07-20 23:48:51 -07:00
Evan Rosky
466cda4ec3 Add multi-display support to shell transitions
This tracks ready state in groups. Currently the groups are
display-contents (to match legacy transitions). The transition
will be considered ready when all groups are ready.

This also adds a couple of inTransition checks in places that
are used by CTS tests.

Bug: 183993924
Test: atest MultiDisplaySystemDecorationTests
Change-Id: Iea81b3c689d948d60aa8e1a2d3bf168723058a2f
2021-07-11 17:49:36 -07:00
Grace Cheng
34f39c86ba Merge "Grants WRITE_SECURE_SETTINGS permission to AdasLocationTestApp" into sc-v2-dev 2021-07-09 23:53:49 +00:00
Nikita Ioffe
454d31beff Merge "Grant INSTALL_PACKAGE_UPDATES permission to Shell" into sc-dev am: 1d2cbb6f50
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15235316

Change-Id: Ia145803bd4b9db56e12833ec324a77d9fd313bf1
2021-07-09 11:42:34 +00:00
Louis Chang
cac8caf2bd Merge "Allow changing focus between embedded activities in a Task" into sc-v2-dev 2021-07-09 05:08:42 +00:00
Nikita Ioffe
65eb22cc56 Grant INSTALL_PACKAGE_UPDATES permission to Shell
Bug: 188062003
Test: m
Change-Id: I342f64e666afa4202b8af69f04d64b05d40fac40
2021-07-09 00:52:08 +01:00
Grace Cheng
be8d77ab5c Grants WRITE_SECURE_SETTINGS permission to AdasLocationTestApp
Test: manually.
Bug:191180940

Change-Id: I2bd96a9a87fdbb079b1182a4c36f5a212732447e
2021-07-08 23:44:14 +00: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
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
Louis Chang
73d277117d Allow changing focus between embedded activities in a Task
The focused window was determined by looking up the focusable windows
from top to bottom.

In order to switch the focus between the embedded activities in the
same leaf Task without reordering the position of the activities, the
focused app can also be updated based on the window that user was
touched, and the focusable windows that were on other TaskFragment
in the same Task cannot be focused.

Bug: 189385926
Test: changing focused app by touching embedded activity
Change-Id: Id84461572cc768f474ffa313da1c10ff4010408e
2021-07-08 11:37:47 +08: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
TreeHugger Robot
dbd662eb1e Merge "Add READ_PRIVILEGED_PHONE_STATE to dialer" into sc-dev am: b3075bc5dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14908986

Change-Id: Ib142f1e5a7df1631341295058a5a6a8660666b32
2021-07-01 21:48:48 +00:00
TreeHugger Robot
b3075bc5dc Merge "Add READ_PRIVILEGED_PHONE_STATE to dialer" into sc-dev 2021-07-01 21:45:06 +00:00
TreeHugger Robot
660f78ebf8 Merge "Give Shell the NOTIFY_PENDING_SYSTEM_UPDATE permission" into sc-dev am: 69a0939764
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15107816

Change-Id: If6acdea694ed3ba9972ec1bccd05b514a42125c3
2021-06-29 17:03:52 +00:00
TreeHugger Robot
69a0939764 Merge "Give Shell the NOTIFY_PENDING_SYSTEM_UPDATE permission" into sc-dev 2021-06-29 16:57:01 +00:00
Alex Kershaw
1f5ef8e31d Give Shell the NOTIFY_PENDING_SYSTEM_UPDATE permission
This is required for GTS testing it, rather than having to instrument
GMS Core.

Bug: 182271592
Test: tested as part of other CLs in this topic
Change-Id: Id56e0d206afe0a9069d1510a3dae9a07141fff60
2021-06-29 11:52:04 +01:00
Kohsuke Yatoh
200f796356 Merge "Extract flag font from NotoColorEmoji" into sc-dev am: 80a8cf86c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14970179

Change-Id: If931b95a73d977ee2bd7d0389e7a78d5b1dca2b2
2021-06-29 00:57:43 +00:00
Kohsuke Yatoh
80a8cf86c0 Merge "Extract flag font from NotoColorEmoji" into sc-dev 2021-06-29 00:40:27 +00:00
Peter Li
8a21ab4d9b Add READ_PRIVILEGED_PHONE_STATE to dialer
Fix: 192017986
Bug: 188396041
Test: Manual

Change-Id: I5f85013c7373093030961392e61e86bc7376b346
2021-06-28 22:35:44 +00:00
TreeHugger Robot
bb0ca9c6ac Merge "Rename keylayout for SnakeByte iDroid:con to match by name" into sc-dev am: e4147d7370
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15120883

Change-Id: I0f96ac99c0714ec07a055d3428065ae50658cc90
2021-06-28 13:22:42 +00:00
TreeHugger Robot
e4147d7370 Merge "Rename keylayout for SnakeByte iDroid:con to match by name" into sc-dev 2021-06-28 13:10:02 +00:00
TreeHugger Robot
14b014a4a2 Merge "Allow Shell more permissions for TvInputManagerTest." into sc-dev am: 7058f9948f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15098677

Change-Id: Ia10e176ac85576cc4527f60642ea625b938f9895
2021-06-28 11:23:02 +00:00
Treehugger Robot
6853c263e9 Rename keylayout for SnakeByte iDroid:con to match by name
This keylayout was introduced in ba81efe04a.
Unfortunately, we cannot match by vid / pid, since this breaks other
devices (like keyboards) that use the same vendor / product id.

Instead, match by name to avoid conflict.

Bug: 191720859
Change-Id: I9dd686ebcd612ca04d41b7b5cadf8442350346c9
Merged-In: I9dd686ebcd612ca04d41b7b5cadf8442350346c9
Test: verified manually
2021-06-27 08:09:21 +00:00
Hongguang
757d741cd7 Allow Shell more permissions for TvInputManagerTest.
Bug: 171024152
Test: android.media.tv.cts.TvInputManagerTest
Change-Id: Iabea3ea72a5476892c848eaa8ebf4f93ad9b1000
2021-06-25 00:50:51 +00:00
Seigo Nonaka
458f1dd71c Extract flag font from NotoColorEmoji
Bug: 188926991
Bug: 188779144
Test: m fontchain_lint
Change-Id: Ie807e31abb407f5b58665d4d2941bc75186d5c42
Merged-In: Ie807e31abb407f5b58665d4d2941bc75186d5c42
2021-06-24 18:46:08 +00:00
Louis Chang
7e4385baac Merge "Allowing leaf Task to contain both Activity and TaskFragment" into sc-v2-dev 2021-06-24 06:09:15 +00:00
Louis Chang
28a72fbadb Allowing leaf Task to contain both Activity and TaskFragment
Allowing a leaf Task to both contains ActivityRecord and
TaskFragment as the direct children.

For example:
   Task
      - TaskFragment
         - Activity C
      - TaskFragment
         - Activity B
      - Activity A

Bug: 189385903
Test: wm presubmit
Change-Id: I79667df70dcbbefbf5a5cce1a24165247f403e69
2021-06-24 10:32:18 +08:00
Chris Li
cf717a20eb Add TaskFragmentOrganizer API
Mainly the API surface.

Bug: 190433129
Test: N/A
Change-Id: I426b7fdbe62d58213c5e49a4773dd5fda0eb4dfe
2021-06-22 15:54:38 -07:00
TreeHugger Robot
ef59250e42 Merge "Enabling CAR_MONITOR_INPUT in com.android.car.rotary.xml" into sc-dev am: f92b5c4936
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15014590

Change-Id: I4e881d5335b07eb61a43de534c395549f4dce38a
2021-06-17 21:25:02 +00:00
TreeHugger Robot
f92b5c4936 Merge "Enabling CAR_MONITOR_INPUT in com.android.car.rotary.xml" into sc-dev 2021-06-17 20:50:27 +00:00
Antonio Kantek
4422c2ecb0 Enabling CAR_MONITOR_INPUT in com.android.car.rotary.xml
Bug: 191330748
Test: m -j32 (+ installed on seahawk)
Change-Id: I8721991a978bdbde7d6f6f852c55a0fb85634a84
2021-06-17 09:32:47 -07:00
Antonio Kantek
9541d7d67e Merge "Adding com.android.car.cluster.home.xml" into sc-dev am: 56330ddf59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14910481

Change-Id: I977b80182255d652d65eeeb069d83547945eb936
2021-06-16 16:48:32 +00:00
Antonio Kantek
56330ddf59 Merge "Adding com.android.car.cluster.home.xml" into sc-dev 2021-06-16 16:31:31 +00:00
Vadim Caen
ab9a4b9a5a Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev am: dc07d29bd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14775423

Change-Id: I41c53ecabb544054bbe522baf5ffddaac211975b
2021-06-16 12:31:00 +00:00
Antonio Kantek
8e3082fbcd Adding com.android.car.cluster.home.xml
This is required in order to build ClusterHomeSample with CAR_MONITOR_INPUT privileged permission.

Bug: 186676333
Test: atest CarServiceUnitTest
Change-Id: Ie5c81beb142c8f02aa01bdf129320169eed2c00e
2021-06-15 15:02:16 -07:00