Commit Graph

3033 Commits

Author SHA1 Message Date
TreeHugger Robot
668495d752 Merge "Ensure package context used by System UI has a valid userId." into sc-qpr1-dev am: e7f5a37501
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15584842

Change-Id: Ief73f955c719d82ca6c5bbe446f6da71af639551
2021-09-15 11:45:14 +00:00
TreeHugger Robot
e7f5a37501 Merge "Ensure package context used by System UI has a valid userId." into sc-qpr1-dev 2021-09-14 20:29:02 +00:00
Jeff DeCew
9d1e05c6b3 Ensure package context used by System UI has a valid userId.
Fixes: 189924598
Bug: 194356170
Test: atest SystemUITests
Test: atest android.service.notification.StatusBarNotificationTest#testGetPackageContext_worksWithUserAll
Change-Id: Ic43a0301cb62ab27e276c2938012a27c3a9a6fff
2021-09-14 13:39:45 -04:00
Wu Ahan
a3921a91f4 Merge "DO NOT MERGE: Fix temporary black after setting a new image wallpaper" into sc-qpr1-dev 2021-09-13 15:54:44 +00:00
Ahan Wu
7af300eea6 DO NOT MERGE: Fix temporary black after setting a new image wallpaper
Sometimes see temporary black wallpaper after setting a new image
wallpaper because of:
- decode bitmap twice, results in long latency until drawing.
- the set wallpaper apis didn't sync with wallpaper rendering well.
Solutions:
- Only decode bitmap when necessary.
- Make set wallpaper apis wait for image wallpaper rendering finished.

Bug: 194080642
Test: see b/194080642#comment3
Test: atest WallpaperManagerServiceTests --iterations 50
Test: atest SystemUITests
Change-Id: I369eff5195571161cf286b3ec97175481b02eed7
2021-09-13 18:53:27 +08:00
Wu Ahan
14dbc9facc Merge "Fix temporary black wallpaper after setting a new image wallpaper" into sc-v2-dev 2021-09-10 03:53:42 +00:00
Adam He
e6664abbc8 Merge "Fill in javadocs for translation feature." into sc-dev am: 1553fc7fad am: 4b02f45293
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15597859

Change-Id: I538dd665f0f322cfe01ce79d83f1fde064749329
2021-09-09 16:23:06 +00:00
Ahan Wu
9c7a45f339 Fix temporary black wallpaper after setting a new image wallpaper
Sometimes see temporary black wallpaper after setting a new image
wallpaper because of:
- decode bitmap twice, results in long latency until drawing.
- the set wallpaper apis didn't sync with wallpaper rendering well.
Solutions:
- Only decode bitmap when necessary.
- Make set wallpaper apis wait for image wallpaper rendering finished.

Bug: 194080642
Test: see b/194080642#comment3
Change-Id: I369eff5195571161cf286b3ec97175481b02eed7
2021-09-09 00:10:44 -08:00
Adam He
47cb06a213 Fill in javadocs for translation feature.
Bug: 190236094
Test: atest CtsTranslationTestCases
Change-Id: I4d3e68cb4de4ca003f6f2cf1c0be626b91c0de97
2021-09-07 23:38:09 +00:00
Ahaan Ugale
ed81a6aac9 Merge "Shutdown hotword detection service when software hotword detector is shutdown" into sc-dev am: 870c4116c1 am: aa0b719c40
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15461817

Change-Id: I2d5ee271b6f24884baaf0db774a598340d787b38
2021-08-07 03:43:31 +00:00
Ahaan Ugale
870c4116c1 Merge "Shutdown hotword detection service when software hotword detector is shutdown" into sc-dev 2021-08-07 03:10:13 +00:00
Ahaan Ugale
6c1b160aa4 Merge "Make Trusted Hotword session permissions follow previous behavior" into sc-dev am: e81ea6bebd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15474471

Change-Id: I356f3384b26713de01e4b9948ccb409a81e287c9
2021-08-06 19:36:27 +00:00
lpeter
3c3465dd3b Shutdown hotword detection service when software hotword detector is shutdown
Currently we have AlwaysOnHotwordDetector and
SoftwareHotwordDetector, when the app creates the detector,
it will create a HotwordDetectionConnection to communicate
with HotwordDetectionService.

Problem:
AlwaysOnHotwordDetector will work incorrectly if the app
creates SoftwareHotwordDetector first, then creates
AlwaysOnHotwordDetector later.

A simple flow is that the app created a
SoftwareHotwordDetector and used it. After a while,
the app may want to use AlwaysOnHotwordDetector,
so it will create a new AlwaysOnHotwordDetector.

