Commit Graph

1415 Commits

Author SHA1 Message Date
TreeHugger Robot
80d3c80fdc Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev 2022-01-26 21:47:45 +00:00
Bill Yi
a2c8e1354e Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7a6495519e85c2f370228de1773df7085c7864aa
2022-01-26 01:35:05 +00:00
Bill Yi
2a0f953536 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1744fd0598b762bd8fbfcbbca786066ba693f7c4
2022-01-26 01:29:55 +00:00
Bill Yi
3abf629806 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I6fc9ef485adf0b6327102028d569b890a335c863
2022-01-08 04:59:40 +00:00
Hongwei Wang
166f263128 Ignore ui mode change caused by Morris overlay in PiP
When entering PiP from GMM with Morris overlay enabled, there will be a
display change callback caused by ui mode change that tend to shift the
PiP window. For PiP, such ui mode change from app is not quite relevant
and we can simply ignore in PipController.

Bug: 201589034
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dmI3KCeKPAH118BRqnhgNO
Test: enter PiP from GMM with Morris overlay, see video
Merged-In: I2d72e166fb8de1e503415b5441c03f0685de9573
Change-Id: I2d72e166fb8de1e503415b5441c03f0685de9573
(cherry picked from commit 391f372726)
2021-12-01 18:46:17 +00:00
TreeHugger Robot
59a5fdc394 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev 2021-11-15 17:04:46 +00:00
Bill Yi
1f971232b5 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1c45f21f5840258804e8edf06ff79f097a49e397
2021-11-11 09:15:20 +00:00
Bill Yi
4ce96d9acd Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4a14364ba70a38fb88b4583782c3caa6d4b172de
2021-11-11 09:06:57 +00:00
wilsonshih
85313e73fa Use SystemUI theme to inflate FrameLayout and SplashScreenView
The FrameLayout and SplashScreenView are only used as container in
StartingSurfaceDrawer, so they do not need to be inflated by app's
context, which could be affected by app's resources.

Bug: 197936273
Test: cold launch test app and show splash screen.
Test: launch several apps to verify that everything is fine.
Test: atest StartingSurfaceDrawerTests
Change-Id: I6de444546b5dfba23fc1d7c9c4deb12787d667c5
Merged-In: I6de444546b5dfba23fc1d7c9c4deb12787d667c5
(cherry picked from commit c86f1eb19e)
2021-11-02 20:30:20 +08:00
Ming-Shin Lu
849894b3a7 RESTRICT AUTOMERGE: Fix snapshot starting window stuck if the task never gain focus am: a4f760bee7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15937022

Change-Id: I67c974b959f0a5695384bba8ecfa144fde2e101e
2021-09-30 10:15:28 +00:00
Ming-Shin Lu
a4f760bee7 RESTRICT AUTOMERGE: Fix snapshot starting window stuck if the task never gain focus
The tasksnapshot starting window could stuck on task if the task never
gain focus, this could happen when launch multiple tasks to front, e.g.
split screen, or add snapshot starting window to a pip task.

As using task focus to judge the task snapshot removal may error-prone.
(i.e. unexpected window focus in/lost, non-focusable task window..)

To ensure the tasksnapshot removal works stable in this stage, extanding
MAX_DELAY_REMOVAL_TIME_IME_VISIBLE timeout from 450ms to 600ms
(Includes the worst time perviod from tasksnapshot drawn to the task window
focused around 150ms) would be safer and keeps the behavior of original
fixed Bug 192065018.

