Commit Graph

3486 Commits

Author SHA1 Message Date
Treehugger Robot
20c004024e Merge "Add more owners to appprediction and smartspace services" am: b015109200 am: d5f11c7387 am: ad54b5f97b am: 7f7f6bc2c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142732

Change-Id: I93e4227c225dcd0c804f2ed478030a8fdac4feff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 00:34:03 +00:00
Treehugger Robot
d5f11c7387 Merge "Add more owners to appprediction and smartspace services" am: b015109200
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142732

Change-Id: I5e6dd1e6909610c4cc9d8d6481700ed44d9d4bd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 23:30:46 +00:00
Hyunyoung Song
fa1b102045 Add more owners to appprediction and smartspace services
Test: not needed as modifying OWNERS file

Change-Id: Id4d57d2067828bee102ee5d5335b15790e454e9f
2022-06-30 22:05:47 +00:00
Tiger Huang
20eb3c91db Revert "Introduce updateVisibility and updateLayout"
This reverts commit:
db407ef12d, and
d8aa7f7882.

Reason for revert:
The surface size would be reduced by mTranslator unexpectedly.

Fix: 233017734
Test: Open a legacy app which has CompatibilityInfo.SCALING_REQUIRED
      and see if the app is cropped.
Change-Id: If830866328a5709cf6856fe840a804b304052003
2022-06-22 21:41:18 +08:00
Tiger Huang
157514510f Send the attached frame to the client
The attached frame is the frame of the parent window that its child
attaches to, as long as the child is not
TYPE_APPLICATION_ATTACHED_DIALOG. It is a factor while computing the
window frame.

Previously, we let the child obtain the attached frame from its parent
view root. However, if the parent and the child are not in the same
process, it can be tricky.

This CL sends the attached frame from the server to the client via
ClientWindowFrames. In this way, the child can compute its window frame
without having to accessing the parent view root.

Bug: 161810301
Bug: 175861127
Test: atest ActivityRecordTests WindowLayoutTests
Change-Id: Ia844a4c927027e305a56114216eaee2bf7933b1f
2022-06-20 21:09:40 +08:00
Chet Haase
f6541ab73e Pause animators when app is not visible am: b99cc5b4c8 am: f2e66fa4ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18528824

Change-Id: I4a220654954199c26f29a93d8afc3ad8a448547e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 20:28:07 +00:00
Chet Haase
f2e66fa4ed Pause animators when app is not visible am: b99cc5b4c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18528824

Change-Id: I2b041e112cfa55949a9d3f753388de3536dbd33a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 20:06:35 +00:00
Chet Haase
4551f51dcd Pause animators when app is not visible am: b99cc5b4c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18528824

Change-Id: I560f0875e7408f41393246c62ea73931e862a986
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 19:57:37 +00:00
Lucas Silva
bc20407897 Merge "Use try-with-resource statement for dream metadata to ensure proper cleanup." into tm-dev am: 2aa3ecaf9e am: 717707e390
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18700386

Change-Id: I8a10990fccf4fa381b9451364472aa8f532d8146
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 14:36:06 +00:00
Lucas Silva
b30b1683e1 Use try-with-resource statement for dream metadata to ensure proper
cleanup.

This ensures the memory is properly cleaned up if an exception is thrown
while building the DreamMetadata object.

Bug: 234343900
Test: locally on device
Change-Id: I29b2bed30c216d5e353fa0a8b0da74579b33cecb
2022-06-01 19:04:57 +00:00
TreeHugger Robot
72d9e091c4 Merge "Add support for onReject and onError for external hotword." into tm-dev am: 90579f32b3 am: 5ec4c563ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18308197

Change-Id: Ic3ec74aaaa851b3860e7bddcab1decc9a9db34e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 17:46:37 +00:00
TreeHugger Robot
90579f32b3 Merge "Add support for onReject and onError for external hotword." into tm-dev 2022-05-26 17:14:11 +00:00
Riddle Hsu
9496a69d0b Merge "Do not force relayout for wallpaper visibility change" into tm-qpr-dev 2022-05-25 06:20:23 +00:00
Riddle Hsu
07f2a71eda Do not force relayout for wallpaper visibility change
The force-relayout was added in [1] for the side effect of [2].
Since the preserve-surface has been completely removed in [3].
So [1] can be restored to avoid unnecessary cost.

WallpaperService always calls relayout with View.VISIBLE, so
unless it requests to remove the wallpaper window, its surface
should not be removed. Though currently there might be no such
cases, add a log in case something goes wrong.

[1]: I79f97df61696eea325183e9b9057cbb10ce8cc66
[2]: Iea8ed86a9c4a7674804152aa44df7ef3d6341768
[3]: I4574ac0d3b8a63b13ac44846e729b73ca0f88f23

