Commit Graph

13128 Commits

Author SHA1 Message Date
Bill Lin
950858bb30 Merge "Check shortcut enabled before auto trun on OHM" into sc-dev am: e606dcbecb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15102775

Change-Id: Ifca32ef3b247e86b28050f82a1207c0581f72412
2021-06-28 07:43:03 +00:00
Bill Lin
e606dcbecb Merge "Check shortcut enabled before auto trun on OHM" into sc-dev 2021-06-28 07:34:47 +00:00
Shawn Lin
d778afe90b Merge "Updating the display bounds when it changes" into sc-dev am: 117ff31a3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15073695

Change-Id: Ib6b3608abb8446c5259596481bba9715d7e4425d
2021-06-28 07:03:51 +00:00
Shawn Lin
117ff31a3e Merge "Updating the display bounds when it changes" into sc-dev 2021-06-28 07:00:09 +00:00
Bill Lin
6061ddc2f7 Check shortcut enabled before auto trun on OHM
When device (factory)boot, controller regsiter settings
'one_handed_mode_activated' will receive callback, and
the shortcut do not enabled by default, the flow will
go to auto enable one-handed mode feature and leading
unexpedted UX(disabled by default) and testing issue.

Solution:
- Add additional check for shortcut enabled when
  onActivatedActionChanged() callback.
- When setting is pull screen, notify shortcut
  one_handed_mode_activated to reset and align current
  mState when function enabled.

Note:
The setting provider one_handed_mode_activated could set
2 different values when shortcut button pressed
 - "0" mapping to pull screen STATE_NONE
 - "1" mapping to pull screen STATE_ACTIVE
Since show notification do not have state, whenever
onChange callback, we trigger expand notification.

Test: atest WMShellUnitTests
Test: manual factory reset | reboot check Log should show \
      "Shortcut not enabled, skip onActivatedActionChanged()".
Test: manual disable both OHM & shortcut toggle in settings \
      '# adb shell settings --user 0 put secure \
      one_handed_mode_activated 1'
      should not auto enable OHM main toggle.
Bug: 191736174
Bug: 191831415
Bug: 191950195
Fixes: 191812697
Change-Id: Ib9d66fbbcc7e6a52a37bb47efebf90c9d2644508
2021-06-28 08:30:01 +08:00
Yuncheol Heo
90dc51b333 Merge "Add RootTaskDisplayAreaOrganizer.setPosition()." into sc-v2-dev 2021-06-25 22:23:35 +00:00
Yuncheol Heo
24d18b6f18 Add RootTaskDisplayAreaOrganizer.setPosition().
Bug: 191271445
Test: Send a command to change the cluster display size and check if it effects.
Change-Id: I84b0403d3a1ec15066cf16e37ca183abf897d080
2021-06-25 13:34:08 -07:00
John Reck
a7ec5f5ceb Merge "Revert "Delete RenderProxy off of the cleaner thread"" into sc-dev am: e947e2e20a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15111834

Change-Id: I2494c3806aeed846b2fa2a290f251c900a274ab7
2021-06-25 19:03:39 +00:00
John Reck
e947e2e20a Merge "Revert "Delete RenderProxy off of the cleaner thread"" into sc-dev 2021-06-25 19:00:24 +00:00
John Reck
f0b6921e89 Revert "Delete RenderProxy off of the cleaner thread"
This reverts commit da35596834.

Bug: b/192050906

If too many RenderProxies are destroyed too quickly, we can end up jamming up the CommonPool preventing RenderThread from making progress if it's waiting on CommonPool tasks.

Change-Id: I8c324bc60891440d9b7be67961f8d5f881dc0f03
2021-06-25 18:59:47 +00:00
Ming-Shin Lu
c2c4233de0 Merge "Waiting a proper time to remove the snapshot starting window" into sc-dev am: 87d84d5e23
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957147

Change-Id: I444dee58e8742706977e6e013a20218d79252d32
2021-06-25 16:31:50 +00:00
Jason Chang
148731ace6 Merge "Migrate metrics logs to reflect new One-handed UI changes in Settings" into sc-dev am: 33f1797e56
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15026540

Change-Id: Id1fde1dba7ccb694143948ef49465ccf264e86dc
2021-06-25 16:26:28 +00:00
Rob Carr
4b64488d7b Merge "Delete RenderProxy off of the cleaner thread" into sc-dev am: 472d962453
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15098757