Bug: 201264769
Test: atest ActivityRecordTests
Test: manual launch apps from Recents.
Test: enter pip, power on/off, verify starting window is removed.
Test: manual enter split screen, verify starting window is removed.
Merged-In: Ieb5a5e781f5da4228cfc493031b4ad17f2d31a77
Change-Id: Ieb5a5e781f5da4228cfc493031b4ad17f2d31a77
2021-09-29 19:20:36 +08:00
TreeHugger Robot
d92e142ac4 Merge "RESTRICT AUTOMERGE: More improve IME transition during task switch" into sc-dev 2021-09-25 04:00:43 +00:00
Bill Yi
8cb6e80e2d Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-09-24 22:31:38 +00:00
TreeHugger Robot
d023757b83 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev 2021-09-24 16:47:34 +00:00
TreeHugger Robot
fd33aab7cd Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-qpr1-dev 2021-09-24 16:47:11 +00:00
Ming-Shin Lu
102c525452 Modify TaskSnapshotWindow#scheduleRemove
As code review in CL[1] from sc-dev, we should preserve the previous
logic to remove home task snapshot immediately, in order to show latest
content as soon as possible for unlocking to home.

Note that this CL is to sync the logic CL[1] in sc-dev for the
downstream branch (qpr1 and v2, and internal master)

[1] I81031f64966b1aeb55cc09f381d4d83ec3460dc9 (sc-dev)

Bug: 192065018
Test: ateset StartingSurfaceDrawerTests#\
        testRemoveTaskSnapshotWithImeSurfaceWhenOnImeDrawn
Test: manual tests by
   1) launching Android Message with focusing an editor
   2) swiping out to home and launch another apps (e.g. chrome)
   3) swiping up to overview, tapping Android Message task
   4) verify if IME is flickering after switched back.
Change-Id: Ic0cb07504acc11707327360051612df9cce565bd
2021-09-24 04:58:07 +00:00
Bill Yi
e09dd328d6 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Icba21a43159bab6abd8be75fd6097826ebfa2596
2021-09-24 01:24:53 +00:00
Bill Yi
b33cc8091c Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I555196d61c9123b77d07d4bed47b08a19a4a7505
2021-09-24 01:23:37 +00:00
Bill Yi
ebefedaa7e Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4e82fda243d0d26c15ea2a8b7bbe9e79cbeffbdd
2021-09-24 01:19:23 +00:00
Bill Yi
063bcacc7a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I037c4ff660c2eed06d4dc09507334300e10fd7b1
2021-09-24 01:18:08 +00:00
Ming-Shin Lu
5c23301322 RESTRICT AUTOMERGE: More improve IME transition during task switch
This CL aims to optimize the previous CL[1] to schedule removing
tasksnapshot after a fixed timeout according the tasksnapshot:
    - With IME snapshot: 350ms
    - Without IME snapshot: 100ms

As the previous approach has some cons espically when the tasksnapshot
has IME shown:
1) It lacks a signal or callback to notify WmShell to dismiss
tasksnapshot when IME is actually drawn on the task and always
dismissed after the timeout.

2) The timing to schedule tasksnapsit removal is when
ActivityRecord#onWindowFirstDrawn, which is much eariler than the
window focused (about 100-150ms), and it may easier to see flickering
when the task is showing IME.

The reason is that IME is drawn after window focused and started input
connection. Also, starts from R, IME insets visiblity
is handled by the app's UI thread, so if the schedule removal timing
been triggered too early and if IME / App takes more time to handle IME
surface layout, then user might aware the app task flickering when
tasksnapshot dismissed, since IME is not yet be drawn and then it
show up again when the next layout finished.

In this CL, we made the following changes to improve the above cons
- Postpone the schedule removing tasksnapshot (with IME) timing to
  after the app task has focused.
- Modify the tasksnapshot removal timeout (with IME)  from 350ms to
  450ms (with renaming to MAX_DELAY_REMOVAL_TIME_IME_VISIBLE),
  in case some edge cases may take longer time to process IME layout.
- add ITaskOrganizer#onImeDrawnOnTask(taskId) to notify the shell
  task organizer to properly remove the tasksnapshot without waiting
  until the max timeout.

[1]: I7865e17b57961e12a0cdcf068e412195123a6ec7

Fix: 192065018
Test: ateset StartingSurfaceDrawerTests#\
        testRemoveTaskSnapshotWithImeSurfaceWhenOnImeDrawn