Bug: 233599092
Test: No additional relayout from wallpaper when turning on screen,
      swiping/closing up to home.
Test: Toggle overview from wallpaper picker while using live wallpaper.
      The wallpaper won't disappear.

Change-Id: I6673e458b5577f780be17a51cf5de1d6493ab5ca
2022-05-25 05:39:48 +00:00
Sergey Volnov
be0edce59a Add support for onReject and onError for external hotword.
Bug: 230658902
Test: atest --no-bazel-mode CtsVoiceInteractionTestCases:HotwordDetectionServiceBasicTest
Change-Id: Ic845f06c2e3943f4968067dd23a0520aecce3973
2022-05-24 01:39:21 +01:00
Chet Haase
b99cc5b4c8 Pause animators when app is not visible
Because animators are not tied to the lifecycle of any UI
elements, it is possible for an app to go into the background
and for the animators to continue running. Ideally, the app would
track the lifecycle of the activity/etc and pause or disable the
animators, but it is common for this to not happen, causing the
animators to continue spinning when the app does not need them.
The animators are not causing as much work as for a foreground
activity (since they do not cause any re-rendering), but they cause
work nonetheless by keeping Choreographer awake to continue pulsing
frames.

The ideal fix would be to introduce new API for animators that
tied them to lifecycle concepts (View, Activity, etc). But that kind
of fix would only be available for future versions of the platform,
and does not address existing app code. A workaround for the current
situation is to address the most egregious problems; infinite animators
running on backgrounded apps.

The fix here is exactly that: when an app's visible surface (either an
activity or, for Wallpapers, a WallpaperService) is backgrounded,
a request is sent to pause animators for that surface. When that surface
comes to the foreground, a request is sent to resume those animators.
Since all animators are handled on the same thread for the same process,
in AnimationHandler, we should only ever pause animators when *all*
surfaces for a process are not visible (and resume them when *any*
surface becomes visible). Also, to mitigate any issues with thrashing
animator state for apps which become only transiently backgrounded,
we delay pausing for some time.

Bug: 228598053
Bug: 233391022
Test: new AnimatorLeak CTS test, plus manual testing for activities
    and wallpapers

Change-Id: I8b9f841cc80babb972244c724968a5c085a06b69
Merged-In: I8b9f841cc80babb972244c724968a5c085a06b69
2022-05-23 20:31:19 +00:00
Shashwat Razdan
fb733f5bde Merge "Unlink to death before removing the callback wrapper in SmartspaceService/AppPredictionServic3e" into tm-dev am: 1ec2fe2e7d am: 187a2c4153
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18475472

Change-Id: I75b8a316fefe229b1fa683baa26c4e50c7b2bb45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:29:47 +00:00
Shashwat Razdan
1ec2fe2e7d Merge "Unlink to death before removing the callback wrapper in SmartspaceService/AppPredictionServic3e" into tm-dev 2022-05-23 17:56:46 +00:00
TreeHugger Robot
3daba43266 Merge "Finish DreamActivity on creation if it is obsolete" into tm-dev am: abfe28784c am: 1f9957c76c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18090283

Change-Id: I28008d17a763141f1c8e08c6ea7bb82c1e3212b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 22:09:42 +00:00
TreeHugger Robot
abfe28784c Merge "Finish DreamActivity on creation if it is obsolete" into tm-dev 2022-05-21 21:33:36 +00:00
Hyunyoung Song
9f3fde7d70 Unlink to death before removing the callback wrapper in
SmartspaceService/AppPredictionServic3e

Bug: 232548271
Test: ahat

Change-Id: Ia86343721c4c8c57e52dd7d3e76de0eba6809058
2022-05-20 15:49:02 -07:00
TreeHugger Robot
85284c84b6 Merge "Fix SearchUiService memory leak by removing DeathRecipient from CallbackWrapper" into tm-dev am: ea56fc681f am: f4aa226b18
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18453442

Change-Id: I4c142f9093f9c910d6b23a3284fa1c60dac4a96d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 08:39:48 +00:00
Hyunyoung Song
197fa0acf2 Fix SearchUiService memory leak by removing DeathRecipient from
CallbackWrapper

Bug: 232548271
Test: used  go/ahat to see memory stay steady
Change-Id: I182b6dc3ce4d86ab46c5543a1ff68f320fecaa98
2022-05-18 16:44:30 -07:00
Vania Desmonda
8746d0d126 Merge "Prevent duplicate calls to updateSurface() and recursive call to updateSurfaceDimming()." into tm-dev am: eb0f10153f am: 53ef3d382a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18343949