Change-Id: Ided566efd7f9bd96670674b8c86db26534338457
2021-06-25 16:24:11 +00:00
Ming-Shin Lu
87d84d5e23 Merge "Waiting a proper time to remove the snapshot starting window" into sc-dev 2021-06-25 12:24:49 +00:00
Jason Chang
33f1797e56 Merge "Migrate metrics logs to reflect new One-handed UI changes in Settings" into sc-dev 2021-06-25 03:28:43 +00:00
Rob Carr
472d962453 Merge "Delete RenderProxy off of the cleaner thread" into sc-dev 2021-06-25 02:18:17 +00:00
Ming-Shin Lu
7e9bd7fe7c Waiting a proper time to remove the snapshot starting window
As CL[1] removed the delay time to remove starting window in shell,
even the benifits is to make good touch responsiness when launched the
activity, but may easier cause flickering since removing the starting
window when the activity allDrawn doesn't means the UI are all set.
(like some apps might needs adjust the surface frame or even IME
needs more time wait for animation finish, if the snapshot window
has these previews).

In case flickering happens when the Shell removes the task snapshot
window too quickly, partially reverts CL[1] delay removal logic
in TaskSnapshotWindow#remove, and use TaskSnapshot#hasImeSurface
to set a proper delay removal time:
   - General (no IME visible): 100ms
   - IME visible: 350ms

[1]: I5fb0fa3a1e6a5e6210d3baf400a84c5892bd2e34

Fix: 189825624
Test: manual switch tasks with/without ime window, also test
with some market input methods.

Change-Id: I7865e17b57961e12a0cdcf068e412195123a6ec7
2021-06-25 02:00:56 +00:00
John Reck
da35596834 Delete RenderProxy off of the cleaner thread
Speculation for the cause of an ANR. HardwareRenderer's
cleaner can block on RenderThread, which in turn blocks ART's
cleaner thread. This can potentially cause other blockages, but
it's also poor behavior to have such a long-running Cleaner anyway.

Avoid this by putting cleanup to CommonPool.

Bug: 191514384
Test: make, CtsUiRenderingTestCases still passes

Change-Id: I8190f7862528c3ac39ce636f6fca229322480968
2021-06-24 21:58:05 +00:00
Huihong Luo
f3560fa35f Merge "Fix a crash caused by transaction" into sc-dev am: 7580a2dd98
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15092219

Change-Id: I143fc2d8801b3c42f9b49b0063c65031b0b08c25
2021-06-24 20:33:11 +00:00
Huihong Luo
4df4151bc0 Fix a crash caused by transaction
A native transaction passed from webview is sent back to native side, so java side does not manage the life cycle of the transaction.

Bug: 191414767
Test: Play a video, switch to another app, wait for 10 seconds
Change-Id: I013052c202b445438d6cb6497f5f9a2fc22a2b85
2021-06-24 11:10:06 -07:00
Tiger Huang
c6d5475f55 Merge "Release leashes of insets controls if they are not needed" into sc-dev am: ef1bb2c9fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15090014

Change-Id: I109efa415e397c905c9704836c3da8f70379c177
2021-06-24 15:27:44 +00:00
Tiger Huang
ef1bb2c9fa Merge "Release leashes of insets controls if they are not needed" into sc-dev 2021-06-24 15:11:04 +00:00
Jason Chang
1d17d4b91d Migrate metrics logs to reflect new One-handed UI changes in Settings
1. Add metrics logs for EVENT_ONE_HANDED_TRIGGER_ROTATION_OUT.
2. Add metrics logs for Show notification toggle settings changes.

Bug: 191730790

Test: manual
Test: atest WMShellUnitTests
Change-Id: I04ba806af1e427756b61f36279be4fff78dca900
2021-06-24 22:24:55 +08:00
Wei Sheng Shih
a5c89744ab Merge "Clear padding and background after create view from context." into sc-dev am: f2d2fb5292
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15026547

Change-Id: I61065bea95ebcefa8b498a3abe63e3006ef649f1
2021-06-24 11:08:07 +00:00
Tiger Huang
c7746aa3de Release leashes of insets controls if they are not needed
Previously, leashes would be only released by GC in some cases, but the
timing could be late. This CL proactively release them as long as they
are not needed. The cases were:

