In order to prevent DoS attack from icon size,
we're usinga system lib to help convert any loaded
drawable into a flattened bitmap with an appropriate size.
Test: Rebuild
Bug: 33646131
Change-Id: I92e76fb4e4c23c4995f63ebd2df8cbe0a349fbce
- Move BatteryStatus from KeyguardUpdateMonitor to SettingsLib
which can be used in Settings and SystemUI
- Add string to support show rapid and slow charging in Settings
- Move config from res-keyguard to SettingsLib
Fixes: 79559900
Fixes: 66573773
Test: manual, make RunSettingsLibRoboTests
Change-Id: I2ffd902743819f999ee3a10bbadc2d3ca45495c2
disabled_text_color is similar to background color in dark theme.
Use text color multiply disabledAlpha to get disabled text color.
Fixes: 137639665
Test: manual
Change-Id: I00bb1dbedd0032001c2fc325b412dacb08f84132
Previously, the show_opt_in and enabled flags were conflated to
basically mean the same thing. Because we are now distinctly making
show_opt_in refer to showing a toggle to opt into the feature in SUW and
enabled to mean the default enabled status, we need to change the
utility method for querying the default enabled status.
Bug: 122461924
Test: RunSettingsLibRoboTests
Change-Id: I9802d307597d90514e7dc6631998daa1d2fab253
The current behavior of MobileNetworkController is to consider the
device in service if we have an out_of_service service state, but an
in_service data reg state. This is to handle "data only" SIM cards.
This change excludes IWLAN network types from this behavior because that
is the state of wifi calling and shouldn't cause the device to report
cell service.
Change-Id: I408fe282ebeb00425776b745abee0468ac0567c9
Fixes: 111958683
Test: atest com.android.settingslib.UtilsTest#isInService_voiceOutOfServiceDataOutOfService_returnFalse
To make behavior consistent in the long run and refactor the code
into settingslib and call it from both Settings and SystemUI.
Bug: 110973964
Test: run testcase as below:
1. frameworks/base/packages/SettingsLib: -> ALL PASS
make RunSettingsLibRoboTests -j40
2. frameworks/base/packages/SystemUI: -> ALL PASS
atest frameworks/base/packages/SystemUI/tests/src/com/android/systemui
/statusbar/policy/NetworkControllerSignalTest.java
Change-Id: Ie8899dd5398a503b861557c222bbd93bd2049d10
Update Utils.getColorAccent() and Utils.getColorError() to return ColorStateLists instead of colors and change every callers entry.
Bug: 78215054
Test: manually test for UI
Change-Id: I830222a14ef81b2456dd89c9f8631b5fd36f12ff
*return true if it is in ringing/call/communication(VoIP) status
Bug: 78318415
Test: make -j50 RunSettingsLibRoboTests
Change-Id: Ifb84da386fcd5bf03eaccf78fc264fbad86a9707
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
Also, ic_corp_user_badge is now tinted by default color, insteaad
on white by default.
Test: Create managed user, observe the icon is now blue on white.
Test: Wifi data usage, observe the icon of "All work apps" are now
grey instead of white.
FIXES: 71568987
Merged-In:Ic6c8ed15644c6e7894f2a84320077a3962603b5b
Change-Id: Ic6c8ed15644c6e7894f2a84320077a3962603b5b
Also, ic_corp_user_badge is now tinted by default color, insteaad
on white by default.
Test: Create managed user, observe the icon is now blue on white.
Test: Wifi data usage, observe the icon of "All work apps" are now
grey instead of white.
Change-Id: Ic6c8ed15644c6e7894f2a84320077a3962603b5b
By putting it in SettingsLib, it should be accessible to every app that
needs it.
This also adds in the ability for the framework to define default
behavior. The default behavior for the storage manager enabled status
may differ based upon the device.
Bug: 70893105
Test: SettingsLib Robotests
Change-Id: I9082a77f90289b8fa208c628dd3606000e19495b
Store location changer into Settings.Secure
Modify quick settings to identify itself as location changer
Bug: 68779883
Test: Manual
Change-Id: I2c7a599e1383102685994d876e7160e164436a08
1. Mark public fields as deprecated: LOCATION_MODE, LOCATION_MODE_HIGH_ACCURACY, LOCATION_MODE_SENSORS_ONLY,
LOCATION_MODE_BATTERY_SAVING, LOCATION_MODE_OFF.
2. Add new public methods to LocationManager:
setLocationEnabled(boolean)
isLocationEnabled()
setLocationProviderEnabled(String, boolean)
3. Remove LOCATION_PREVIOUS_MODE and constant
LOCATION_MODE_PREVIOUS. Refactor code that references
LOCATION_MODE_PREVIOUS to use LocationManager.setLocationEnabled or
LOCATION_MODE_HIGH_ACCURACY.
4. Mark deprecated fields and methods as removed: LOCATION_PROVIDERS_ALLOWED, setLocationProviderEnabled(), isLocationProviderEnabled()
5. Refactor logic in Settings app and Quick Settings to call
LocationManager.setLocationEnabled() instead of setting location mode.
Bug: 70990911
Test: Manual
Change-Id: Ia49b385f8b6a358b62291983eb0146af0ecf8e02
When location mode is about to change in Settings app, send
MODE_CHANGING broadcast.
Fixes: 28057031
Test: manual
Test: robotests
Change-Id: Id26325520211a8934c1670dfcd12e8d339766308
Resource overlay is now done in runtime with non-system resources object.
Amend getDefaultUserIcon to take resources object as parameter.
BUG: 69355037
Test: Factory reset, verify that overlayed color is used in multiple
places, including keyguard, the bar under quick settings and Settings app.
Change-Id: I20b0527bdcb2eb38e8bea6a05f53eea1edcba932
Test: Check Printing / Google Settings / Wifi data usage page,
observe the new icon.
BUG: 69028605
Change-Id: I344dfe6d6a99a8fdadfd7283dc851ea865566c18
This icon is based on ic_corp_badge_case, but scaled up to fit.
This changes the old orange briefcase to a newer briefcase that isn't
orange.
Bug: 64475406
Test: Manual
Change-Id: I63ce95326d419428b1df298783633f90f75162be
It showing up regressed in MR1 for some reason. It appears that the icon
was never being loaded properly at all (drawables are not supposed to be
bitmappable as it was done before). By returning the raw drawable, the
icon is set properly.
Change-Id: I5f8e96b1b99dc725b8f69c6a5feb3fbfc05bb4d8
Fixes: 64610295
Test: Manual
Cleanup. Replaces references to the badging enums with
AccessPoint.Speed. Recreates getWifiIcon functionality in Utils class.
Bug: 62355275
Test: manual (no behavioral changes)
Change-Id: I33fa70e3680431fd234a92e989f89dbe04798ad2
This allows OEMs to customize the default behavior of the automatic
storage manager.
Bug: 38499322
Test: SettingsLib Robotest
Change-Id: I7d78865923fa7ff20b796a7075da0f35c7af1807
This toggle is used to decide whether to show charging method.
If it is off, then "Charging over ac" will become "Charging"
Bug: 36558216
Test: RunSettingsLibRoboTests
Change-Id: I98b1f7e7b77d7ce0a7e1aae29e55a33ac79ff0d7
(cherry picked from commit b3c33f63ed)
Remove scatered references to old error color and replace them with
references to new colorError
Test: make & visual
Change-Id: Icca8cd790db351c3dfce2197f2046879d062a2c0
This is a non-functional refactor. The old enums will be removed once
ag/35323372 is addressed.
Bug: 35114358
Test: Ran existing tests (see files touched).
Change-Id: I08fd8c7964463b5908ce361e61f8fe811d0ff6f3
The icon on app header is a clone of original app icon, which relies on
getConstantState() of the orginal drawable non-null.
Change-Id: Ice5360f5d00d99b3cfe538b167ce67fc06d5e402
Fix: 34190136
Test: make RunSettingsLibRoboTests
This change inserts badged wifi icons into the status bar to indicate
historical network strength. The existing callback handler was modified
to explicitly pass the drawable as currently the icon is a rendered from
two separate resources, composited together in a LayeredDrawable.
Badging is controlled by Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED
and can be enabled from the Wifi Settings page.
Bug: 34056846
Test: runtest --path
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerWifiTest.java
Change-Id: I33b736d4543e380887513cbb5937f49945794c09
This initial pass inserts badged wifi icons when available. A later CL
will move this logic to a new AccessPointPreference subclass to further
isolate the new picker UI changes.
Bug: 33457699
Test: Manual inspection
Change-Id: I849efe3f135bb24efeb60d2484dfb56673168430
1. Remove hardcoded color and create colorStateList instead
2. Remove warning color and use attr textColorError instead
3. Add function to extract color from colorStateList
Bug: 32592245
Test: manual - Take screenshots
Change-Id: I7f0a54b304b09b99ba1f255952e7e99e009a4d2a