Change-Id: I0f8a40774abedaa762b4adbfe476f1f9ecf05fc9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 09:00:43 +00:00
TreeHugger Robot
0c0231e1c6 Merge "Inform Assistant when security exception occurs during onDetected" into tm-dev am: d5cd970e0c am: 16d458b618
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18179574

Change-Id: Ic514a20d9c5a948110e3af82757efd21d92f3ea1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 08:50:09 +00:00
Vania Desmonda
eb0f10153f Merge "Prevent duplicate calls to updateSurface() and recursive call to updateSurfaceDimming()." into tm-dev 2022-05-13 07:01:18 +00:00
TreeHugger Robot
d5cd970e0c Merge "Inform Assistant when security exception occurs during onDetected" into tm-dev 2022-05-13 03:19:48 +00:00
Vania Desmonda
41af1e31d3 Prevent duplicate calls to updateSurface() and recursive call to
updateSurfaceDimming().

Reduce jank by removing notifyColorsChanged() on updateSurface() which
caused notifyColorsChanged() to be called multiple times successively.

Test: manual, atest WallpaperManagerTest
Bug: 229715857
Change-Id: I552a6956648250cd36787b7ddd79758422ea7f68
2022-05-12 14:09:34 +00:00
Peter Li
e6bbe4660e Inform Assistant when security exception occurs during onDetected
By the behavior, the interactor of assistant needs to call the
startRecognition function again after hotword event is triggered.
Otherwise it will not receive the result of detection.

Currently when security exception occurs during onDetected, we
won't inform the interactor of assistant about the hotword event.
It will cause the interactor still to wait the hotword event and
doesn't call startRecognition function again.

After syncing with assistant, we should use onError() callback
to inform interactor.

The behavior of onError() in the interactor:
For both of DSP and Software, assistant will call startRecognition
function.

The behavior of onRejected() in the interactor:
Only for DSP, assistant will call startRecognition function.
For Software, assistant doesn't expect to get onRejected()

Bug: 230738063
Test: atest HotwordDetectionServiceBasicTest
Change-Id: I3083fd5a4a78ad9d2f35acd7fa1a4f2036cf64de
Merged-In: Ideb210d4364d4c48c747d66268d77a2f5b017186
2022-05-12 09:50:08 +00:00
Vania Desmonda
806432c913 Merge "Revert "Avoid calling updateSurface twice when dimming is applied."" into tm-dev am: 05aa78241d am: 965cae5878
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18231745

Change-Id: I96c0e969c1a894706602b145464315db53228188
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:50:12 +00:00
Vania Desmonda
05aa78241d Merge "Revert "Avoid calling updateSurface twice when dimming is applied."" into tm-dev 2022-05-11 10:10:54 +00:00
Vania Desmonda
ceb55ed11b Revert "Avoid calling updateSurface twice when dimming is applied."
This reverts commit 9c4b4e14a0.

Reason for revert: Causes increased memory as reported in b/231834913

Change-Id: I95884e6f8b8416a6b8c85637dab5540f09eb89e1
2022-05-10 08:05:22 +00:00
Scottie Biddle
1c374ee44d Merge "Move CtsQuickAccessWalletTestCases to presubmit-large." into tm-dev am: c6b20b66d5 am: cbb7ca5b49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18187228

Change-Id: I5327e021fb5fc7722c6dd0544db20e78b2f65ba0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:18:43 +00:00
Scottie Biddle
d5db263384 Move CtsQuickAccessWalletTestCases to presubmit-large.
One of the tests contained therein takes more than a minute to run, so these belong in presubmit-large

Change-Id: I2f216badf1e79fc7339098bad0157f76cc2fd73f
Test: atest CtsQuickAccessWalletTestCases
Fixes: 225066814
2022-05-06 16:24:11 +00:00
Darrell Shi
8176ed8b17 Add WM transit types for dream activity.
This change adds two WM transit types for opening and closing dream
activities, which allows the system to define transition in and out of
dreams, that are currently being overriden by other transitions.

Set the priority to be just below keyguard transit. The keyguard
occlude/unocclude already correctly handles the dream open/close
animation.

Bug: 222507937
Bug: 220311554
Test: atest WmTests:AppTransitionControllerTest
Test: manually on device by entering and exiting dreams over keyguard,
launcher, and settings. observed animation and relevant types of WM logs.

Change-Id: Iedfa279d56cd9d4c4679cb3b697ee74a98ef727b
2022-05-04 17:13:52 +00:00
Vania Desmonda
bc99f623d4 Merge "Avoid calling updateSurface twice when dimming is applied." into tm-dev 2022-05-04 09:43:53 +00:00
Robert Horvath
87c7caa455 Finish DreamActivity on creation if it is obsolete
DreamService keeps a reference to its DreamActivity, and finishes it
when the dream stops. This reference is set when the DreamActivity
receives its onCreate lifecycle callback.

