Commit Graph

861 Commits

Author SHA1 Message Date
Bill Lin
2b2c2a85f4 Merge "Integrate DisplayLayout for One handed mode" into sc-dev 2021-03-29 06:26:37 +00:00
Sunny Goyal
75238d1237 Merge "Using IconLoader lib to load splashscreen icons" into sc-dev 2021-03-26 16:41:57 +00:00
TreeHugger Robot
b752366da0 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-03-26 04:47:04 +00:00
Bill Yi
17284baf7a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I415d832e5f58ea7c304493547140d4f8578b22b0
2021-03-26 02:55:51 +00:00
Sunny Goyal
61af195119 Using IconLoader lib to load splashscreen icons
Bug: 183641907
Test: Manual
Change-Id: I06bfe0b2c5f908da7bd57b413c6f5d5d1b4cd32a
2021-03-25 09:56:00 -07:00
Bill Lin
52a3bb48ca Integrate DisplayLayout for One handed mode
1) Handle rotation
2) Initialize DisplayLayout in dagger and update when
   onDisplayAdded() & onDisplayRemoved()
3) Refact OneHandedTouchHandler
4) Refact OneHandedBackgroundPanelOrganizer
5) Refact OneHandedDisplayAreaOrganizer

Test: atest WMShellUnitTests
Bug:182899148
Bug:182633327
Bug:183172404
Bug:183489178
Bug:183559944
Bug:183065937
Bug:183005910
Bug:183063280
Bug:183162084
Bug:181423645
Bug:177497107
Change-Id: Ie7a4fa97df5f6a3963a55bd507d36e026e971bab
2021-03-25 07:32:58 +00:00
Charles Chen
e750fc8744 Merge "Check if display exists in RootTDAOrganizer" into sc-dev 2021-03-24 03:14:13 +00:00
Charles Chen
604acee017 Check if display exists in RootTDAOrganizer
There's a scenario that the display is removed before DAOrganizer callbacks
propagate to the client side.
This CL checks if the display still exists before applying
 DisplayAreaInfo changes.

Test: manual - repro steps in bug
fixes: 182790285

Change-Id: I1180ca6bea4e5bd87f22298483400c9d604bae06
2021-03-23 20:10:37 +08:00
Vadim Caen
015adeccfd Merge "Hide branding view when empty" into sc-dev 2021-03-23 08:28:33 +00:00
Vadim Caen
884c99d065 Hide branding view when empty
It looks like the empty branding view was causing the underlying
view to bleed through it so ensuring that it is removed if empty.

Bug: 182708883
Change-Id: I868931768bed5b083433fd5222720724bfe3e60e
2021-03-23 08:28:14 +00:00
Wei Sheng Shih
964eafdccc Merge changes Id0cf1b23,I4df6891e,I759de2e1 into sc-dev
* changes:
  Add trace for tracking the performance of new starting window
  Force enable hardware accelerated for starting window
  Pre-draw AdaptiveIconDrawable and cache it before doFrame
2021-03-23 03:15:07 +00:00
Bill Lin
9eaba911ec Merge "1/ Set Swipe bottom for notification OFF by default" into sc-dev 2021-03-23 01:22:38 +00:00
Heemin Seog
0cc4fd9db8 Merge "Add INTERACT_ACROSS_USERS to WMShell" into sc-dev 2021-03-22 20:53:04 +00:00
wilsonshih
2c9160c38b Add trace for tracking the performance of new starting window
Analysis performance.

Bug: 173975965
Test: check perfetto
Change-Id: Id0cf1b23799fd8bb0193c950ae4320ccca9dfac0
2021-03-22 16:23:41 +08:00
wilsonshih
998666c46d Force enable hardware accelerated for starting window
Currently the hardware acclerated was disabled for starting window, we
will need to enable it to fix the reveal animation janky.
With software rendering, each frame would cost 20~30ms on redfin.

Test: atest KeyguardTests KeyguardLockedTests SplashscreenTests
Bug: 182708883
Bug: 173975965
Change-Id: I4df6891e0b24231b7fd3a1d2d630ca2b9eead79f
2021-03-22 14:54:52 +08:00
wilsonshih
9d1ce22f88 Pre-draw AdaptiveIconDrawable and cache it before doFrame
The AdaptiveIconDrawable can spend much time which will impact the
time for first window drawn. But usually there is a small time
between setContentView to doFrame, we can use this gap to pre-draw
the AdaptiveIconDrawable and cache it since we already know the size
and it won't change anymore.