By the original flow, it only allows to keep one detector,
so the system will shutdown the old
detector(SoftwareHotwordDetector) and create the new
detector(AlwaysOnHotwordDetector).

Because we don't clear the connection when shutdowning
SoftwareHotwordDetector (PS: We clear the connection
when shutdowning AlwaysOnHotwordDetector), it will use the
previous connection when creating the AlwaysOnHotwordDetector.

Root cause:
Because we don't shutdown hotword detection service when
software hotword detector is shutdown, the new creating
AlwaysOnHotwordDetector will use the previous
HotwordDetectionConnection to communicate with
HotwordDetectionService.

Due to the callback in HotwordDetectionConnection is for
SoftwareHotwordDetector, it can not pass the right data
to AlwaysOnHotwordDetector.

Solution:
Shutdown hotword detection service when software hotword
detector is shutdown.

Bug: 195604579
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Test: manual - DSP and non-DSP
Change-Id: I999dc4cc9d5ce858127a9b44db261d7abee98929
2021-08-06 13:11:46 +08:00
Ahaan Ugale
3873a09959 Make Trusted Hotword session permissions follow previous behavior
A prior change to the permissions flow for Trusted Hotword
(I80dabaf6ae0e781028dde16ead3321fbff319542) made the system enforce
the required permissions on the APIs the conventional way - by throwing
a SecurityException. But the existing behavior was to silence these
exceptions and instead return error results. This change brings back
the old behavior which exists in the SoundTrigger layer.

Also removes permissions checks for a couple of APIs to again be
consistent with the old behavior (and the current behavior in the
SoundTrigger layer).

Fix: 193116894
Test: manual - remove permission and reboot / remove permission after
 boot, stop/start reco
Test: atest HotwordDetectionServiceBasicTest
Change-Id: I56391260fd4375a04233eb3261bacec8696bda99
2021-08-06 02:19:30 +00:00
Mariia Sandrikova
809e26fc6a Merge "Freeze live wallpaper for letterbox background." into sc-v2-dev 2021-07-30 15:00:37 +00:00
Mariia Sandrikova
a829124577 Freeze live wallpaper for letterbox background.
With this change, WallpaperController sends "freeze" / "unfreeze" commands when the app window is letterboxed / not letterboxed indicating that:
- "freeze": a screenshot of the wallpaper is taken by WallpaperServices and put on top of the main surface while the wallpaper host is notified through onVisibilityChanged(false) callback that it's no longer visible.
- "unfreeze": a screenshot of the wallpaper is removed and the wallpaper host is notified through onVisibilityChanged(true) callback if the wallpaper is visible again (e.g., if transitioned from an app to the Home screen).

Logic isn't applied to static wallpapers.

When wallpaper size changes while being frozen, the screenshot is scaled and cropped to adjust to the new size.

Fix: 177884751
Test: Manual, atest WallpaperServiceTest, WallpaperServiceTests
Change-Id: If0300478cdccc07d226117e01ce3d43aa0b432a0
2021-07-30 12:58:34 +01:00
Jay Aliomer
c9a1208fb5 Merge "WallpaperService crashes becuase of a log statement" into sc-dev am: c2d9287c97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15403905

Change-Id: I467a74c250473e45fe76db8ad5ee064b6328e1e9
2021-07-29 19:14:54 +00:00
Ahaan Ugale
342d24c807 Merge changes I212ad58c,Idf5dd82d into sc-dev am: 0e3d3b90ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15360457

Change-Id: I9175ddb251f30c0eaff0e3549e7bd31f28d40623
2021-07-28 18:24:20 +00:00
Vishnu Nair
14217fe4a9 Merge "Wallpaper: Propagate transform hint from WM to BBQ surface" into sc-dev am: 2dfdf43732
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15372415

Change-Id: I757146bb57ea3cc9ac57ca159e444d004b481972
2021-07-28 14:59:27 +00:00
Jay Aliomer
959dd9c06a WallpaperService crashes becuase of a log statement
Log.wtf should have been Log.e and it is only an informative log

Fixes: 192327606
Test: WallpaperServiceTest
Change-Id: I2e13cf6f7f7abffbb8d3f28aeaa0605711085157
2021-07-27 21:06:03 +00:00
Tiger Huang
090c0cbcb0 Use InsetsVisibilities to carry requested visibilities
InsetsState contains much more information than visibilities, such as
display frame, display cutout, rounded corners, privacy indicator
bounds, and frames of of insets sources. The control target only needs
to send the requested visibilities to WMS, so it can be too heavy to use
InsetsState.

This CL introduces an new class, InsetsVisibilities, which only contains
which type has which visibility. So it uses less memory, and it is more
efficient on copying and checking the equality.