If a dream is stopped shortly after it started, before its DreamActivity
was created, the DreamActivity can be created after the dream is
supposed to be finished, and finish isn't called on the activity.
If another dream starts another DreamActivity, the reference to the old
DreamActivity is overwritten and lost, so that DreamService can no
longer finish the old DreamActivity.

This change tracks the DreamToken, unique to each dream, that an
activity was started for. If an activity is created for a dream that is
already finished, the activity is finished immediately.

Bug: 229561570
Test: manual, with adding delay before startDreamActivity to ease
      reproduction
Change-Id: I0fca226855ee4e2317ac807a4c87c8656c72169b
2022-04-29 18:08:13 +02:00
Bryce Lee
493062c55e Merge "Unbind from dream overlay in onUnbind." into tm-dev 2022-04-28 21:57:18 +00:00
Bryce Lee
1da50a201b Unbind from dream overlay in onUnbind.
If a dream is unbound before finish, unbinding from the overlay service
will not occur before onDestroy. This will result in an exception from
unbinding from a non registered service. This change ensures the dream
service unbinds from the overlay service when unbound.

Test: atest DreamManagerServiceTests#testForceStopStubbornDream
Fixed: 229824204
Change-Id: Id708b9119c5498bf9632b21a539c3ca7f5506737
2022-04-28 17:57:38 +00:00
TreeHugger Robot
a74842fe07 Merge "Make GameSessionTrampolineActivity invisible" into tm-dev 2022-04-28 04:32:39 +00:00
David Samuelson
eeebac455b Merge "Ensure GameSessionTrampolineActivity launches intent once." into tm-dev 2022-04-27 22:22:59 +00:00
shannonchen
7b2c3db83a Make GameSessionTrampolineActivity invisible
This change adds a new theme to prevent
GameSessionTrampolineActivity from displaying
any UI, which in turn delegates the
decision of whether or not to show things
like the system bars to the delegate
activity. This change also disables
transition animations for the trampoline
activity, to prevent them from causing
flickering.

Bug: 229757156
Test: manual testing using GMS dashboard
Change-Id: I82e0ede2e9f0b334fd01e958eab0736042119e84
2022-04-27 20:13:57 +00:00
Tyler Lacey
c85e97a7a1 Merge "Use Window Context for SurfaceControlViewHost." into tm-dev 2022-04-27 17:46:28 +00:00
Ahaan Ugale
44e14e72b6 Merge "Allow IVoiceInteractionSessionListener to listen for window vis changes" into tm-dev 2022-04-27 17:03:31 +00:00
Vania Desmonda
9c4b4e14a0 Avoid calling updateSurface twice when dimming is applied.
Test: manual, atest WallpaperManagerServiceTest
Bug: 229715857
Change-Id: Ib8c4939fea503ee71bf71a95dc71f10fd2956614
2022-04-27 11:20:19 +01:00
Winson Chung
06fb230d6d Allow IVoiceInteractionSessionListener to listen for window vis changes
- The listener currently tracks session shown/hidden, but doesn't track
  the visibility of the session window which can change on the client
  side without the server knowing. In some cases, it's useful for SysUI
  to be able to track the visibility of the session window to show/hide
  bars appropriately.

Bug: 222308557
Test: Manual, launch the assistant and verify the calls are made
Change-Id: I9b4bb27c9497b2a828616caf72eaf345b072c294
2022-04-23 05:56:27 +00:00
Simranjit Kohli
727ee17577 Merge "[Autofill Crash]: Fix NPE in AutofillManager." into tm-dev 2022-04-21 14:04:00 +00:00
Simranjit Kohli
1b57e4cc4c [Autofill Crash]: Fix NPE in AutofillManager.
Bug: 227192989
Test: atest android.autofillservice.cts.dropdown.AuthenticationTest#testFillResponseAuthServiceHasNoDataWithEmptyResponse
Change-Id: If56d690882e8d4ad0dba1534f127478089c4d04f
2022-04-20 18:10:23 -07:00
David Samuelson
37db6025c6 Ensure GameSessionTrampolineActivity launches intent once.
Test: Manually & passes newly added GameSessionTrampolineActivityTest
Bug: 229394334
Bug: 202414447
Bug: 202417255

Change-Id: I15ea072805439531fc89ee4f3038acc57f8c49ea
2022-04-20 18:23:48 +00:00
Lucas Silva
b6918681db Merge "Cleanup dream preview complication." into tm-dev 2022-04-20 16:17:50 +00:00