summaryrefslogtreecommitdiff
path: root/packages/SystemUI
AgeCommit message (Collapse)Author
2022-06-29SystemUI: Fix suspicious spaces around mobile iconsLibXZR
When dual SIM is in use, I could observe random but suspicious spaces around mobile signal icons. This could happened especially after expanding and collapsing the QS panel. This is caused by unmatched size between StatusBarMobileView and its only child. More debugging deepening into the sdk is needed for me to find out the real reason. I'm lazy, so let's bind the measurement to its only child for a quick fix. Change-Id: Id6b4e38b31a9de5061ac332d319d313ecf11c177 Signed-off-by: LibXZR <i@xzr.moe>
2022-06-29SystemUI: Fix unintended wakeup with biometric unlock enabledLibXZR
This hack fixes the issue that the screen is randomly turned back on right after being turned off without changing the original behavior. We still need to wait for Google to come up with a proper fix. Change-Id: I5ce99e72bcffe160fca9f4478058d3fcb51eca78 Signed-off-by: LibXZR <i@xzr.moe>
2022-06-03SystemUI: Add left padding for keyguard slicesLuK1337
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/4620 Change-Id: I2735028472aa46bad412c69948936fb30c5fa36c
2022-06-03SystemUI: Catch IllegalArgumentException in updateHint()LuK1337
Apparently this can fail for some very unlucky users? Change-Id: I3609746f9b577b91525fd64f586c2e79663f9ada
2022-06-03SystemUI: Nuke oriented navbar handleIdo Ben-Hur
Change-Id: I39e0dd89b53244e1458c87648af50439348fa150
2022-06-03SystemUI: Add TeleService and CNE to location indicator whitelistLibXZR
Change-Id: I735642c55bc3da24d0b036400bb523d112026bf1
2022-06-02Merge tag 'LA.QSSI.12.0.r1-07600-qssi.0' into sugisawa-mr1alk3pInjection
"LA.QSSI.12.0.r1-07600-qssi.0" Change-Id: I17291c56a5444a9f8e47f5da76617beba25cd784
2022-05-07SystemUI: Use default letter spacing for QS tilesDanny Lin
Use Inter Dynamic Metrics instead. Change-Id: I0e4335bab1800717b84d76e4f45d0db06db517e7
2022-05-07SystemUI: Update keyguard clock metrics for Inter fontDanny Lin
Font metrics are used to calculate the big keyguard clock's pivot point. Update the metrics to match our clock font, Inter, in order to fix clock misalignment as compared to using Roboto's metrics for Inter. New metrics, mostly from the Inter readme [1]: - UPM = 2816 - Cap height = 2048 - Total height = 3072 (from ttx-decompiled yMax) [1] https://github.com/rsms/inter#design Change-Id: I88129acf00dac487a111cd0b71871838dc3e9c93
2022-05-07SystemUI: Update lock screen clock typography for Inter fontDanny Lin
In my opinion, geometric 6 and 9 glyphs look better when used in a large, prominent number-focused context, similar to Google Sans Clock on stock. Our default font, Inter, support this in the form of font features; we just need to enable it. Font features need to be changed here (not res-keyguard/font/clock.xml) because they differ by clock type. This also fixes an issue where some times cause uneven width mismatches between the top and bottom lines of the large clock. Small clock: - pnum (proportional numbers; default for Inter, but it doesn't hurt to leave the AOSP flag) - cv03 (geometric 6) - cv04 (geometric 9) Large clock: - tnum (tabular numbers; fixes mismatching widths in large clock) - cv03 (geometric 6) - cv04 (geometric 9) Change-Id: Ieb2ad15417454d05abc5f33b11f7364e97b4e365
2022-05-07SystemUI: Add back charging rippleaswin7469
This partially reverts commit c813aecf758a915348a98f58f6ad61997c246ed1. Change-Id: I78bb4b2934a792c34d820760c83b023514656296
2022-05-07SystemUI: Do not show location indicator for some packagesLibXZR
The location indicator is frequently showed when wireless headsets are connected, which disturbes a lot especially when watching videos or playing games in landscape mode. Change-Id: I94deddb62b5b48d3eee153880d40c1928e776ebc Signed-off-by: LibXZR <i@xzr.moe>
2022-05-07base: Long press power button to toggle flashlight [1/2]ezio84
* Thanks to beanstown106 for the initial longpress action calls in PhoneWindowManager (improved by lineage guys) * Remove the settings pref if the device doesn't have flashlight * Vibrate when toggling torch to let the user know of unwanted toggling in the pocket (even if vibration is disabled by user) * Allow torch action also on ambient display [AEX Edits] : - Port to S - simplify code [mydongistiny]: - Fixed for android10 [DennySPB] : - base: ScreenOff torch: Allow to disable torch when screen is on [mickaelmendes50] : - Adapt to AOSPA * We don't allow users to use the Double Press power option, so remove the non used code. * Removed "double press power to toggle torch" * Removed "handle camera gesture here instead of extensions" * Removed "Add 170ms delay for double tap action" Change-Id: I12da044f86c7b625872607529cf8524615cf576b
2022-05-07SystemUI: Implement hide gestural navigation hint bar [1/2]Jesse Chan
Author: Jesse Chan <jc@lineageos.org> Date: Tue Jun 2 13:59:52 2020 +0800 SystemUI: Set no hint overlay to highest priority As overlays are also used to apply navigation mode, it is needed to set our customization overlay to highest priority to ensure it is applied. Change-Id: I41ca4b7ea99fea9f62d2e8ece5114f682e8e7fe9 Signed-off-by: Jesse Chan <jc@lineageos.org> Change-Id: Ic6695dfe929db443f169d59f153e14a6de249590 Signed-off-by: Jesse Chan <jc@lineageos.org>
2022-05-07SystemUI: allow devices override audio panel locationa.derendyaev
Some devices have volume buttons on left side and it not fancy if volume panel will be at right side. You can override panel location using overlay for SystemUI: <!-- Allow devices override audio panel location to the left side --> <bool name="config_audioPanelOnLeftSide">true</bool> Change-Id: If41456f71ffd18466166e7b4120ff34d9e6f5a46
2022-05-07SystemUI: Introduce user interface for Alert SlidersChris Crump
Ported from OxygenOS and reworked for our alert slider implementation. We target AudioManager instead of Zen, icons are also the same as aosp and the dialog uses the material theme as well as support for our themes. To use, the alert slider config must be enabled. By default, the dialog shows on the left side. To move it to the right side, set the location config to 1. also squashed with the following changes: Author: Anushek Prasal <anushekprasal@gmail.com> Date: Tue Nov 12 15:41:19 2019 +0530 [aospa][quartz] SystemUI: Improve alert slider dialog - Convert px to dip - Modify the dialog to match toast - Fix positioning for OP7 Pro slider - Remove unused dimens and drawables Edit: set position values to 0 for neutrality. They should be adapted by overriding in each device tree. Change-Id: I0dfb705843f52cdea470993d05a7bdedc10750f4 Author: Pranav Vashi <neobuddy89@gmail.com> Date: Sun Feb 7 02:08:38 2021 +0530 [crdroid][11.0] AlertSlider: Prevent crash in case of incomplete broadcast * In intent extra EXTRA_SLIDER_POSITION_VALUE is not received and slider is changed, SystemUI will crash "No resource found". This patch should prevent such ice-cold havoc. Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Change-Id: Ifc21327f785959db2e7cb0d03e07c0b061dfd569 Author: idoybh <idoybh2@gmail.com> Date: Sun Aug 8 15:49:16 2021 +0200 [crdroid][11.0] AlertSlider: check for existing dialog before creating new Change-Id: I582586e54d25b668c5e51fcc92942b37bda4a014 Author: alk3pInjection <webmaster@raspii.tech> Date: Sun Sep 5 22:46:40 2021 +0800 AlertSlider: Fix bad layout under 180° rotation * silly but it works Change-Id: I0c32980b9380cd5fc8b8204440ea93d73c6aabc4 Author: LibXZR <i@xzr.moe> Date: Fri Apr 8 22:56:39 2022 +0800 TriStateUi: Adapt new status bar height api com.android.internal.R.dimen.status_bar_height is no longer returning correct value due to api change. Change-Id: I5973de93ab237764fe5ea4baa8a2fd3a9598d2d0 Signed-off-by: LibXZR <i@xzr.moe> Change-Id: Ie1954a44cc5242c95a731abd7404379ea638fe70
2022-05-07BatteryService: Add support for OEM fast charger detectionAlexander Martinz
Allows to indicate, whether a device is charged using a proprietary OEM fast charge solution, which write their status to sysfs. The OEM fast charge detection tries to be as generic as possible and is configured via overlays. Path to sysfs to read status - core/res/res/values/custom_config.xml - config_oemFastChargerStatusPath Value expected from read status (Defaults to "1" if not specified) - core/res/res/values/custom_config.xml - config_oemFastChargerStatusValue Change-Id: I6f3598a5a6a3efc76553261d2cf73094170d4110 Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2022-05-07SystemUI: Add double tap to sleep gestureRashed Abdel-Tawab
Author: Roman Birg <roman@cyngn.com> Date: Sun Nov 23 06:54:06 2014 -0800 SystemUI: double tap to sleep improvements * Make it more reliable * Add it to keyguard * Add a content observer to not always query Settings.System on every touch event Change-Id: I292c4d9d9f810843590b7a9ec6e15b99ac44009d Signed-off-by: Roman Birg <roman@cyngn.com> Author: Adnan Begovic <adnan@cyngn.com> Date: Wed Nov 11 12:05:59 2015 -0800 fw: Move DOUBLE_TAP_SLEEP_GESTURE to CMSettings. Change-Id: I8274b7c241cef6835a1114a702e68c95b6d2e036 Author: Zhao Wei Liew <zhaoweiliew@gmail.com> Date: Fri Oct 7 08:56:25 2016 +0800 SystemUI: Use Tuner API for CM settings Get rid of all the excess code by implementing TunerService.Tunable and observing any changes made to the settings through it. Remove UserContentObserver as the Tuner API handles user switches. Also remove some unused imports that were introduced in earlier CM commits, but were never removed since. Change-Id: Iecafafabdaec82b3b3c72293bea865de48f0e90a Author: Altaf-Mahdi <altaf.mahdi@gmail.com> Date: Wed Nov 11 16:07:49 2015 -0500 Double tap to sleep anywhere on the lock screen [1/3] Change-Id: I7dd46f3fafeb2e629974c0f32083d4d9774fb1de [neo: Using Tuner API.] Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Author: dianlujitao <dianlujitao@lineageos.org> Date: Thu Feb 27 12:57:07 2020 +0800 SystemUI: Don't sleep on double tap below status bar Change-Id: Ic64c29eae63e96f34dc37cda355401b7e2cd2d39 [Pig]: Forward port to R [bgcngm]: Forward port to S POSP edit: keep the lockscreen part only also add dozing and ambient pulsing checks Change-Id: I0281d23cb3ad5f8f2b67d08ae431e8a962a60927
2022-05-07SystemUI: Use DT2W setting also to wake from AODmaxwen
Change-Id: I844e36469b0e3b0168eecb62f6e8b0e9b2bff40e
2022-05-07SystemUI: Introduce DataSwitchTileChristian Oder
* Based on OnePlus' OxygenOS tile, reworked to work with AOSP toggling without requirements on proprietary telephony-ext features. * QS icons are designed and made by Andrew Fluck. Co-authored-by: idoybh <idoybh2@gmail.com> Co-authored-by: jhonboy121 <alfredmathew05@gmail.com> Change-Id: Ie2e280c07f24f9da6b4ee218b72501a2713ce429
2022-05-07SystemUI: Enable NFC tileTim Schumacher
Author: Thecrazyskull <anaskarbila@gmail.com> Date: Tue Jan 17 10:56:39 2017 -0600 SystemUI: Enable NFC tile Change-Id: Ib21f927d336fcb5e460552786828b79551b235fa Author: inthewaves <inthewaves@pm.me> Date: Sun Sep 20 14:59:10 2020 -0700 have NfcTile get an NfcAdapter directly This changes the NfcTile to not be dependent on an NfcManager giving the NfcTile an NfcAdapter. The problem with NfcTile is that the NfcService doesn't start until the device is unlocked after a reboot, but NfcTile can be created and have its state updated before the device is unlocked. The state of NfcTile depends on an NfcAdapter. The tile gets an NfcAdapter from a call to NfcAdapter#getDefaultAdapter, which gets an adapter from an NfcManager via Context#getSystemService, and NfcManager tries to get an adapter in its constructor via NfcAdapter#getNfcAdapter. If this is done before unlock, NfcService isn't started, so the constructor of NfcManager fails to get an adapter, opting to just store null. This means that the NfcManager that's _cached_ by the NfcTile's application context holds a null NfcAdapter, so subsequent calls in NfcTile to get the NfcAdapter will keep returning null. We can just have NfcTile get the NfcAdapter directly via NfcAdapter#getNfcAdapter instead of relying on an NfcManager to call the same method for us to get its default adapter. We just have to make sure we use the application context for NfcAdapter#getNfcAdapter, as per the doc comments for getNfcAdapter. This means that there's no longer an NfcManager associated with the NfcTile's application context. It doesn't look like NfcManager does anything special with the NfcAdapter anyway. It seems to just be some middle man for NfcAdapters: * The NfcAdapter field in NfcManager is final, and it doesn't do anything else with it besides have a getter method for returning it. The NfcManager seems to be a way to force third-party apps that want to get an NfcAdapter to use the application context. * NfcAdapter#getNfcAdapter manages the caching of NfcAdapters by application context in a static HashMap. NfcManager doesn't manage caching; it just calls NfcAdapter#getNfcAdapter. Change-Id: Ifafc666568a001a60baf7c8c16782dca1ee4d011 Author: Michael W <baddaemon87@gmail.com> Date: Fri Jan 15 00:03:02 2021 +0100 NfcTile: Don't create an error when editing tiles Repro: * Make sure no NfcTile is in your expanded QS (not tested what happens if it's there) * Hit the Edit-button: Error in handleSetListeningInternal java.lang.IllegalArgumentException: Receiver not registered: com.android.systemui.qs.tiles.NfcTile$1@7c00b87 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1434) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1543) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664) at com.android.systemui.qs.tiles.NfcTile.handleSetListening(NfcTile.java:64) at com.android.systemui.qs.tileimpl.QSTileImpl.handleSetListeningInternal(QSTileImpl.java:371) at com.android.systemui.qs.tileimpl.QSTileImpl.access$700(QSTileImpl.java:80) at com.android.systemui.qs.tileimpl.QSTileImpl$H.handleMessage(QSTileImpl.java:496) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) * Only register or unregister the receiver if we actually need to change registered-state * Same code is in AirPlaneModeToggle.java, presumably was also added to prevent unnecessary registering/unregistering Change-Id: I6cd8f9bffccb68596b736cc0a3a38e9c12b9c489 Change-Id: Ia06b923ee15e91a9c84a806d4c69755478df2063
2022-05-07SystemUI: Add AOD QS tileMarko Man
Squashed with: Author: Marko Man <darkobas@gmail.com> Date: Wed Apr 18 13:22:52 2018 +0200 base: SystemUI: add qs AOD tile Change-Id: I0d9948dbd48e309d8fcc9b2c33be8b17810dc5b0 Author: shagbag913 <sh4gbag913@gmail.com> Date: Sun Mar 1 15:49:17 2020 -0500 AODTile: disable tile when power save mode is on AOD is not allowed when power save mode is active, reflect that upon the tile. Signed-off-by: NurKeinNeid <mralexman3000@gmail.com> Change-Id: I3fc7f2a33d25a1616e8df5698ca2bc2a23d45cbb Author: Bruno Martins <bgcngm@gmail.com> Date: Sun Apr 12 19:04:24 2020 +0100 AODTile: Explicitely disable long clicks Returning null in the getLongClickIntent() method is not enough to disable tile long clock and results in crashes: E AndroidRuntime: FATAL EXCEPTION: main E AndroidRuntime: Process: com.android.systemui, PID: 1391 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.resolveTypeIfNeeded(android.content.ContentResolver)' on a null object reference E AndroidRuntime: at android.app.ApplicationPackageManager.queryIntentActivitiesAsUser(ApplicationPackageManager.java:1062) E AndroidRuntime: at com.android.systemui.ActivityIntentHelper.getTargetActivityInfo(ActivityIntentHelper.java:70) E AndroidRuntime: at com.android.systemui.ActivityIntentHelper.wouldLaunchResolverActivity(ActivityIntentHelper.java:47) E AndroidRuntime: at com.android.systemui.statusbar.phone.StatusBar.startActivityDismissingKeyguard(StatusBar.java:2724) E AndroidRuntime: at com.android.systemui.statusbar.phone.StatusBar.startActivityDismissingKeyguard(StatusBar.java:2709) E AndroidRuntime: at com.android.systemui.statusbar.phone.StatusBar.startActivityDismissingKeyguard(StatusBar.java:2716) E AndroidRuntime: at com.android.systemui.statusbar.phone.StatusBar.handleStartActivityDismissingKeyguard(StatusBar.java:3159) E AndroidRuntime: at com.android.systemui.statusbar.phone.StatusBar.lambda$postStartActivityDismissingKeyguard$26$StatusBar(StatusBar.java:3155) E AndroidRuntime: at com.android.systemui.statusbar.phone.-$$Lambda$StatusBar$CSd9n4rtnrfFyOdT2eTFRNUO5xM.run(Unknown Source:4) E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:883) E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100) E AndroidRuntime: at android.os.Looper.loop(Looper.java:214) E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7356) E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Change-Id: Ia7d4da4723600c47bedbfeb4b9152924a50d52dd Author: Bruno Martins <bgcngm@gmail.com> Date: Tue Jun 9 21:47:24 2020 +0100 AODTile: Rewrite AOD setting handling This fixes the tile status on clean installs, which was showing as active despite AOD being disabled. Change-Id: I148cfb34938165395bc52c830d1f2e374b5427df Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Thu Mar 18 12:22:21 2021 +0100 SystemUI: AODTile: Use SecureSetting to change doze setting Change-Id: Ic39d26ac8a37041b75862627a497274b24f3362c Author: LuK1337 <priv.luk@gmail.com> Date: Thu Mar 18 12:23:45 2021 +0100 SystemUI: AODTile: Actually start using SecureSetting Change-Id: I37f0194fcb54db1cf3cae221f7f702d398834ced Change-Id: I5249106fea3518e8fa69990d1aa13c21cc542cb1
2022-05-07SystemUI: Add AmbientDisplay tileAdnan Begovic
Squashed with: Author: Adnan Begovic <adnan@cyngn.com> Date: Fri Dec 11 16:16:02 2015 -0800 SystemUI: Readd AmbientDisplayTile. Change-Id: Ie7b93ba0f87d505206b5d60f193c2234d83d7eac Author: Michael Bestas <mkbestas@lineageos.org> Date: Sun Sep 17 22:51:15 2017 +0300 SystemUI: Hide ambient display tile if device does not support it * Add a check similar to the Settings app Change-Id: I603cd28b8dd1fadff9ffcfb6953c7b72514b5857 Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Wed Mar 17 22:34:17 2021 +0100 SystemUI: AmbientTile: Don't hardcode display settings intent Change-Id: Ifaa69c2f235b85ae847524c81f0ba59e2a51cf01 Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Wed Mar 17 22:37:04 2021 +0100 SystemUI: AmbientTile: Use SecureSetting to change doze setting Change-Id: I7f004bcf45493130ad50faacb6e390cd640e53db Author: LuK1337 <priv.luk@gmail.com> Date: Wed Mar 17 22:40:49 2021 +0100 SystemUI: AmbientTile: Actually start using SecureSetting Change-Id: I5d94f6d2e596dbc6b44ae4f30f479d335a067661 Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Thu Mar 18 10:51:54 2021 +0100 SystemUI: AmbientTile: Default the setting to 1 Change-Id: Idea9dda702fdbaa0e2836e7a2573aa57cf24449e Change-Id: Iea339685f523016876f059052e66e97fd5170a81
2022-05-07SystemUI: Add Heads Up tileMichael Bestas
Change-Id: I0e3cff73752c59d804dcec43b86524c2e8df4f57
2022-05-07SystemUI: Add Caffeine QS tileKeith Mok
Author: Keith Mok <kmok@cyngn.com> Date: Thu Feb 4 11:10:22 2016 -0800 SystemUI: Add caffeine qs tile Change-Id: I5d4aa97ae63fc0bcc40f0fa7d9305efbba091029 Author: chillger <alexander.loskutov@gmail.com> Date: Fri May 22 13:16:00 2020 +0200 SystemUI: Long press Caffeine for infinite duration Change-Id: Ic49539dcda6d7d6b1dab362eb8ec168d2ec65b07 Change-Id: I0b9a498285930cc397b7c4d20ddec3f447e6d332
2022-05-07SystemUI: Brightnessbar drawables should get surface colorHarsh Pal
* Since google decided not to kill eyes of people with dark qs always but forgot to change the color in drawable of Brightnessbar elements. it was white colored. before: https://imgur.com/OrW2p7d after: https://imgur.com/7DV844t * If you are using gapps (with google overlays) then no need of this else needed. Signed-off-by: Harsh <harsh@project404.us> Change-Id: I6fb3c53b383714269d2b9706a5580ba365404f0c
2022-05-07SystemUI: Fix the unlock sound played repeatedlyShufeng Hou
Sometimes keyguardDone() may be invoked from PhoneWindowManager many times in a short time, especially when app works with FLAG_DISMISS_KEYGUARD. Make sure the unlock sound is only played when keyguard is showing and the screen is on. Fixes Lineage: BUGBASH-56 Change-Id: I396588579a3be3b3210e619179d2a57211904644 CRs-Fixed: 900840
2022-05-07SystemUI: Fix alarm iconMichael W
* The icon was initially shown but not again after a reboot * Reason is, that the user setup isn't completed again and therefore the variable mCurrentUserSetup will never hold true again * Fix this by calling onUserSetupChanged once manually to get a proper initial state * Similar code exists in other places in SystemUI as well: NavigationBar.java, NetworkControllerImpl.java, ... -> Looks like this one was forgotten Change-Id: I02295a70a82696e7c0c6ade93c96e661140886f0
2022-05-07SystemUI: Don't store pending ControlAction if the device is lockedLuK1337
Passing control action to activityStarter.dismissKeyguardThenExecute() is enough to toggle it post device unlock. Test: Use a control action from locked device, notice that it's no longer toggled twice. Change-Id: I48cb9e0ad2425d35063fddefc738ab36c01690b8
2022-05-07SystemUI: Only add GarbageMonitor tile to default tiles on ENG buildsArne Coucheron
Change-Id: Ice1bab5f3d1b3a15f20085cfb7f5578c7f70855a
2022-05-07SystemUI: Disable heads up debugging on non eng buildsHan Wang
* Causes much logspam, especially when using Clash/Shadowsocks because notification is updated every second. Test: m, no logspam anymore Change-Id: Ibe2db6afa18ebc68032730d81c29fb4cfaf8601f
2022-05-07Enable Binder Proxy Tracking by Uid only on eng buildsdianlujitao
* App would be killed once limit reached, this is really bad for users. Change-Id: I226a7a34031c9e9d8bf6843c22d79e72203bf867
2022-05-07Keyguard: allow large clock on tabletsTimi Rautamäki
This effectively allows large clock to be shown on tablets, while keeping it disabled for small screen devices. Change-Id: I5bd1cdead55bd11dd4d0684ff95986cbcfdf4757
2022-05-07Keyguard: don't use large clock on landscapeTimi Rautamäki
Large clock does not display properly on landscape mode. Change-Id: If803ad03568671e8aed2fe37897bd1fb9cee29ae
2022-05-07SystemUI: Dismiss keyguard on boot if disabled by current profileGabriele M
Properly dismiss keyguard on boot if the current profile has it disabled, otherwise we will just show a black screen with just the status bar and a navbar with only the back button. BUGBASH-87 Change-Id: I14ed10ae9db40c32be22c1fb43f8a1719787d91b
2022-05-07keyguard: Do not trigger a wake up when hiding lockscreenArne Coucheron
* This piece of code was introduced in commit: Swipe up to unlock when pulsing Change-Id: Ida5adb6a18f3ee992b1d154e10b35ba244f5b712 However, it appears to not be needed and instead causes the device to wakeup right after dozing with no lockscreen set. * Remove it and test with: adb shell am broadcast -a com.android.systemui.doze.pulse com.android.systemui The device can still be unlocked from pulsing state. Change-Id: Ib5c2f930bd4de04cbf8f89f12d046f30c9b32a52
2022-05-07SystemUI: Update Bluetooth battery level assetsAndrew Fluck
* Outlined and polished. Change-Id: I94fd78d5788306f64623e850a00302bb42b7897d
2022-05-07BluetoothControllerImpl: Synchronize mConnectedDevices access in ↵jhonboy121
getBatteryLevel() E AndroidRuntime: FATAL EXCEPTION: main E AndroidRuntime: Process: com.android.systemui, PID: 2245 E AndroidRuntime: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 E AndroidRuntime: at java.util.ArrayList.get(ArrayList.java:437) E AndroidRuntime: at com.android.systemui.statusbar.policy.BluetoothControllerImpl.getBatteryLevel(BluetoothControllerImpl.java:329) E AndroidRuntime: at com.android.systemui.statusbar.policy.BluetoothControllerImpl.updateBattery(BluetoothControllerImpl.java:335) E AndroidRuntime: at com.android.systemui.statusbar.policy.BluetoothControllerImpl.updateConnected(BluetoothControllerImpl.java:282) E AndroidRuntime: at com.android.systemui.statusbar.policy.BluetoothControllerImpl.onDeviceAttributesChanged(BluetoothControllerImpl.java:379) E AndroidRuntime: at com.android.settingslib.bluetooth.CachedBluetoothDevice.dispatchAttributesChanged(CachedBluetoothDevice.java:904) E AndroidRuntime: at com.android.settingslib.bluetooth.CachedBluetoothDevice.lambda$refresh$0(CachedBluetoothDevice.java:612) E AndroidRuntime: at com.android.settingslib.bluetooth.CachedBluetoothDevice.$r8$lambda$4IYXIWE9azg2QshMjGh5evIGUmg(Unknown Source:0) E AndroidRuntime: at com.android.settingslib.bluetooth.CachedBluetoothDevice$$ExternalSyntheticLambda1.run(Unknown Source:2) E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938) E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201) E AndroidRuntime: at android.os.Looper.loop(Looper.java:288) E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7871) E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550) E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) Change-Id: I036ffeb434ddbd7f2abfcfe950414319458f455b Signed-off-by: jhonboy121 <alfredmathew05@gmail.com>
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-06SystemUI: Let screenshot window ignore screen decorationsLuK1337
This lets us select whole screen during partial screenshot. Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/4631 Change-Id: Ia309552c7ea6b0b834bb8bddb8f83117c1870261
2022-05-06SystemUI: Fix edit button in screenshot share activityEdward Savage-Jones
Update the screenshot share intent to align it with the data that is present in the screenshot edit intent. Bug: 220161786 Test: Take screenshot. Tap share. Tap Edit, which opens screenshot in Photos. See buganizer for more info. Change-Id: I7a1254e579cea38fd70fc13da81e1dae98f5f968
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-05-06SystemUI: Adapt screenshot sound to ringer modesAshwin R C
Co-authored-by: althafvly <althafvly@gmail.com> Change-Id: I381c351131241e45ddb6049706d6c302c2eee946
2022-05-06Statusbar: show vibration icon in collapsed statusbarTimi Rautamäki
Show the icon also when on keyguard. Change-Id: Ie3f19123edb1fa8baaeaadd307a86ae78ae7d24b
2022-05-05SystemUI: Fix QS status font weight mismatch in dark modeDanny Lin
Text in the QS status bar is medium in light mode and regular in dark mode. Fix the mismatch. Change-Id: Ic6e5dc547d4ded9d231f88f6cac3e1e9f8483d5e
2022-05-05SystemUI: Remove nav bar background in QS customizerDanny Lin
This looks outdated, since most apps are edge-to-edge nowadays. Change-Id: I8c54e61e618a9b5bed1a59753ce76e8fbd69fae2
2022-05-05SystemUI: Reduce scrim color animation duration to 375 msDanny Lin
The 2-second scrim color animation is far too long in contrast to the dark theme QS tile's state animation, and it's long enough to be something that users have to wait and watch. Reduce the duration to 375 ms, following Launcher3's activity theme cross-fade duration, which is much more reasonable. Change-Id: Id74e3d266f2cdc14d0f5c87f7650d5be730cdb67
2022-05-05SystemUI: Import TensorFlow Lite model for back gestureDanny Lin
Model extracted from redfin SPP1.210122.020.A3. This is not ideal, but we don't have data to train our own model and build-time resource overlays can't contain assets. Change-Id: I8ce288ec4848bebeab4e0f2e1ae858fd4a168009
2022-05-05SystemUI: Add machine learning back gesture providerDanny Lin
This is a provider for machine learning-assisted back gestures when using gesture navigation. It uses TensorFlow Lite for inference, similar to Google's Pixel implementation, so a model is necessary for it to work. Change-Id: I619837789f77d9a430a04afb68a8d8e68977e431
2022-05-05SystemUI: Allow privileged system apps to access screenshot serviceDanny Lin
This is necessary in order to take a screenshot from other apps using platform APIs as if the user used the screenshot keychord, which we need for implementing gestures in a modular way. The service is still protected by the INTERACT_ACROSS_USERS_FULL permission, which is already necessary to get far enough to attempt binding to this service. Note that existing screenshot APIs are not sufficient because they only allow apps to get an image of the screen; we want the full user experience of the animations, actions, preview, sound, etc. that normally come with a user-initiated screenshot. Change-Id: Ieb559d5dc921393f68aa1d6142f7834d89d4e22b