Test: manual tests by
   1) launching Android Message with focusing an editor
   2) swiping out to home and launch another apps (e.g. chrome)
   3) swiping up to overview, tapping Android Message task
   4) verify if IME is flickering after switched back.
Change-Id: I81031f64966b1aeb55cc09f381d4d83ec3460dc9
(cherry picked from commit 278e944fd5)
2021-09-23 20:45:27 +08:00
Winson Chung
da6e8a5f77 Ensure wm is fetched on the shell thread
Bug: 199700116
Test: atest PinnedStackTests
Change-Id: I1aa925bc2ee2bd093b82f18432b548f785f232f4
2021-09-21 21:29:15 +00:00
TreeHugger Robot
9a57cd553b Merge "Fix OHM H/W key shortcut dosn't work appropriately" into sc-qpr1-dev 2021-09-16 00:40:58 +00:00
TreeHugger Robot
32efa155f4 Merge "RESTRICT AUTOMERGE: More improve IME transition during task switch" into sc-qpr1-dev 2021-09-15 01:04:13 +00:00
Ming-Shin Lu
278e944fd5 RESTRICT AUTOMERGE: More improve IME transition during task switch
This CL aims to optimize the previous CL[1] to schedule removing
tasksnapshot after a fixed timeout according the tasksnapshot:
    - With IME snapshot: 350ms
    - Without IME snapshot: 100ms

As the previous approach has some cons espically when the tasksnapshot
has IME shown:
1) It lacks a signal or callback to notify WmShell to dismiss
tasksnapshot when IME is actually drawn on the task and always
dismissed after the timeout.

2) The timing to schedule tasksnapsit removal is when
ActivityRecord#onWindowFirstDrawn, which is much eariler than the
window focused (about 100-150ms), and it may easier to see flickering
when the task is showing IME.

The reason is that IME is drawn after window focused and started input
connection. Also, starts from R, IME insets visiblity
is handled by the app's UI thread, so if the schedule removal timing
been triggered too early and if IME / App takes more time to handle IME
surface layout, then user might aware the app task flickering when
tasksnapshot dismissed, since IME is not yet be drawn and then it
show up again when the next layout finished.

In this CL, we made the following changes to improve the above cons
- Postpone the schedule removing tasksnapshot (with IME) timing to
  after the app task has focused.
- Modify the tasksnapshot removal timeout (with IME)  from 350ms to
  450ms (with renaming to MAX_DELAY_REMOVAL_TIME_IME_VISIBLE),
  in case some edge cases may take longer time to process IME layout.
- add ITaskOrganizer#onImeDrawnOnTask(taskId) to notify the shell
  task organizer to properly remove the tasksnapshot without waiting
  until the max timeout.

[1]: I7865e17b57961e12a0cdcf068e412195123a6ec7

Fix: 192065018
Test: ateset StartingSurfaceDrawerTests#\
        testRemoveTaskSnapshotWithImeSurfaceWhenOnImeDrawn
Test: manual tests by
   1) launching Android Message with focusing an editor
   2) swiping out to home and launch another apps (e.g. chrome)
   3) swiping up to overview, tapping Android Message task
   4) verify if IME is flickering after switched back.
Change-Id: I81031f64966b1aeb55cc09f381d4d83ec3460dc9
2021-09-13 18:01:56 +08:00
Bill Yi
999cc105b3 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4f8eec1615c3f186a2db9bf316c038e4aa111ab1
2021-09-10 22:15:59 +00:00
Bill Yi
97fa83e0ec Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I616e2bd98ad38e2422eea203bf0fcc8bd9305de3
2021-09-10 22:14:33 +00:00
Bill Lin
08898e3dde Fix OHM H/W key shortcut dosn't work appropriately
When one-handed mode disabled
1. Turn on the shortcut of the OHM with hold volume keys
2. Hold the volume keys
Should trigger one-anded mode

Due to S/W & H/W shortcut keys are mapping to different settings
S/W : ACCESSIBILITY_BUTTON_TARGETS
H/W : ACCESSIBILITY_SHORTCUT_TARGET_SERVICE
We should check both status of the them.