Bug: 173975965
Test: atest StartingSurfaceDrawerTests SplashscreenTests
Change-Id: I759de2e1b4025dd150532f3fd5c67d1b404f56a0
2021-03-22 14:54:31 +08:00
Heemin Seog
4fe9ff343e Add INTERACT_ACROSS_USERS to WMShell
Also add it to privapp permissions for Car Launcher

Bug: 183051101
Test: manual
Change-Id: I9ad7688425c8804eded75865bf3f202bf9ff5cd2
2021-03-19 11:43:01 -07:00
Quang Luong
406c9fb61c Merge "Revert "Update min_sdk_versions to match WifiTrackerLib"" into sc-dev 2021-03-19 17:04:58 +00:00
Quang Luong
0c3b94e971 Revert "Update min_sdk_versions to match WifiTrackerLib"
Revert "Update GoogleWifiTrackerLib min_sdk_version to match Wif..."

Revert "[WifiTrackerLib] Put @hide methods in separate wrapper p..."

Revert "Update TwoPanelSettingsLib min_sdk_version to match Sett..."

Revert "Update BluetoothServices min_sdk_version to match Settin..."

Revert "Update DroidTwoPanelSettingsLib min_sdk_version to match..."

Revert submission 13842044-wifitrackerlib-hideapi

Reason for revert: build breakage
Reverted Changes:
I85b8ed34a:[WifiTrackerLib] Put @hide methods in separate wra...
I891f51aab:Update DroidTwoPanelSettingsLib min_sdk_version to...
If8e82e047:Update GoogleWifiTrackerLib min_sdk_version to mat...
I4529627fb:Update BluetoothServices min_sdk_version to match ...
I87b46a09b:Update TwoPanelSettingsLib min_sdk_version to matc...
I65a3246b4:Update min_sdk_versions to match WifiTrackerLib

Change-Id: I083b764b42e5cf5476b1ec9ed3a9b2d5ed12afc9
2021-03-19 16:55:23 +00:00
Quang Luong
45abbc309d Merge "Update min_sdk_versions to match WifiTrackerLib" into sc-dev 2021-03-19 16:19:15 +00:00
Wei Sheng Shih
370868599b Merge "Add API windowSplashScreenIconBackground(12/N)" into sc-dev 2021-03-19 11:44:37 +00:00
Winson Chung
d3d61ffefe Merge changes from topic "shell_feature_interfaces_reland" into sc-dev
* changes:
  2/ Add mechanism to expose other features directly
  1/ Add mechanism to expose shell feature directly (for Pip)
2021-03-19 06:55:31 +00:00
wilsonshih
a4c6d8f828 Add API windowSplashScreenIconBackground(12/N)
Add new API for developer to customize starting window, set a
background color behind the icon.

Also masking the AVD and icon background like AdaptiveIconDrawable.

Ref doc: go/improved_app_launch_animations

Bug: 73289295
Test: atest SplashscreenTests
Change-Id: Ibba49ecc3ca020022cf775fed302e383908be327
2021-03-19 11:23:56 +08:00
Chris Li
667d242404 Merge "Fix non-resizable split flicker tests" into sc-dev 2021-03-19 03:19:26 +00:00
Chilun Huang
df8f101244 Merge "Do not use obsoleted snapshot as staring window" into sc-dev 2021-03-19 02:07:48 +00:00
Jorge Gil
f134ef3656 Merge "Update the PIP exclusion bounds when PIP is offset by shelf/ime" into sc-dev 2021-03-19 00:12:19 +00:00
Evan Rosky
557bab6f87 Merge "Initial support for display rotation in shell transitions" into sc-dev 2021-03-18 23:24:48 +00:00
Chris Li
c40cb1103a Fix non-resizable split flicker tests
1. Update the flag of DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW
during tests.

2. Before, the tests only checked whether the app window/layer became
visible/invisible, which could also happen during opening recent. Now,
we also check the visibility at the end.

Bug: 182235458
Test: atest WMShellFlickerTests
Change-Id: Ibc7b359d600a0e4105cc3a84b3111d59813eb9f1
2021-03-18 13:35:54 -07:00
Mady Mellor
651be19f5c Merge "Remove the explicit callback, not all of them" into sc-dev 2021-03-18 20:29:50 +00:00
Winson Chung
caa6d6484f 2/ Add mechanism to expose other features directly
- Expose interfaces for splitscreen, one handed, shell transitions,
  starting window
- Make the shell code only reference the starting window controller and
  not the exported interface

