summaryrefslogtreecommitdiff
path: root/packages/SystemUI/tests/src
AgeCommit message (Collapse)Author
2022-05-07SystemUI: Show bluetooth battery levelLuK1337
Author: LuK1337 <priv.luk@gmail.com> Date: 2018-10-31 16:31:19 +0100 SystemUI: Show bluetooth battery level when available * Somewhat inspired by change committed by Gavin Ni <gisngy@gmail.com> back in cm-13.0 days (see commit 88e7a6c). Since then completely rewritten using BluetoothDevice API introduced in Oreo, with new drawables meant to be used with 0-9 battery level range. Change-Id: I6179bfd41e033591534e8cf3c6adc98ce715a13d Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: 2021-08-23 10:11:54 +0200 fixup! SystemUI: Show bluetooth battery level when available The current update method is triggered in 2 cases: the SystemUI bluetooth controller changes device state the battery level changed intent is sent Sadly the current SysUI controller doesn't handle battery level changes, and is instead triggered in a few other cases ( ex audio state changed ). And since we use the data from SysUI controller for battery level from changes in the global bt controller we may have 2 different set of devices to work on. This could ( and does ) trigger race conditions. Instead add support battery level state changes within the SystemUI controller to work on the same data set. Change-Id: Ib57096fc2ebe151ac3860277a4db2319f230b514 Change-Id: I34344907711b7b9fc4c1d15d4516bd53bf30ebb2
2022-05-06Screenshot: Append app name to filenameezio84
Author: ezio84 <brabus84@gmail.com> Date: Tue Dec 19 14:37:35 2017 +0100 Screenshot: append app name to filename Kang Samsung's idea. Change-Id: Ibc6a52b5e2597e6014a2da6a4211febe17ec02c7 Author: Wang Han <wanghan1995315@gmail.com> Date: Fri May 11 12:47:40 2018 +0200 SystemUI: Don't append app name to file on lockscreen When device is locked, current implementation will append the current app name to file when taking screenshot. This causes information leaks. To prevent this, we check for isKeyGuardLocked() and fall back not to append the app name when taking screenshot on lockscreen. Change-Id: I04498faf51986e1a3723a32befd97d29e1f3fe58 Author: DroidFreak32 <rushabshah32@gmail.com> Date: Thu Oct 4 11:33:07 2018 +0530 Screenshot: Append app name after screenshot date. Change-Id: I2ee5d65006ff22dfa381aae50e5757b8e7596e91 Author: ezio84 <brabus84@gmail.com> Date: Sat Jun 16 16:57:19 2018 +0200 GlobalScreenshot: Fix screenshot not saved with some languages like Virgin Islands English when taking a screenshot of the Settings app Change-Id: Ic04f66f5813b9597c96835d15c74509c93530a5c Author: Han Wang <416810799@qq.com> Date: Mon May 25 11:18:01 2020 +0200 SystemUI: Do not convert application name to ISO-8859-15 * ISO-8859-15 does not handle CJK chars, so all of them are 'unknown' and empty eventually. Change-Id: I27c689f5d737190d381146e49c1989e998b4f623 Author: LuK1337 <priv.luk@gmail.com> Date: Mon Aug 24 17:52:39 2020 +0200 SystemUI: Use TaskStackChangeListener API for contextual screenshot package name * This should hopefully fix mislabeled screenshots. Change-Id: Ifde106c0e306a6700081e4d724c1cf0c06dd126c Change-Id: Ic2a42536bf763a0c6f7fb9ac4bbbe84f73723f91
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2022-02-10Merge s-mpr-2022-02-05Matt Lee
Change-Id: I61ca87692541f793479961246a296db67593d73d
2022-01-06Merge s-mpr-2022-01-05Eric Arseneau
Change-Id: Ie250e3592a53519f58f691675a61adf7fddc335c
2021-12-25[DO NOT MERGE] Use orientation value from config change eventBeth Thibodeau
Before, when the device was rotated we would get the new orientation value from the event but then use the value from getResources() to decide which layout to show. This discrepancy is a potential cause for an issue where QS uses the landscape layout when the device was actually portrait Fixes: 159737544 Test: atest QSPanelControllerBaseTest QSPanelControllerTest Change-Id: Icd15712cd4821b7833a3373978a92f8b5959ac12 Merged-In: Icd15712cd4821b7833a3373978a92f8b5959ac12 (cherry picked from commit 917a11a54a41f79e01b176fb5d98d346e0f76ff5) (cherry picked from commit a8e1bbf7c0195875f4f6692a8108e2e48db2a255) Merged-In:Icd15712cd4821b7833a3373978a92f8b5959ac12
2021-12-25Don't allow background apps to change themeLucas Dupin
A background app that changes the wallpaper, was able to change the device theme. This change will apply the theme if the app is on the foreground, like WallpaperPicker would be, but would defer the event until the next power button cycles, like we do with Live Wallpapers, to avoid the same type of DoS. Test: manual Test: atest ThemeOverlayControllerTest Fixes: 205140487 Change-Id: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459 Merged-In: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459 (cherry picked from commit efaa814a99bc86992c0823f07b015b9a6f80ad75) Merged-In:I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
2021-12-25Fixed an issue where the statusbar was made opaque even though it wasntSelim Cinek
Because on Pixel 4 and other devices, the light reveal scrim doesn't have full alpha, the notification panel was marked opaque which removed the wallpaper. This could lead to the wallpaper not being visible in a couple of situations where it should have been, leaving AOD exposed. Because of a separate bug (b/196306312), whenever the wallpaper is hidden, we'd see a color layer, which would lead to the screen becoming flickery and awake on AOD. Fixes: 194760238 Test: atest SystemUITests Merged-In: I5a7e80e2ced8f15f1b215549d0c051f1d61d2953 Change-Id: I5a7e80e2ced8f15f1b215549d0c051f1d61d2953 (cherry picked from commit d61e4732c78c56182dff98508c41f61871a3d939) (cherry picked from commit 925211481c04e5861ce3b85e44f64bde09a67676) Merged-In:I5a7e80e2ced8f15f1b215549d0c051f1d61d2953
2021-12-25Tweak volume adjustment rulesOliver Woodman
Test: manual Bug: 197586676 Bug: 202500642 Merged-In: If531a23f5e7b242d3d637966b74b67acfd303199 Change-Id: If531a23f5e7b242d3d637966b74b67acfd303199 (cherry picked from commit 022081595bf4a082f8354b852eae6d5a015be3fe) Merged-In:If531a23f5e7b242d3d637966b74b67acfd303199
2021-12-22Merge s-mpr-2021-12-05Eric Arseneau
Change-Id: Ic2889f5eb531008340529eadc36ec8efc62b1984
2021-12-13Merge mpr-2021-11-05Eric Arseneau
Change-Id: If7c68a17857eee4194f28413b938d5647820162c
2021-11-24Tweak volume adjustment rulesOliver Woodman
Test: manual Bug: 197586676 Bug: 202500642 Merged-In: If531a23f5e7b242d3d637966b74b67acfd303199 Change-Id: If531a23f5e7b242d3d637966b74b67acfd303199 (cherry picked from commit 022081595bf4a082f8354b852eae6d5a015be3fe) Merged-In:If531a23f5e7b242d3d637966b74b67acfd303199
2021-11-24[RESTRICT AUTOMERGE] Hide Wi-Fi Scanning message when Location is disabled ↵Weng Su
(QS Internet Dialog) - When the location is disabled, the WiFi scanning service will also stop. - Bypass the WifiManager#isScanAlwaysAvailable() result. Bug: 203471614 Test: manual test on the device. atest -c InternetDialogControllerTest \ InternetDialogTest Change-Id: I2f159820d577f226e640b3ea735f6b18c52a16f7 (cherry picked from commit 194a61951688b8ed48b6c0e254398f66c5b1d79a) Merged-In:I2f159820d577f226e640b3ea735f6b18c52a16f7
2021-11-24[SystemUI] 1.Remove the unnecessary log 2. update signal icon in bg threadZoey Chen
1. The log should be controlled by the DEBUG, otherwise it will be printed infinitely and the performance will be very slow. The log can be removed after checking, so I removing it instead of adding the DEBUG tag. 2. Do too much get icon in the main thread, move it into bg thread 3. It is unnecessary that update the mobile data layout from the callback, onAccessPointsChanged, because it is used for Wi-Fi. Bug: 201200079 Test: manual and Q verified pass Change-Id: I5f4623f9ffb68fae6ca377625aaa039f0f33dd38 (cherry picked from commit 5f685c98cc877f61e0297a9507412cb83f83d84b) Merged-In:I5f4623f9ffb68fae6ca377625aaa039f0f33dd38
2021-11-10[RESTRICT AUTOMERGE] Hide Wi-Fi Scanning message when Location is disabled ↵Weng Su
(QS Internet Dialog) - When the location is disabled, the WiFi scanning service will also stop. - Bypass the WifiManager#isScanAlwaysAvailable() result. Bug: 203471614 Test: manual test on the device. atest -c InternetDialogControllerTest \ InternetDialogTest Change-Id: I2f159820d577f226e640b3ea735f6b18c52a16f7 (cherry picked from commit 194a61951688b8ed48b6c0e254398f66c5b1d79a)
2021-11-02Fixed an issue where using UDFPS always dismissed the shadeSelim Cinek
Because we were only checking for the bouncer to be shown and not the alternative auth interceptor, the unlock mode always ended up being unlock_collapse instead of dismiss_bouncer. The isBouncerShowing() was already taking into account the alternative auth path, but the bouncerIsOrWillBeShowing() didn't Fixes: 204049350 Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java Merged-In: Id8bf8460bff26ec5694c82466ea63e3cdf61216e Change-Id: Id8bf8460bff26ec5694c82466ea63e3cdf61216e (cherry picked from commit 571fdde909a333a3486d93ac94c677da787b4413)
2021-10-19[SystemUI] 1.Remove the unnecessary log 2. update signal icon in bg threadZoey Chen
1. The log should be controlled by the DEBUG, otherwise it will be printed infinitely and the performance will be very slow. The log can be removed after checking, so I removing it instead of adding the DEBUG tag. 2. Do too much get icon in the main thread, move it into bg thread 3. It is unnecessary that update the mobile data layout from the callback, onAccessPointsChanged, because it is used for Wi-Fi. Bug: 201200079 Test: manual and Q verified pass Change-Id: I5f4623f9ffb68fae6ca377625aaa039f0f33dd38 (cherry picked from commit 5a1bb06a0a8d6d730714f02826ab957a4cc220c7)
2021-10-15[RESTRICT AUTOMERGE] Add Wi-Fi Scanning notify to QS Internet DialogWeng Su
- Show message when Wi-Fi is OFF and Wi-Fi Scanning is ON - Don't show message when device is locked - Show a "Change" link to launch Wi-Fi Scanning Settings Bug: 202323013 Test: manual test to verify on the device. atest -c InternetDialogControllerTest \ InternetDialogTest Change-Id: I5eb4563a69e85050532c8b4fe3748e01cc7d9ca5 (cherry picked from commit 8c0847b0fe8df54c35fe747220d2c76ffe8a59c7)
2021-10-13[DO NOT MERGE] Fix DozeScreenBrightnessTest.Josh Tsuji
This was broken by ag/15974634, but the presubmits did not catch that for some reason. That CL changed the brightness logic to be <= the dim value, so this failure (and fix) make sense. Test: atest SystemUITests, since apparently treehugger won't do that and will +2 this anyway Fixes: 202212576 Change-Id: Ibe18322fbe1e1fbae86c5274615ad0b6f727c8e2 (cherry picked from commit 20d85a91d4d2ac22760111483b4bdeaecace6c5f) (cherry picked from commit fc534e4f63a4ac9953394cb69d2f8f25ca508464)
2021-10-13[DO NOT MERGE] Improve brightness handling during screen off timeout.Josh Tsuji
- Align doze brightness logic with DisplayPowerController, so that the 'minimum dim amount' is taken into account by DozeScreenBrightness. - Clamp brightness to the now-correct dim value during the entire screen off animation, rather than sometimes transitioning to the sensor value. Apply the sensor brightness value on changing to the DOZE Display state, which happens after the screen off animation. Bug: 194972547 Test: at 0%, 45%, and 100% brightness, allow the screen to time out in bright and dark rooms, observe minimal brightness changes Change-Id: I528a944e04f8906cd8c7740eea97dd8fba7c3d3e (cherry picked from commit 2c26ea64bc74c7c75e3f65bd9e8cebd6494571d5)
2021-10-13[RESTRICT AUTOMERGE] Add Wi-Fi Scanning notify to QS Internet DialogWeng Su
- Show message when Wi-Fi is OFF and Wi-Fi Scanning is ON - Don't show message when device is locked - Show a "Change" link to launch Wi-Fi Scanning Settings Bug: 202323013 Test: manual test to verify on the device. atest -c InternetDialogControllerTest \ InternetDialogTest Change-Id: I5eb4563a69e85050532c8b4fe3748e01cc7d9ca5
2021-10-13[DO NOT MERGE] Fix DozeScreenBrightnessTest. am: 20d85a91d4Josh Tsuji
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15994907 Change-Id: I3e7e18f6c023842eb6de84845246c0a66ff012f0
2021-10-12Merge "[DO NOT MERGE] Improve brightness handling during screen off ↵Josh Tsuji
timeout." into sc-qpr1-dev
2021-10-06[DO NOT MERGE] Fix DozeScreenBrightnessTest.Josh Tsuji
This was broken by ag/15974634, but the presubmits did not catch that for some reason. That CL changed the brightness logic to be <= the dim value, so this failure (and fix) make sense. Test: atest SystemUITests, since apparently treehugger won't do that and will +2 this anyway Fixes: 202212576 Change-Id: Ibe18322fbe1e1fbae86c5274615ad0b6f727c8e2
2021-10-06Update dozing state on clock view attachedBeverly
Else, the clock may animate in at the wrong font weight. Test: atest AnimatableClockControllerTest Test: manually swipe away all notifications on LS, see the large clock animate in at full font weight Fixes: 201615075 Change-Id: I139e5a5c88551f23f99decff3e7ffc8bdaa5bba4
2021-10-06[DO NOT MERGE] Improve brightness handling during screen off timeout.Josh Tsuji
- Align doze brightness logic with DisplayPowerController, so that the 'minimum dim amount' is taken into account by DozeScreenBrightness. - Clamp brightness to the now-correct dim value during the entire screen off animation, rather than sometimes transitioning to the sensor value. Apply the sensor brightness value on changing to the DOZE Display state, which happens after the screen off animation. Bug: 194972547 Test: at 0%, 45%, and 100% brightness, allow the screen to time out in bright and dark rooms, observe minimal brightness changes Change-Id: I528a944e04f8906cd8c7740eea97dd8fba7c3d3e (cherry picked from commit bb8219d84b2dcf91176674dabc856dc98fc03f7a)
2021-10-05Merge "[DO NOT MERGE] Improve brightness handling during screen off ↵Josh Tsuji
timeout." into sc-dev
2021-10-05Merge "Do not show the notification footer until the user is set up." into ↵Jeff DeCew
sc-dev
2021-10-05[DO NOT MERGE] Improve brightness handling during screen off timeout.Josh Tsuji
- Align doze brightness logic with DisplayPowerController, so that the 'minimum dim amount' is taken into account by DozeScreenBrightness. - Clamp brightness to the now-correct dim value during the entire screen off animation, rather than sometimes transitioning to the sensor value. Apply the sensor brightness value on changing to the DOZE Display state, which happens after the screen off animation. Bug: 194972547 Test: at 0%, 45%, and 100% brightness, allow the screen to time out in bright and dark rooms, observe minimal brightness changes Change-Id: I528a944e04f8906cd8c7740eea97dd8fba7c3d3e
2021-10-05[DO NOT MERGE] Improve brightness handling during screen off timeout.Josh Tsuji
- Align doze brightness logic with DisplayPowerController, so that the 'minimum dim amount' is taken into account by DozeScreenBrightness. - Clamp brightness to the now-correct dim value during the entire screen off animation, rather than sometimes transitioning to the sensor value. Apply the sensor brightness value on changing to the DOZE Display state, which happens after the screen off animation. Bug: 194972547 Test: at 0%, 45%, and 100% brightness, allow the screen to time out in bright and dark rooms, observe minimal brightness changes Change-Id: I528a944e04f8906cd8c7740eea97dd8fba7c3d3e
2021-10-05Merge SP1A.210812.016Haamed Gheibi
Change-Id: Id27ea30be4f20be6f5d7d6336c8f53d2644c8e25
2021-10-05Merge "Do not show the notification footer until the user is set up." into ↵Jeff DeCew
sc-qpr1-dev
2021-10-01Make sure udfps bouncer always shows when requestedBeverly
Even if the shade is expanding. This ensures that when the user expands a notification that is hiding sensitive content, that we still show the udfps bouncer even though the transition to shade is also occuring (which normally hides the udfps affordance). Test: manual, atest UdfpsKeyguardViewControllerTest Fixes: 197119617 Change-Id: Iac398a60ecf5137d0c3a8c77d700146e12fad0b7 (cherry picked from commit 5a5cd54366f2d64a0bdff6455f381e7746eb741a) Merged-In: Iac398a60ecf5137d0c3a8c77d700146e12fad0b7 (cherry picked from commit 1c79bbde1586666cbdd5a1127cb9c49f4ff881c7)
2021-09-29Merge "Fix issue where scrim would be transparent" into sc-qpr1-devLucas Dupin
2021-09-29Merge "Don't factor animating-to-sleep for nav bar visibility" into sc-qpr1-devWinson Chung
2021-09-28Fix issue where scrim would be transparentLucas Dupin
This is due to BiometricUnlockController#isBiometricUnlock() returning true after finishing unlocking. In order to have a more resilient logic, we can also verify if they device is already unlocked and the keyguard is gone. Test: manual Test: atest StatusBarTest Fixes: 200882274 Change-Id: I4e0aeeec407db1a9dcbcad2960315cb68d7ac3b3
2021-09-28Don't factor animating-to-sleep for nav bar visibilityWinson Chung
- Instead, just animate the current nav bar view (which doesn't cause insets changes). This should be safe to do because: 1) Nothing else animates the alpha of this particular part of the view hierarchy 2) Confirmed with SysUI folks that we always get onStartedWakingUp after onStartedGoingToSleep 3) This otherwise reverts to the same nav bar visibility logic in R Bug: 196789451 Bug: 190368572 Test: atest StatusBarKeyguardViewManagerTest Test: In three button nav w/ AOD, turn off the screen - also try above with interrupting the screen off animation - also try above with power button instantly locks disabled Change-Id: I1be44a9a8dbb8cea17bbf354a2e03dd4bad5a4a2
2021-09-28Merge "Keyguard indication area - owner info fix" into sc-qpr1-devTreeHugger Robot
2021-09-28Keyguard indication area - owner info fixMatt Pietal
There was discrepancy between how null values and empty strings were treated in KeyguardIndication and KeyguardIndicationController. This could lead to a crash in systemui. Modify the KeyguardIndicationController to match the logic in KeyguardIndication. Bug: 201339576 Test: KeyguardIndicationControllerTest Change-Id: I8b7b4d7b33b1ee809df17e64347c816f65a50727
2021-09-27[Ongoing Call] Remove the call chip when #onEntryCleanUp is called.Caitlin Cassidy
See bug comment #9 for an in-depth explanation. Test: New unit tests. Test: I created a test app that sends an ongoing call notification then removes it 200ms later, and I confirmed that the bug is triggered without this CL, and is fixed with this CL. Bug: 199600334 Change-Id: I0f681ccfe55597490bee0d4b190f9fb2c38e28f2 (cherry picked from commit cd755525c4f172862d27466f06f5d4230b57ade5) Merged-In: I0f681ccfe55597490bee0d4b190f9fb2c38e28f2
2021-09-27Merge "[DO NOT MERGE] Smartspace - Don't create session ahead of init" into ↵TreeHugger Robot
sc-qpr1-dev
2021-09-27[DO NOT MERGE] Smartspace - Don't create session ahead of initMatt Pietal
After the device is setup, if the smartspace component is not available/initialized, don't attempt to start a session. Fixes: 199986217 Test: atest LockscreenSmartspaceControllerTest Change-Id: I36d6f75b37cc5f5274b1cea3a35338f6da424a20
2021-09-27Merge "Update clock burn-in so it doesn't clash with udpfs" into sc-qpr1-devTreeHugger Robot
2021-09-27Make sure udfps bouncer always shows when requestedBeverly
Even if the shade is expanding. This ensures that when the user expands a notification that is hiding sensitive content, that we still show the udfps bouncer even though the transition to shade is also occuring (which normally hides the udfps affordance). Test: manual, atest UdfpsKeyguardViewControllerTest Fixes: 197119617 Change-Id: Iac398a60ecf5137d0c3a8c77d700146e12fad0b7 (cherry picked from commit 5a5cd54366f2d64a0bdff6455f381e7746eb741a) Merged-In: Iac398a60ecf5137d0c3a8c77d700146e12fad0b7
2021-09-27Update clock burn-in so it doesn't clash with udpfsBeverly
* update the UDFPS icon burn-in parameters to be in pixels because we don't want display density to increase the position movement * when the clock is centered aligned, we want to make sure it doesn't overlap with the udfps icon Test: atest SystemUITests, manually update clock times with with DozeUi.BURN_IN_TESTING_ENABLED enabled and see clock doesn't interfere with the UDFPS icon. Fixes: 192423460 Change-Id: I6f95fe3ad763971b804129b517f4c98192ab3674 Merged-In: I6f95fe3ad763971b804129b517f4c98192ab3674
2021-09-24Merge "Use orientation value from config change event" into sc-qpr1-devTreeHugger Robot
2021-09-24Use orientation value from config change eventBeth Thibodeau
Before, when the device was rotated we would get the new orientation value from the event but then use the value from getResources() to decide which layout to show. This discrepancy is a potential cause for an issue where QS uses the landscape layout when the device was actually portrait Fixes: 159737544 Test: atest QSPanelControllerBaseTest QSPanelControllerTest Change-Id: Icd15712cd4821b7833a3373978a92f8b5959ac12 Merged-In: Icd15712cd4821b7833a3373978a92f8b5959ac12
2021-09-23Do not show the notification footer until the user is set up.Jeff DeCew
Bug: 193149550 Test: follow repro steps Merged-In: I49e2b8bcec7b2ce0a9776ff30a64c07f24949da7 Change-Id: I49e2b8bcec7b2ce0a9776ff30a64c07f24949da7
2021-09-23Do not show the notification footer until the user is set up.Jeff DeCew
Bug: 193149550 Test: follow repro steps Change-Id: I49e2b8bcec7b2ce0a9776ff30a64c07f24949da7
2021-09-23Merge "[DO NOT MERGE] Only show lock icon background with UDFPS" into ↵TreeHugger Robot
sc-qpr1-dev