Bug: 193411296
Bug: 198739184
Test: atest WMShellUnitTests
Change-Id: I3994ab89fd6163c283969cc3175877e29b44c67a
Merged-Id: I3994ab89fd6163c283969cc3175877e29b44c67a
2021-09-08 16:52:47 +08:00
TreeHugger Robot
1bc5c4fe62 Merge "Fix one more import for ContextThemeWrapper." into sc-qpr1-dev 2021-08-31 11:56:52 +00:00
Becky Qiu
40be02e521 Fix broken launcher build to use the right import for ContextThemeWrapper.
Bug: 195028385
Test: can build now.
Change-Id: Ia36b77e3274191efa28c87cc0b2604a66906b604
Merged-In: Ia36b77e3274191efa28c87cc0b2604a66906b604
(cherry picked from commit 2ee44db719)
2021-08-30 06:10:03 +00:00
Winson Chung
58b9ad0d37 Fix one more import for ContextThemeWrapper.
Bug: 195028385
Test: can build now.
Change-Id: Ie14285b614318a99098f4457d7564a25724cde6b
Merged-In: Ie14285b614318a99098f4457d7564a25724cde6b
(cherry picked from commit fff8e21975)
2021-08-30 06:09:22 +00:00
Chris Li
6104af0e8c Fix race condition on size compat UI
Before, the leash might have been released while the update surface
position runnable was in queue. Now, we make sure the leash is valid
before update position.

Fix: 196942784
Test: manual
Change-Id: I2d052bf46b12a2441dbc0aa1aabf5dfe9be2fa45
2021-08-18 17:40:12 +00:00
Selim Cinek
193406410a Merge "Don't create one-handed-background-panel after rotation" into sc-dev am: ab89e910bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15537318

Change-Id: I772cb9e60857aebda21a11083ed2bc2690a1517c
2021-08-16 11:52:16 +00:00
Bill Lin
27da5b04d4 Don't create one-handed-background-panel after rotation
From code flow, when onConfigurationChanged() by rotating
OneHandedBackgroundPanelOrganizer#showBackgroundPanelLayer()
will be invoked and then create one-handed-background-panel
even though OHM is not activated.
Besides, this could introduce overhead on SF.

Test: manual rotate and dumpsys check HWC layers
Test: atest WMShellUnitTests
Bug: 196306312
Change-Id: Ia766078d5c76b08ab5b24e0ce965ad1d085e4686
2021-08-12 17:29:27 +08:00
Mady Mellor
8f71a21677 [QPR1] Fix dismiss not working in landscape
In stack animation controller only one target would ever
be added so when the target is re-created after rotating
then it wouldn't be used.

Test: - have some bubbles, drag them around, rotate device, try to
        dismiss them => they can be dismissed in landscape
      - get more bubbles, rotate back to portrait, try to dismiss
        them => they can be dismissed in portrait
      - drag the stack around the edges of the screen and verify that
        the only magnetic spot is where the dismiss target is
Fixes: 193008696
Change-Id: I6b24b1f9d301d37749dc67c95392fd6c8451df00
Merged-In: I6b24b1f9d301d37749dc67c95392fd6c8451df00
2021-08-10 21:53:59 +00:00
Jason Chang
20c38783c2 Merge "Fix one-handed mode tap app to exit doesn't work in factory boot" into sc-dev 2021-08-06 05:36:49 +00:00
Jason Chang
413ab9d586 Fix one-handed mode tap app to exit doesn't work in factory boot
Root cause:
1. Design change "tap app to exit" -> always being true, and settings
remove this option.
2. Tuning performance, due to 1, no longer listens to the key change,
so we remove the listener.

Solution:
Change getSettingsTapsAppToExit() API to return default TRUE.

