Fixes icon and text colors in QS Header to be darker in Light mode.
Also, makes sure that all colors in the icons match.
Does this by implementing the following:
* A new theme that overrides darkIconTheme in Theme.SystemUI by one with
darker colors.
* QuickStatusBarHeader applies that theme and passes is onto its
children, in particular StatusIconContainer/StatusBarMobileView
and BatteryMeterView.
* StatusBarMobileView and BatteryMeterView retrieve the colors from the
theme and apply them accordingly.
* Also applies to QSCarrierGroup
* Additionally, the single color is used for the other icons.
Also invalidates SignalDrawable after setColors is called if at least
one of the colors changed. This is a real issue.
For more info:
* Text and icons set to 70% black on light mode, white in dark mode.
* Dual tone set for background overlaid with fill match single tone.
Test: visual
Fixes: 124466915
Change-Id: Ia6cb28fca90a07c8936726334502e7accf534df6
This should help prevent Settings and SysUI from getting
out of sync with each other.
Test: manual by adjusting battery levels with adb
Bug: 124030091
Change-Id: I8eaba920a10e045c4c983406873de66208c22fb7
We still need to save a layer for the BlendMode.CLEAR paint to do the
right thing. But with this we can save just the layer needed to draw the
battery instead of the whole battery meter view.
Test: visual
Bug: 130536257
Change-Id: I9d5844440250ccd9174e6c001e051c9adf62a2d0
(cherry picked from commit b4c703b8e3)
The wallpaper aware tinting was being overwritten by the style. Changed
order to fix.
Fixes: 130408545
Test: manual, enabling and disabling percentage, also dark mode
Change-Id: I551f335f34fb8e9c5894901041e9229ec181e1c6
Change TextAppearance in QS header.
Also, reduce size of QS tile background. Removed extra padding in the
bottom of QSIconViewImpl that was not needed.
Test: visual
Bug: 124466915
Change-Id: I0b8db6edad7f8527caff76f9419c42a8016a6bda
Add layout transition animation
Fixed: 123362236
Test: manual - turn on/off show battery percentage in settings and go to
AOD
Change-Id: Ie98434e565d23461d82729d582f8ff4e63d8ac88
QS will always show the time remaining estimate string, unless charging
or the estimate is unavailable
Test: visual
Fixes: 127519046
Change-Id: Iaa268ce631d3196967748b7f562d26e19ddeb465
Create a new battery drawable that will load enough resources from
frameworks/base/core/res/res/ to allow for theming overlays. The current
things are overlayable:
- Perimeter path: the outer shape of the battery (including the
terminal)
- Fill mask: path defining the shape of the fill
- Bolt path: charging bolt path. draws with appropriate protection for
visibilty
- Powersave path: path of the plus sign that draws when in powersave
mode. also draws with protection
Test: visual; sysui demo mode
Bug: 123705805
Change-Id: I2bb15fd10e3fec63cb115a8f216794933b717404
- Move the battery percentage next to the system icons in quick settings
- Always show the percentage, and optionally show the estimate text
based on battery settings
- Move the estimate text into the BatteryMeterView
- Move the fetching of the estimate off of the main thread
Test: visual
Change-Id: Ie37952079b2394c67464f69eb8a2f0089b08875d
Fixes: 119799219 - padding
Fixes: 120996084 - moving estimate fetch off main thread
Bug: 116481529
- Add a method to observe callbacks based on lifecycle
- Add 2 examples of this in real code (one for a view, one for a
fragment
Test: runtest systemui
Change-Id: I9e1e4a617a63e702602472b2079a477e373ff1e9
BatteryMeterView was listening to sysui tuner for its visibility, but in
QQS we want to control it via settings
Test: visual
Change-Id: I52f1e389b82e7a75c30e66c1d4547e5b4875a37e
- Add an API to BatteryController to get an estimated time remaining
string.
- BatteryController will now check up to once per minute what the
estimated time will be and builds the string using PowerUtil.
- If the "show percentage" setting is on, the estimated time remaining
string (and battery icon) will show next to the system icons in QS
- Also make the battery percent in QS obey the setting
Test: visual
Bug: 116481529
Change-Id: Iaafa00127c8b8baae40956254a1237c8b7ac079b
This config will be respected and override the value found in Settings
if a user restores from a device which had SHOW_BATTERY_PERCENTAGE set
to true. It is also respceted on the keyguard where we would typically
show the battery percent if the device is charging.
Percentage is still shown above QS though.
Test: visual
Change-Id: I1f59b68097ffcbb7dda9d2ec99ea0ba9062c6dff
Bug: 80129194
We didn't have KeyguardStatusBarView dumps in our dumpsys,
adding more info will make our lives easier in the future.
Test: adb shell dumpsys activity service com.android.systemui
Change-Id: I07af14922501889cc15005f01463674f0651dfde
Fixes: 109899206
Shrink all status bar icons by 2dp. This means setting a scale factor on
anything that is a StatusBarIconView, and manually scaling down wifi and
mobile data groups.
Also fix the padding between the mobile data view and the battery
Also snuck in a fix for the battery saver icon clipping on QS
Change-Id: I5f5430d9e9c66f5c2794dcf4974cf18aa3bff061
Test: visual
Fixes: 74985733
Fixes: 79967193
Bug: 77822905
Update Utils.getColorAttr and similar methods in Utils to return a ColorStateList instead of a color
Bug: 74872054
Test: Force to display different color items then manually test
Change-Id: I92697a597b532ba95f29a886baa114ed6d0ac632
Rolling forward the landscape UI changes (To not break taimen with a
notch this time!). OG CL: ag/3717677
Shorten status bar height in landscape and update colors to use
wallpaperTextColor when in landscape mode.
Additionally modified scrim opacity for the QS panel to provide more
contrast/focus on content.
Test: Visually
Bug: 73808887
Change-Id: I249579d2898b9915868bb584661864d10ed88de2
This reverts commit bc204efbe5.
Reason for revert: Causes crash on rotation due to something with config.xml overriding. Reverting as it's blocking daily build
Bug: 77217078
Test: Ran build, checked rotation
Change-Id: I79e94fb1703f888ac167cdae20142e130a2e80b3
Shorten status bar height in landscape and update colors to use
wallpaperTextColor when in landscape mode.
Additionally modified scrim opacity for the QS panel to provide more
contrast/focus on content.
Test: Visually
Bug: 73808887
Change-Id: I74713587ca426020cb15960800a4d2b6ac5f6466
Battery was only getting a foreground color, not background. Fix by
using the SystemUI context so it finds the correct light colors for both
foregorund and background.
Test: visual with light wallpaper
Change-Id: I6e18ce9331a5e78241d8c24ba96a8b843c646813
Fixes: 72431673
- Display a space view exactly covering where the display cutout is
- Custom layout for system_icons because this view needs to now layout
right-to-left, and hide icons that don't fit. Similar to notification
icon container but in the other direction. Still needs dots and to limit
the # of icons
- When in landscape/seascape, the cutout space disappears and instead
the status bar insets itself by the same amount that the window is
letterboxed
- Moved battery percent back to the right of the battery because the
time is no longer on that side
Test: adb shell cmd overlay enable
com.android.internal.display.cutout.emulation && adb shell stop && adb
shell start # to start emulation
Bug: 63772836
Change-Id: I8071bfb4983a9d9306df1487cdac956494e80c28
Add a StatusBarManager flag to control the visibility of system icons
such as connectivity info, battery, etc. Note that the clock is
controlled separately through DISABLE_CLOCK.
Also note that this flag differs from DISABLE_SYSTEM_INFO, which
controls the system icons and the clock as a whole, but only works for
the collapsed status bar (CollapsedStatusBarFragment).
Bug: 65813398
Test: runtest systemui
Test: manual, by using a modified version of TestDPC and
DevicePolicyManagerService
Change-Id: Icb61c7bb1a625edd818be7a66d7f15c3e812237b
The view wasn't actually setting the new text size when there was a
display scale or font size change. But now it does.
Test: visual
Change-Id: I3a38c779fe75e4fe29e962bb7d46cdef4da9e829
Fixes: 37919352
This updates some of the names of the colors to make them more general
for non-battery usage.
Bug: 35245772
Test: Manual
Change-Id: I048f673037c4bd7279fd7c55f2d55be6b3618b41
1. Remove "m" prefix for all public field
2. Change logic about field "discharging", now it only controlled
by whether it is plugged in.
3. Change Paint in drawable to protected
Bug: 36862496
Test: RunSettingsLibTests
Change-Id: I2908ae6868dc877d3ce6a8a63ec17826a6dcca1d
Original mocks had the percentage on the left side of the battery... So
I made it so.
Test: visual
Bug: 32539932
Change-Id: I311255777b74c2ff74e36c78cbe1b4b9743ec337
This switch is moving to system settings so it should also be declared
by Settings. Also changed the constant's name to make sense in the
System context.
Test: runtest systemui
Bug: 32539932
Change-Id: I7cce21b50702f31465328dd8faed3fbac47528ea
The old percentage textview is now gone from the layout.
When the device is charging (but the user doesn't have
percentage display turned on all the time) use the new
percentage built-in to BatteryMeterView.
Bug: 35521962
Test: visual
Change-Id: I91f3350f6203fd007f003ca260ac0ed78e29b771
The old embedded percentage (introduced in change I6a3e7409) is hard
to read at status bar size, so we now draw it in a separate TextView to
the left (start) of the battery gauge. (The embedded code remains so
that it can be used by other places where the battery is drawn larger.)
The old system setting "status_bar_show_battery_percent" is still used
to control whether this percentage is shown, but note that it now
applies only to BatteryMeterView (i.e., the status bar) and not other
usages of BatteryMeterDrawable.
Bug: 32539932
Test: (manual) adb shell settings put system status_bar_show_battery_percent 1
Change-Id: Id298dba544f594b11269539284a2e8042fd4780b
Lots of stuff:
- Make StatusBarIconController be a permanent dependency
- Break out dark stuff into DarkIconDispatcher
- Create StatusBarFragment
- This bit is a bit ugly for now, but will be better later
- Other stuff probably
Test: runtest systemui
Change-Id: I4973bc9f944e66af92731bf1edd2b39657f1782f
Add support for testing for PluginManager and TunerService leaks
and add tests for the known leaks and fix them. Also port PluginManager
and TunerService to Dependency to make them easier to handle in
tests.
Test: runtest systemui
Change-Id: I5642539ee24dd72f802905106decd0c87b41b4eb
Fixes: 34846972