1. The leashes in DisplayImeController. It didn't release leashes while
   receiving a new one.

2. The leashes returned from addWindow/relayoutWindow. The leashes would
   be copied to prevent others from releasing them before writeToParcel.
   The copied leashes could be redundant after writeToParcel.

3. The leashes held by the client whose window is removed. If a window
   is removed, the server won't invoke mClient.insetsControlChanged, so
   the client would never get notified about losing control to release
   the leashes. This could happen if the window doesn't have an exiting
   animation.

Fix: 175851610
Test: Steps in the bug.
Test: Show and dismiss a dialog which doesn't have FLAG_ALT_FOCUSABLE_IM
      or any window animation. Repeat this thousands of times. And see
      if there are many insets leashes as offscreen layers in `dumpsys
      SurfaceFlinger`
Change-Id: I5eb774ac071154a8d7205dbd1ab4a5f8eca215c3
2021-06-24 09:42:32 +00:00
shawnlin
a8f0672b9a Updating the display bounds when it changes
In previous design, we only get the display bounds once when the first
time the hide cutout is enabled. But if user selects "Hide" first and
then switch to "Render apps below cutout area", the display bounds we
get will be incorrect.

Add a listener to monitor and update the display size.

Bug: 191273507
Test: atest HideDisplayCutoutTest
Test: manual - 1. select "Hide"
               2. select "Render apps below cutout area"
	       3. observe the result
Change-Id: I0ff1c4b822615d6bd43adb2e9e9d17d6bd9b91a8
2021-06-24 15:03:34 +08:00
wilsonshih
0797c86219 Clear padding and background after create view from context.
When create view with Context, there will also load some view
attributes from the Context and pre-set to the View object, to ensure
the splash screen view not affected by those attributes, clear padding
and background after create those view objects.

Bug: 191339594
Test: manual launch several apps from Launcher/Notification.
Tets: atest SplashscreenTests
Change-Id: I05be9c296a04cd49a0896ad8aef57643720d60ce
2021-06-24 11:10:07 +08:00
Mady Mellor
ee2b3f3ecb Merge "Add a note about keeping a dimension value in sync with CTS" into sc-dev am: f46a8f6276
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080681

Change-Id: Ib215e9622210ecc0d0ae390c1b6944e621867e7d
2021-06-24 02:32:11 +00:00
TreeHugger Robot
544b9f73ce Merge "Fix: Release skia resources when RenderNode layer is configured" into sc-dev am: 43038ca7a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15081298

Change-Id: I35f9bdc61eb7533ed9241e50924c8187d2639f2e
2021-06-24 02:31:50 +00:00
Mady Mellor
f46a8f6276 Merge "Add a note about keeping a dimension value in sync with CTS" into sc-dev 2021-06-23 20:45:17 +00:00
TreeHugger Robot
43038ca7a7 Merge "Fix: Release skia resources when RenderNode layer is configured" into sc-dev 2021-06-23 20:30:32 +00:00
Nader Jawad
3206cce503 Fix: Release skia resources when RenderNode layer is configured
-Updated StretchEffect to null out the child texture
of the SkRuntimeEffectBuilder after the shader is created
-Release optional mask surface used for
stretching the hole punch
-Release SkRuntimeEffectBuilder instance on RenderNode's
StretchEffect

Fixes: 183592264
Test: manual + re-ran cts tests
Change-Id: I90952666d7489985de9ce798ab792cf3fd7f6087
2021-06-23 11:48:58 -07:00
Mady Mellor
ab00abc6f6 Add a note about keeping a dimension value in sync with CTS
Test: treehugger
Bug: 182934996
Change-Id: Ib8dd9bc9d13d9f5a737ceb0d61e34b825f883f8c
2021-06-23 11:04:27 -07:00
TreeHugger Robot
a8424ea593 Merge "Add border to indicate side stage split region" into sc-v2-dev 2021-06-23 06:04:30 +00:00
Jerry Chang
7bf62d76e8 Add border to indicate side stage split region
Add a view to draw border of side stage root task.

Bug: 189839391
Test: manual checks side stage border.

Change-Id: Ie0606338d6907f92c80f11c7d86dca6bf525e45d
2021-06-23 01:13:44 +00:00
Wei Sheng Shih
1928c40953 Merge "Ignore exit animation when view is detached from window." into sc-dev am: a1b3ce5250
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14972767

