Commit Graph

3571 Commits

Author SHA1 Message Date
Lucas Silva
ecae4748db Merge "Use try-with-resource statement for dream metadata to ensure proper cleanup." into tm-dev am: 2aa3ecaf9e am: 11d36d2ff3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18700386

Change-Id: Iddaa9b911980877e14def72e5c1ff83d3b4ef82b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 14:35:52 +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
00d502f5a3 Merge "Add support for onReject and onError for external hotword." into tm-dev am: 90579f32b3 am: ddb61b7bbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18308197

Change-Id: I0a5e1da74b3d5096b518cda16d8911a05debe047
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 18:01:49 +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
Wenhao Wang
aef3f71243 Merge "Improve the REASON_LOCKDOWN docs" 2022-05-25 17:05:17 +00:00
Riddle Hsu
fa1480449b Merge "Do not force relayout for wallpaper visibility change" into tm-qpr-dev am: 9496a69d0b am: 0126c44904
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18558386

Change-Id: I4bc27fdf12e058f1caeb5991856f5139b6259057
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 06:59:16 +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
Wenhao Wang
ed13578a8b Improve the REASON_LOCKDOWN docs
Bug: 231496716
Test: N/A
Ignore-AOSP-First: pending fix for a security issue.
Change-Id: Ia3f9c45e4134a613f60583f5a4aeb66875dad41f
2022-05-24 17:25:55 -07: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
Shashwat Razdan
f801da6b01 Merge "Unlink to death before removing the callback wrapper in SmartspaceService/AppPredictionServic3e" into tm-dev am: 1ec2fe2e7d am: 187a2c4153 am: fb733f5bde am: 76c197d97d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18475472

Change-Id: I8a44cb0b27d3dce9b694b0f093032b1375c9231c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:47:39 +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
Thiébaud Weksteen
a7a7a9c106 Merge "Migrate game service to @EnforcePermission" 2022-05-23 02:34:15 +00:00
TreeHugger Robot
20c445f403 Merge "Finish DreamActivity on creation if it is obsolete" into tm-dev am: abfe28784c am: 1f9957c76c am: 3daba43266 am: 952a847ebf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18090283

Change-Id: I89ef96997629031104f4fffb381eb0db83ac3916
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 22:54:12 +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
Thiébaud Weksteen
430aff9586 Migrate game service to @EnforcePermission
Transition to AIDL annotations which automatically generate the required
permission checks.

Test: atest CtsGameServiceTestCases
Bug: 220214993
Change-Id: I61cbb7f67c9a194b289bc34024def82c05aef447
2022-05-19 23:45:10 +00:00
TreeHugger Robot
0084f79e51 Merge "Fix SearchUiService memory leak by removing DeathRecipient from CallbackWrapper" into tm-dev am: ea56fc681f am: f4aa226b18 am: 85284c84b6 am: 9ef1752773
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18453442

Change-Id: I1a5f240b3fee25bb77c530b09a678bcb4a2a2707
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 09:04:30 +00: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
Chet Haase
b68f279eef Merge "Pause animators when app is not visible" 2022-05-16 22:57:06 +00:00
Chet Haase
298ab29152 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
Test: new AnimatorLeak CTS test, plus manual testing for activities
    and wallpapers

Change-Id: I8b9f841cc80babb972244c724968a5c085a06b69
2022-05-16 17:53:35 +00:00
Vania Desmonda
06c0543a5a Merge "Prevent duplicate calls to updateSurface() and recursive call to updateSurfaceDimming()." into tm-dev am: eb0f10153f am: 40b4d77c68
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18343949

Change-Id: I4156da4da404e0f89e8141198c65fae91c4cbbd1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 09:04:38 +00: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
TreeHugger Robot
000f3f18b0 Merge "Inform Assistant when security exception occurs during onDetected" 2022-05-12 20:16:57 +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
Peter Li
dde8e3e9db 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
Change-Id: Ideb210d4364d4c48c747d66268d77a2f5b017186
Test: atest HotwordDetectionServiceBasicTest
2022-05-12 09:40:50 +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
2210bfacd8 Merge "Revert "Avoid calling updateSurface twice when dimming is applied."" into tm-dev am: 05aa78241d am: fb6accb1a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18231745

Change-Id: I1afbf33d225a8d75f1f03df58d306c77f2029346
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:47:47 +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
d1f45a2e1f Merge "Move CtsQuickAccessWalletTestCases to presubmit-large." into tm-dev am: c6b20b66d5 am: f929891be2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18187228

Change-Id: I9179ad74c0f9037e5ad9577ae6b878530bbd14b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:51:11 +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
Thiébaud Weksteen
dcbe3bd826 Merge "Migrate OemLockService to @EnforcePermission" 2022-05-05 03:32:38 +00:00
Xiaowen Lei
39d02f5ee2 Merge "Add WM transit types for dream activity." into tm-qpr-dev am: 15e2cd9298 am: 0b61ab32c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17696084

Change-Id: I9e444c6f3d47bd899e8f18ea37a25fdf82d5ab1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 23:48:56 +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
1e6b5ac631 Merge "Avoid calling updateSurface twice when dimming is applied." into tm-dev am: bc99f623d4 am: fa9f19cff0 am: add6e383a4 am: a0469e2f69
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17982482

Change-Id: Ic30f40b9c1d518f717fc41ab7b363a0394828b55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 10:59:27 +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
Andrea Ambu
ae825ce308 Merge "speech: Allow isolated process to start ODSR" 2022-05-04 09:28:05 +00:00
Automerger Merge Worker
c749871c93 Merge "Merge "Revert "Marshal dream overlay connection logic with Handler."" into tm-qpr-dev am: b5e24da991 am: f75a1c673b" 2022-04-29 21:08:42 +00:00
Bryce Lee
766e88d0bc Merge "Revert "Marshal dream overlay connection logic with Handler."" into tm-qpr-dev am: b5e24da991 am: f75a1c673b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18051655

Change-Id: I8411b56e3ce2ca6354f5a8de4fc3923071e16f07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 21:08:13 +00:00
Bryce Lee
a799d0c659 Merge "Unbind from dream overlay in onUnbind." into tm-dev am: 493062c55e am: fbfdee614e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18054667

Change-Id: Iba0ee0c364f02341c562dcb0da6e575566f59d79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 21:08:10 +00:00
TreeHugger Robot
56facacf9b Merge "Make GameSessionTrampolineActivity invisible" into tm-dev am: a74842fe07 am: 676ed3c387
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17831912

Change-Id: Ie3bb1aaf0561c599d4d4d52094b31366f7655141
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:29:01 +00:00