Fix: 194186241
Test: atest InsetsVisibilitiesTest WindowAddRemovePerfTest
            InsetsControllerTest RegisterStatusBarResultTest
            CommandQueueTest LightsOutNotifControllerTest
            ActivityRecordTests DisplayContentTests
            DisplayPolicyLayoutTests InsetsPolicyTest
            InsetsSourceProviderTest InsetsStateControllerTest
            WindowFrameTests WindowManagerServiceTests WindowStateTests
Change-Id: I86c1b26b4383bfa3b924726d580e5706e13ba735
2021-07-26 21:55:34 +08:00
Ahaan Ugale
0e3d3b90ec Merge changes I212ad58c,Idf5dd82d into sc-dev
* changes:
  Provide the way to enable/disable debug mode for logging egressed data
  Set the Debug flag to false
2021-07-24 06:54:24 +00:00
Vishnu Nair
3fb3632d43 Wallpaper: Propagate transform hint from WM to BBQ surface
This allows the buffer producer to consume the transform hint
for the first frame.

Bug: 194425759
Test: Rotate static wallpaper and check transform sent to HWC for wallpaper layer
Change-Id: I7f688c35ea836f57e3443e03d584fa85e745c6f9
2021-07-23 09:54:02 -07:00
lpeter
2d28217de6 Set the Debug flag to false
Set the Debug flag to false, but we also reserve some logs
for clarifying the issue.

Bug: 177502877
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: Idf5dd82d8db27bb682b473eb4584e8b230073d08
2021-07-23 14:46:29 +08:00
Julia Reynolds
77f42843ac Merge "Ensure non null package" into sc-dev 2021-07-14 13:44:53 +00:00
Julia Reynolds
b49cc8510d Ensure non null package
Switch most usages of rule.pkg over to rule.getPkg() except for
ones that render Settings UIs, where a null package implies the UI
should be shown differently

Test: atest; trigger DND with a rule created before we started storing pkg
from the creating app rather than inferring it
Fixes: 191827482

Change-Id: I8fce30077d9e457ab0402b913dc551e55de2ee8f
2021-07-13 17:02:04 -04:00
Joshua Baxter
37fb04a630 docs: fix typo
bug: 178232693

Change-Id: I28d5af80c56c0f4b7771691a6466fdc6f4ee55a9
2021-07-13 00:36:10 +00:00
Ahaan Ugale
c5e855a9d9 Check/note ops when delivering HotwordDetectedResult
This is partially a followup of
I80dabaf6ae0e781028dde16ead3321fbff319542 which removed these operations
from the SoundTrigger layer when the HotwordDetectionService is used.

Also fixes a race condition where the DSP event can go directly to the
Interactor if the DetectionService isn't connected.

Bug: 186164881
Test: atest HotwordDetectionServiceBasicTest
Test: manual - DSP and non-DSP
Change-Id: Iee3b00c6c08597ad1993fae677e9f8ae2f60744c
2021-07-12 17:42:24 +00:00
lpeter
77fd9ff1fa Limit the max value for hotword offset and audio channel
Currently we limit the max value of hotword offset to 1 hour and
audio channel to 63.

Bug: 190688148
Bug: 192331590
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I38379b77c2ab5ceb6c3b84f94e415bfe9f4c54e8
2021-07-06 11:44:11 +08:00
TreeHugger Robot
aa2c737e51 Merge "Init HotwordDetectionSrvc identity earlier" into sc-dev 2021-07-03 04:41:08 +00:00
Ahaan Ugale
cb8ebd1151 Init HotwordDetectionSrvc identity earlier
Grants mic access to the process as soon as it comes up, instead of
waiting for the initialization status callback.

Bug: 190011174
Test: manual - dsp and non-dsp; restarting while invoking the hotword
Test: atest CtsVoiceInteractionTestCases
Change-Id: I54e0b42868f663ae1c9edd9bcf4aaee2a13b827a
2021-07-02 19:06:06 -07:00
TreeHugger Robot
023fa14302 Merge "Logging the number of bits egressing from the hotword trusted process" into sc-dev 2021-07-02 07:48:25 +00:00
lpeter
53de9e92d7 Logging the number of bits egressing from the hotword trusted process
Bug: 192331590
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I08329643d94655f762787a7a49567e19bbbfbe9c
2021-07-02 12:20:27 +08:00
Adam He
c254f87c57 Merge "Remove activity name from autofill metrics logger." into sc-dev 2021-07-01 18:38:06 +00:00
Silin Huang
3d9cf89d06 Add a tile service meta-data for QuickAccessWalletServiceInfo that
fetches a drawable for wallet tile.

