Commit Graph

870 Commits

Author SHA1 Message Date
Ben Lin
3bbefb7ec9 PiP: update magnetic field radius for dismissmal as PiP resizes.
As PiP gets bigger, it should be that user doesn't have to put their
fingers as close as before to the dismiss bubble before it magnetizes
and pulls in PiP.

Bug: 164947242
Test: Manual. Resize PiP to larger and try to drag to dismiss bubble.
Change-Id: I2ec0fbfd87bc010d9ca551df0eeb77a22c02c6dc
2021-03-30 08:55:43 -07:00
Nataniel Borges
edd2a68464 Merge "Introduce a subject to assert changes over rectangles" into sc-dev 2021-03-30 12:26:23 +00:00
Wei Sheng Shih
744b9f18fd Merge "Catch getDrawable throw exception when add splash screen window." into sc-dev 2021-03-30 08:03:39 +00:00
Jerry Chang
04e05de6da Merge "Deal with display insets when layout splits" into sc-dev 2021-03-30 06:45:48 +00:00
Jerry Chang
29f76eeae5 Deal with display insets when layout splits
Fix: 175360659
Bug: 174209492
Test: manual check split bounds and divider position
Change-Id: I3b8c567a6a8f49d003eedd53a4abc32f53c7208c
2021-03-30 10:58:55 +08:00
Jerry Chang
8b23eff356 Merge "Fix not able to put app in split after removed task from side stage" into sc-dev 2021-03-30 02:36:43 +00:00
wilsonshih
c79329e7b6 Catch getDrawable throw exception when add splash screen window.
Catch for hidden resource not found exception.

Fix: 183277667
Test: atest StartingSurfaceDrawerTests
Change-Id: Ie1c25b044c6617f13025ccb7f6b43f3a2ee8c0e6
2021-03-30 10:35:02 +08:00
Nataniel Borges
887a3c9d38 Introduce a subject to assert changes over rectangles
In several flicker tests it is necessary to check if a window or layer position is moving or resizing.

To facilitate these checks this CL introduces RectSubject (accessible through WindowStateSubject and LayerSubject) to assert rectangle behaviors

Bug: 174238224
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id568fd9dbd59f176eeb84323c321553221932685
2021-03-29 22:33:41 +02:00
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
Jerry Chang
78f17f568b Fix not able to put app in split after removed task from side stage
Relies on reorder operation instead of setHidden operation to control
visibility of side stage. When removing task from side stage, keep side
stage visible if there's task remaining on side stage.

Fix: 180631194
Test: atest WMShellUnitTests
Test: manual check drop to split works after removeFromSideStage
Change-Id: I5a92bf33d1d447d4c4e28bb97e3e337927ffb875
2021-03-25 12:37:26 +08: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