Bug: 180074017
Test: atest WMShellUnitTests
Test: Verify Pip calls from Launcher work
Change-Id: Idafed90a8ed3382adfb4322b4b1797237be86a90
2021-03-18 20:12:07 +00:00
Winson Chung
2b72add7fd 1/ Add mechanism to expose shell feature directly (for Pip)
- Also split impl and controller for ShellInit/ShellCommandHandler
  (as with ag/13502602)
- Example implementation of exposing a subset of the Pip interface to
  Launcher directly.  This has the benefit of reducing unnecessary code
  in SysUI just to pipe calls to the Shell.

  The controller implements the binder interface which is collected
  and exposed to Launcher when it binds to the overview  service
  and Launcher can call through the binders directly.

  Note: this requires the shared lib to also build with the Shell
  interfaces so changes to the Shell aidls will still require updating
  the shared lib (until the shared lib prebuilt can removed).

Bug: 180074017
Test: atest WMShellUnitTests
Test: Verify Pip calls from Launcher work
Change-Id: Id74114da6a6a73d32c957f84fce5bbe23e87ba01
2021-03-18 20:04:49 +00:00
Nataniel Borges
a4c5870608 Merge "Promote stable PIP app tests to presubmit" into sc-dev 2021-03-18 16:54:07 +00:00
Tiger Huang
1c7a274367 Merge "Let insets can still be controlled if its window bounds is moved" into sc-dev 2021-03-18 15:27:57 +00:00
Bill Lin
3c6cf129f3 1/ Set Swipe bottom for notification OFF by default
Note:
1) The "Swipe bottom for notification" will still available
   in Settings
2) If user had ever turn ON this settings, then we will NOT help
user change() any setting for this purpose.

Test: facory reset and observe the default function if OFF
Test: atest WMShellUnitTests
Bug: 182711813
Change-Id: Iaea9c31e263d4b86096aeecf5287c7c738a5c69e
2021-03-18 19:11:00 +08:00
Bill Lin
82c923af4b Merge "2/ Do not access SettingProvider in test code" into sc-dev 2021-03-18 10:30:09 +00:00
Bill Lin
8a612f73e2 2/ Do not access SettingProvider in test code
- Refactor OneHandedSettingsUtil.java
- Remove redundant test for SettingProvider

New policy: b/175024829
Settings key: <one_handed_*> is not readable.
From S+, new public settings keys need to be annotated
with @Readable unless they are annotated with @hide.

Recent changes :
ag/13764747 Remove @Readable for hidden fields added in S

Test: atest WMShellUnitTests
Bug: 183064974
Change-Id: I85bf3680cbcdba4c85aa96de058bc85cfabead46
2021-03-18 18:14:22 +08:00
Nataniel Borges
1a3724eced Promote stable PIP app tests to presubmit
These flaky tests have been stable for the past week and can be promoted

Test: atest WMShellFlickerTests:com.android.wm.shell.flicker.pip
Bug: 171049720
Bug: 167521849
Change-Id: Ibd78e9d9e53a5712ca781b265b1b65c830a74c08
2021-03-18 11:10:32 +01:00
Wei Sheng Shih
4a1f799020 Merge "Remove the timeout which used for cleanup splash screen" into sc-dev 2021-03-18 09:45:39 +00:00
Bill Lin
801a654427 Do not access SettingProvider in test code
New policy: b/175024829
Settings key: <one_handed_*> is not readable.
From S+, new public settings keys need to be annotated
with @Readable unless they are annotated with @hide.

Recent changes :
ag/13764747 Remove @Readable for hidden fields added in S

Test: atest WMShellUnitTests
Bug: 183064974
Change-Id: I185491189a3804d7038be3c117583ab571e7a961
2021-03-18 15:07:15 +08:00
wilsonshih
5cafb53ce6 Remove the timeout which used for cleanup splash screen
Remove the internal timeout to clean up the starting window, for now on
the developers are responsible for removing it.

- Also clean up some redundant members.

Bug: 181838419
Test: atest SplashscreenTests
Change-Id: Iebcccbca454eb7fda4bed637cb5866deec36cf6b
2021-03-18 11:36:44 +08:00
jorgegil@google.com
30d86a6b5c Update the PIP exclusion bounds when PIP is offset by shelf/ime
Bug: 182509392
Test: enter PIP, stash, open chrome to trigger offset - verify back
gesture works correctly