The wallet tile will get the icon drawable from QAW client; if it
doesn't exist, fall back to the static icon in SysUI.

Test: manual
Bug: 190606984
Fixes: 190539096
Change-Id: I2d822ee34c8e4b27ae72e86186b0d78f2b52854f
2021-06-30 22:28:01 +00:00
Ryan Mitchell
b3659d36b0 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev
* changes:
  Revert^2 "Apply overlay changes with config change"
  Revert^3 "Deprecate Context#createApplicationContext"
2021-06-30 20:58:43 +00:00
Ryan Mitchell
350c2669d6 Revert^3 "Deprecate Context#createApplicationContext"
This reverts commit cb5a80ea57.

Reason for revert: Was not the cause of the test failure

Fixes: 186622527
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I705854f080200f0465d94a7754e710f05a3ec92c
2021-06-30 15:53:45 +00:00
Adam He
4ed8a9b1c6 Remove activity name from autofill metrics logger.
Bug: 192370727
Test: atest CtsAutoFillServiceTestCases
Change-Id: I88765d5ef92ed9fb03bc5c3c161ddad22e297fd6
2021-06-29 15:52:34 -07:00
Paul Hobbs
8d440c0566 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev
* changes:
  Revert^2 "Deprecate Context#createApplicationContext"
  Revert "Version LoadedApk cache using base code path"
  Revert "Apply overlay changes with config change"
2021-06-29 20:36:15 +00:00
Paul Hobbs
cb5a80ea57 Revert^2 "Deprecate Context#createApplicationContext"
Bug: 192242649

5a41b45a85

Change-Id: Idcebd68e0079e7e87de04ae25069b3a9ff72093c
2021-06-29 20:06:45 +00:00
TreeHugger Robot
0954cfe651 Merge "Specify the wallpaper blast wrapper is a wallpaper window" into sc-dev 2021-06-29 16:12:22 +00:00
Vishnu Nair
c59eff487b Specify the wallpaper blast wrapper is a wallpaper window
SurfaceFlinger scheduler keys off the window type to implement some
refresh rate selection logic. If a layer has window type wallpaper, then
the refresh rate vote is set to min. With Blast, the actual buffer will
arrive in a layer without the window type metadata. Fix this by
setting the metadata on the blast bbq layer as well.

Test: check if wallpaper runs at a lower refresh rate
Fixes: 191222072
Change-Id: I50058cf42fca155630354ea247d12511ebfe37a8
2021-06-28 23:41:58 +00:00
Ryan Mitchell
5a532f6eed Merge changes Icf81845d,Iea54abf3,I98656314 into sc-dev
* changes:
  Apply overlay changes with config change
  Version LoadedApk cache using base code path
  Revert "Deprecate Context#createApplicationContext"
2021-06-27 06:27:58 +00:00
TreeHugger Robot
6a72ef35a7 Merge "NullPointerException when retriving wallpaper page areas" into sc-dev 2021-06-25 19:45:24 +00:00
Jay Aliomer
bc32a51ceb NullPointerException when retriving wallpaper page areas
Fixes: 191293701
Test: manual
Change-Id: I18c4d627f29848b50bb8c7dc2b4a02627ff3a89b
2021-06-25 13:50:57 -04:00
Joanne Chung
5f980cbdaf Merge "Add hidden TYPE_ACTIVITY_STARTED to allow notify activity start event." into sc-dev 2021-06-24 03:48:29 +00:00
Joanne Chung
cdcf3a8339 Add hidden TYPE_ACTIVITY_STARTED to allow notify activity start event.
The current launcher implementation, the resumed Activity doesn't
enter paused state when entering overview. The launcher will have
a start activity event when entering overview but we don't provide
start event now.

We are not allowed to add new APIs now, we add new hidden constant
constants in ActivityEvent and send the event when the activity is
started.

Bug: 189968849
Test: manual. Checks if the activity start events are received by
ContentCaptureService
Test: atest ActivityRecordTests

Change-Id: I8e4f8b7ac8f24c66ccad9f7e884cac9e20ce3cc6
2021-06-24 10:04:14 +08:00
TreeHugger Robot
7712f3bc0a Merge "Validate the HotwordDetectedResult" into sc-dev 2021-06-23 13:29:09 +00:00
Ryan Mitchell
5a41b45a85 Revert "Deprecate Context#createApplicationContext"
This reverts commit c54ebba25b.

Bug: 188059515
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I986563142dac135281889e811e6e5219d728d5d1
2021-06-22 22:30:38 -07:00
Sergey Volnov
56686819a8 Merge "Implement preriodic trusted process restarting for hotword detectors." into sc-dev 2021-06-22 13:33:08 +00:00