Change-Id: Id7862b6702fd041e7e3b231cd8a978602df4dd57
2021-06-22 15:05:06 +00:00
TreeHugger Robot
134c6bf794 Merge "Fix SysUI NPE crash during the boot/init progress" into sc-dev am: 2adcf7686d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15052835

Change-Id: Ia098df3a645253186a8fd6197e9adfe1627a06eb
2021-06-22 15:03:33 +00:00
Wei Sheng Shih
a1b3ce5250 Merge "Ignore exit animation when view is detached from window." into sc-dev 2021-06-22 11:02:59 +00:00
TreeHugger Robot
2adcf7686d Merge "Fix SysUI NPE crash during the boot/init progress" into sc-dev 2021-06-22 07:27:24 +00:00
Bill Lin
c4bdf37af2 Fix SysUI NPE crash during the boot/init progress
When Device boot and SystemUI servies starting, settings provider
may callback onChange() when OneHandedController register observer.
If the callback timing earlier han mEventCallback registered by
WMShll#initOneHanded, then the NPE will happen.

The simple fix is to add NPE check in
OneHandedController#notifyExpandNotifcation()
we can just ignore the callback during init time since the singal
is to expand notification and come from shorcut after user enable
and tap shortcut.(No need to act for the signal during boot progress.)

Test: manual reboot device and observe
Test: atest WMShellUnitTests
Bug: 191600033
Change-Id: I73849afa9904031759da304298221dbb222aeaaa
2021-06-22 11:50:46 +08:00
TreeHugger Robot
859ef211a6 Merge "Register binder-depth per remote animation" into sc-v2-dev 2021-06-22 02:10:57 +00:00
TreeHugger Robot
403f6ceb32 Merge "Hook WakefulnessLifecycle for best timing of LockedDisabled" into sc-dev am: aadedc76b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002670

Change-Id: I9fbc141b015c34d026e7f17b7d11bece5628e6f8
2021-06-21 19:57:19 +00:00
TreeHugger Robot
aadedc76b6 Merge "Hook WakefulnessLifecycle for best timing of LockedDisabled" into sc-dev 2021-06-21 16:42:36 +00:00
TreeHugger Robot
cedbffebcf Merge "Removing remaining references of ActivityView in fw/base" into sc-dev am: dc86e26f54
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829810

Change-Id: I07f5d9bd292021dcc1de2249cb844c9fdfdec630
2021-06-21 11:58:03 +00:00
Winson Chung
2725991d00 Merge "Add cached state to prevent blocking calls from SysUI->Shell" into sc-dev am: 979fe90f43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14964835

Change-Id: Id664fec0301032a52271e738442b1bf52aa96cf5
2021-06-21 11:55:56 +00:00
Huihong Luo
666acfce30 Merge "Fix z-order for webview surface control" into sc-dev am: 17410b668f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14414236

Change-Id: I950d70004c3c20f869eba7cec32c3d5f3827086d
2021-06-21 11:52:55 +00:00
TreeHugger Robot
cab7a0c0e0 Merge "Remove the extra buffer allocation from hwui" into sc-dev am: 5001447b86
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14627997

Change-Id: I3bdeb68e7d789c3710ea812390e767056fa8c90f
2021-06-21 11:50:00 +00:00
TreeHugger Robot
6b451802c1 Merge "Fix shortcut rotate trigger swipe notification" into sc-dev am: bd1d84122b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15017733

Change-Id: Iee804029beefa05a83b80c670c95ccab95f858ac
2021-06-21 11:49:08 +00:00
wilsonshih
84837512a1 Ignore exit animation when view is detached from window.
After first launched activity start remove starting window, there start
a second activity with a new task, so there will trigger a open/close
task transition while playing starting window exit animation, but since
the first launched activity is going to destory, there will goes to
clear all window for that activity.
For client side we can ignore the animation after it was detached from
window.

Bug: 190040281
Test: manual
Change-Id: Idd939feb72163d585e14db480b1e374e41597928
2021-06-21 09:37:23 +08:00
TreeHugger Robot
99bded1612 Merge "Do not skip onMovementBoundsChanged if already in PiP" into sc-dev 2021-06-20 20:18:16 +00:00