Change-Id: If80ec31035d7da9718267133e10493bd2a363495
2021-03-17 15:26:09 -07:00
Evan Rosky
1551cb7307 Initial support for display rotation in shell transitions
This puts display-content as another WC in a transition. It then
adds WC rotation to change tracking. If there is a rotation,
the shell-side handlers will play the transition.

This replaces ScreenTransitionAnimation, seamless-rotation, and
fixed-rotation:

 ScreenTransitionAnimation implementation will move to shell.

 seamless-rotation is redundant because the rotation setup is
 intrinsically "seamless": it requires shell to imbue an
 animation onto it rather than just doing the jump-cut.

 fixed-rotation is now just a custom animation where we
 counter-rotate the closing app on frame 1 and then perform
 the normal open animation on the opening app.

Bug: 179270750
Test: DisplayContentTests#testShellTransitRotation
      enable shell transitions and rotate the device or launch
      and close apps in different orientations.
Change-Id: I4bc23b2e614ba85bf9752f62da4c3f8d0c90436d
2021-03-17 15:08:10 -07:00
Mady Mellor
8b7afff3ef Remove the explicit callback, not all of them
Test: manual - expand / collapse / switch between bubbles
      works fine
Bug: 181896441
Change-Id: Ib724b2195aeb7748ade669964a65394e61f675a5
2021-03-16 18:31:11 -07:00
Mark Renouf
ce4e40ac0f Merge "Splits up internal binder api for scroll capture" into sc-dev 2021-03-16 18:21:37 +00:00
Tiger Huang
7faf533fb3 Let insets can still be controlled if its window bounds is moved
Insets source window can be moved by the display area policy so that
the window would not on the edge of the display. This makes the window
cannot provide insets to the display frame. The default animation uses
the display frame to compute insets, so the moved types cannot be
animated properly.

This CL adds an insets hint to InsetsSourceControl. It is the insets
computed from its owning window bounds. With the insets hint, the insets
animation can be played regardless of the display frame.

This CL also fixes an issue that the insets animation would be played in
the wrong direction by the fixed-rotation window.

Bug: 175775686
Fix: 181939099
Fix: 163018915
Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest
            InsetsControllerTest InsetsSourceConsumerTest
            DisplayImeControllerTest
      WindowInsetsTests (manual)
Change-Id: Ic6a8a215bd9b3a3b1af18e425dabe803c9be323e
2021-03-16 23:33:31 +08:00
Nataniel Borges
89740805f3 Merge "Remove Snapshot and Splash Screen from consecutive entry check" into sc-dev 2021-03-16 14:14:02 +00:00
Chilun
a68b3eb151 Do not use obsoleted snapshot as staring window
We will use splash screen as starting window if the activity is in
finishing state. Now we will not use the activity with finishing
state to show the starting window, so we check the top activity
component to avoid using obsoleted snapshot as starting window.

Bug: 180893837
Test: atest ActivityStarterTests ActivityRecordTests
Change-Id: I27fb40d6d4e8808caf803ef78c39050258eab1a2
2021-03-16 17:34:12 +08:00
Nataniel Borges
8b15b01c43 Remove Snapshot and Splash Screen from consecutive entry check
It is already possible to ignore windows/layers on the verification of  visibleWindowsShownMoreThanOneConsecutiveEntry and visibleLayersShownMoreThanOneConsecutiveEntry. However many tests need to manually add the Snapshot and Splash Screen entries.

Those entries are not guaranteed to show for more than 1 entry, they depend on the app behavior and when the SF actually renders the information sent by WM.

This CL removes those windows by default from the verification and refactor the tests to make it easier to update in the future

Test: atest FlickerTests WMShellFlickerTests
Bug: 182720234
Change-Id: I0e3346e078515b3e9a2065256ac04696acfa59fb
2021-03-16 10:26:55 +01:00
Winson Chung
f839a05c78 Merge "Create WindowContext for adding the drag drop overlay" into sc-dev 2021-03-16 03:30:29 +00:00
Mark Renouf
400a505d4d Splits up internal binder api for scroll capture
Splits the connection callback out from the session
callbacks.

Use ListenableFuture at the ScrollCaptureClient layer
to safely chain together futures, provide a better
exception handling/reporting path, and allow for
cancellation of background tasks.

Bug: 180671218
Test: atest ScrollCaptureClientTest ScrollCaptureConnectionTest
Test: atest ScrollCaptureFrameworkSmokeTest
Change-Id: Ibc8536d12a5554f62b3d7e1f4f717d3589ec45e0
2021-03-16 02:07:53 +00:00