Adding logs to track the order of function callings therefore tracking the status of mDozeAmount.
Bug: 250946719
Test: NotificationWakeUpCoordinatorTest
Change-Id: Ie4fb6dc09cc523425e46b403a66726d5cfa63c35
After ag/20514286, the DeviceStateProvider no longer reports state if
the sensor values do not match the declared states. For the invalid
sensor config test, the onStateChanged() will not be called because the
sensor config is invalid.
(I thought presubmit would run all the tests, so I didn't run them
locally when submitting ag/20514286.)
Fix: 260572046
Test: atest FrameworksServicesTests:com.android.server.policy.DeviceStateProviderImplTest
Change-Id: Ic7aa004747fa940aa3445ed537dd76ee00c72553
This CL adds support for multi-users to the customizable lock screen
quick affordance system.
The process that creates windows and renders System UI is always the
primary user's system UI process. The process that owns the content
provider accessed by Wallpaper Picker is bound to the currently-selected
user on the system, which may be different than the primary user.
What this means is that, when switching to a secondary user, what the
Wallpaper Picker sees is fed to it from a secondary system UI process
which is not the same system UI process that is rendering the
affordances on the lock screen. Therefore, it didn't work.
This CL adds a "remote user" selection manager which the repository can
switch to when it's running on the primary user process but needs to
query the state of the selected affordances for a secondary user.
The "remote user" selection manager queries the content provider
associated with the system UI process linked to the secondary user. This
way, we can display the correct affordances on the screen, even when
switching to a secondary user.
Fix: 260251307
Test: included new and expanded unit tests. Manually verified that the
selection of quick affordances for the primary and secondary user are
correctly reflected on the lock screen when switching users and is
retained even after switching away and back.
Change-Id: I281577ed6efb987c23b19c2078e77c91e45ce9f2
Right now, if a user turns their device (or work profile) on after it's
been off for a while, they can get flooded with visual interruptions
(like heads-up notifications) from 'stale' notifications -- recently
posted, but pertaining to something that happened over a day ago.
This change will, when the included feature flag is enabled, suppress
visual interruption for notifications with a 'when' field set more than
24 hours in the past.
Bug: 240552967
Bug: 253055301
Test: atest StatusBarNotificationPresenterTest
Change-Id: I6e8b29cd9865370fb5ad34d4b74e0f8a40e63229
We want to share this code between System UI and ThemePicker.
Fix: 259728815
Test: System UI and WPPG both build and work end-to-end with
customizable lock screen quick affordances.
Change-Id: If2fe99c5d679da57e00c6fcece10a1d2fc9ca807
This was needed because of a Dagger-related crash when querying the
content provider while a secondary user is selected. I don't understand
why it was happening, but this fixes it and is a safe fix.
Also formats the file using `ktfmt`.
Bug: 254333599
Test: when signed in with a secondary user and querying the quick
affordance content provider from the wallpaper picker experience, we no
longer see a crash.
Change-Id: Ie195b21934179576051371181560c2263284b98c
Adds support for backup & restore of the currently-selected quick
affordances on the lock screen.
Only supports user 0 for now. A future CL will add support for additional users since the feature is broken for multi-user anyway (see b/260251307).
Fix: 258278136
Test: added test case. Manually verified, using the instructions from
go/localtransport that selecting some affordances, then triggering a
backup, then changing the selections and triggering a restore properly
restores the initial set of selections.
Change-Id: I9f2a51287a7467af95e7824f2b1804baba962099
If the user attempts to FP auth, we will listen for FP
detection (as opposed to authentication or not at all). If the
user places their finger on the FP sensor, without running the
FP matcher, we can show the bouncer.
Additionally, update the logic when switching users. Immediately
after a user switch, cancel the FP listening state and then
restart based on the new state (because it may change to/from
detect or authenticate).
Repro steps:
1. Enable extra logging:
adb shell settings put global systemui/buffer/KeyguardUpdateMonitorLog v
2. Setup side fps
3. Fail side fps 5 times to lock out fp
4. See logs that SysUI is running detectFP ("startListeningForFingerprint - detect")
5. Attempt FP => bouncer appears
Test: atest KeyguardUpdateMonitorTest
Test: atest SystemUITests
Bug: 245778799
Change-Id: Ic1d4984c7514fc96b6552267128dee814730bb30
Merged-In: Ic1d4984c7514fc96b6552267128dee814730bb30
Bug: 260404638
Test: UserInteractorTest.kt test modified to ensure guest can be switched to while on secondary user
Change-Id: I26ff794b024173c9833c64668e464068555a8a84