Bug: 195629000
Test: Build ROM and factory-reset to test
Test: atest WMShellUnitTests
Change-Id: Id3c265258ed28f7e0aa54505c339671885d28fa7
2021-08-06 01:53:39 +00:00
Bill Yi
ee8f81d6b4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I682d240e086e7ea706c7a513b84e6e0e872b2365
2021-08-04 10:09:24 +00:00
Jason Chang
3ebd024a80 Merge "Fix tutorial background color not up-to-date occasionally" into sc-dev 2021-07-27 16:00:30 +00:00
Vadim Caen
ee08a68fd4 Merge "Do not draw icon background if it shouldn't be seen" into sc-dev 2021-07-27 10:05:17 +00:00
Jason Chang
f40204087c Fix tutorial background color not up-to-date occasionally
1. Fix bug in the legacy code flow
   - Obtain color from contextThemeWrapper Theme_DeviceDefault_DayNight
   - In OneHandedDisplayAreaOrganizer#finishOffset()
     Remove redundant call "cb.onStartTransition" due to
     ambugiuous.

2. Improve performance
   - Remove redundunt callbacks.
   - Avoid create/remove leash on each start/end cycle.
   - Dispatch Transaction to bkg leash through onAnimationUpdate()
     bkg leash apply the same Transaction of display area.
   - Adjust animation duration of Tutorial panel.
   - Move bkg leash depend on yPos value to reduce SF
     componsition overhead.

3. Improve code readibility
   - Code flow : Register -> onStart() -> show  background ->
     detach background -> Unregister -> remove leash.
   - Remove redundant synchronization due to wmshell already
     guarantee thread safe.
   - Move getTranslationFraction to SettingsUtil.
   - Move getTransitionDuration to SettingsUtil.

Bug: 194507756
Bug: 193589897

Test: Local verify when changing dark theme and wallpaper theme.
Test: atest WMShellUnitTests
Change-Id: Ib55753be9e9f4665c20ad34437f86bf80cc9f3b4
2021-07-27 15:20:19 +08:00
TreeHugger Robot
4422d05a6a Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-07-23 22:42:14 +00:00
Bill Yi
3c9f786cfe Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I326b034f3bacb172f66f1c2ddd76bb9f359bcfe5
2021-07-23 13:33:10 +00:00
Wei Sheng Shih
e2ff050fbb Merge "Fine tune splash screen icon generation algorithm" into sc-dev 2021-07-23 13:31:27 +00:00
Wei Sheng Shih
0793f65c95 Merge "Correcting the package name used on splash screen window." into sc-dev 2021-07-23 11:54:28 +00:00
Vadim Caen
496b4cbb86 Do not draw icon background if it shouldn't be seen
Test: atest CtsWindowManagerDeviceTestCases:SplashscreenTests
Bug: 193608336
Change-Id: I824137e67eaa0133337fcaf55c44fca46bac8010
2021-07-23 13:27:11 +02:00
wilsonshih
7a7722abe0 Correcting the package name used on splash screen window.
The top activity in TaskActivitiesReport can be filter out if the state
of top activity is INITIALIZING, this doesn't make sense for splash
screen, because the state of the top activity do can be INITIALIZING.
Create a filed targetActivityInfo in StartingWindowInfo to specify the
starting activity info.

Bug: 193459277
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ifec7aff644013a0426e0622162ab24f6b9fb3d8f
2021-07-23 16:50:01 +08:00
wilsonshih
331615ad61 Fine tune splash screen icon generation algorithm
Filter out the translucent pixels when compute the foreground colors
of an adaptive icon, which should make sense because the translucent
pixels on icon should only used for decoration, do not let it affect
the opaque pixels, also with this filter we won't drop down the
performance when using palette.

Bug: 193304878
Test: manual launch single color background apps.
Change-Id: Ia9873cf907d30bb7f30318a289a54159d0a51ee3
2021-07-23 12:44:43 +08:00
TreeHugger Robot
5cac66cb4e Merge "Skip operation on content overlay if task's vanished" into sc-dev 2021-07-22 23:20:20 +00:00
Winson Chung
d4dd12ee06 Merge "Skip animating out bubble screenshot if surface is not ready" into sc-dev 2021-07-22 22:10:46 +00:00