Commit Graph

42 Commits

Author SHA1 Message Date
timhypeng
1b25c9a89c Add isAudioModeOngoingCall function to check call status
*return true if it is in ringing/call/communication(VoIP) status

Bug: 78318415
Test: make -j50 RunSettingsLibRoboTests
Change-Id: Ifb84da386fcd5bf03eaccf78fc264fbad86a9707
2018-04-30 15:30:17 +08:00
Tony Mak
34942ab7b1 Use the correct drawable to badge user icon
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
2018-03-12 22:16:29 +00:00
Tony Mak
e205193f86 Use the proper API to get managed profile user drawable
FIX: 73997367

Test: Go to settings -> Storage, observes the icon change.

Change-Id: I60153b31adf1175aea4cdf960d5094a89e8bc6b9
2018-02-28 15:12:01 +00:00
Daniel Nishi
84522e056e Unify automatic storage management enabled checks.
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
2018-02-14 16:06:08 -08:00
Lifu Tang
0cba58f5df Add key to store location changer
Store location changer into Settings.Secure

Modify quick settings to identify itself as location changer

Bug: 68779883
Test: Manual
Change-Id: I2c7a599e1383102685994d876e7160e164436a08
2018-01-24 22:30:11 -08:00
Maggie
aa080f9676 Deprecate location modes
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
2018-01-23 10:45:49 -08:00
Maggie
fab2e2cbaa Send MODE_CHANGING broadcast before location mode change.
When location mode is about to change in Settings app, send
MODE_CHANGING broadcast.

Fixes: 28057031
Test: manual
Test: robotests
Change-Id: Id26325520211a8934c1670dfcd12e8d339766308
2017-12-07 23:22:35 +00:00
Tony Mak
213955e562 Fix user color overlay is not applied
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
2017-11-28 07:47:19 +00:00
Tony Mak
bca5c933be Replace work profile icon with the new one
Test: Check Printing / Google Settings / Wifi data usage page,
      observe the new icon.

BUG: 69028605
Change-Id: I344dfe6d6a99a8fdadfd7283dc851ea865566c18
2017-11-08 19:54:30 +00:00
Tony Mantler
88920145c2 Move SimStatus and ImeiInfo Pref Controllers to SettingsLib
Bug: 67410808
Test: RunSettingsLibRoboTests
Change-Id: I877d0338c28b4ebcf561d34875cb73c58aa32751
2017-10-20 15:03:56 -07:00
Daniel Nishi
078e594a63 Merge "Update the work icon." into oc-mr1-dev am: f19edfdab0
am: 985c4a7961

Change-Id: I662357082b835b5b08da05c6b83b4102ec4603b2
2017-08-31 18:18:35 +00:00
Daniel Nishi
07d0f592f4 Update the work icon.
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
2017-08-29 12:39:13 -07:00
Daniel Nishi
b76ddcd24d Merge "Fix the user profile icon." into oc-mr1-dev am: 6ebd3594ae
am: 1d4daee10d

Change-Id: I2e9e2fb1e3c2cbb5f13ff3a4c9ec94a03c78064c
2017-08-25 00:28:45 +00:00
Daniel Nishi
f26dbd8f96 Fix the user profile icon.
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
2017-08-21 15:43:38 -07:00
Eric Schwarzenbach
44268e3c67 Remove references to deprecated NetworkBadging class.
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
2017-08-15 20:33:05 +00:00
Daniel Nishi
3f94f68b3b Change visibility on formatPercentage(double).
Bug: 37923610
Test: Manual

Change-Id: I05a2e244a07e737784988a6353841ee55bbdcad0
2017-07-05 15:38:33 -07:00
Sundeep Ghuman
9d10a3cf30 Revert "Update Status Bar with Badged Wifi Icons."
This reverts commit d57f324776.

Reason for revert: Kill badging in ODR

Bug: b/35628911
Test: runtest --path
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerWifiTest.java
Change-Id: I153863dfc02aaa211e1d76f0d85a2779894f72ee
2017-06-15 20:11:44 -07:00
Daniel Nishi
539828045c Change storage manager default to be a config.
This allows OEMs to customize the default behavior of the automatic
storage manager.

Bug: 38499322
Test: SettingsLib Robotest
Change-Id: I7d78865923fa7ff20b796a7075da0f35c7af1807
2017-05-25 09:55:39 -07:00
Jason Monk
9a376bcd45 Fix the status icon colors in QS
Requires lots of theming magic

Test: visual
Change-Id: I1cd28b570f30989b496065c0e06a5aca461deb41
Fixes: 37619734
2017-05-12 16:16:39 -04:00
Jason Monk
824ffffcc4 Make QS light
Test: visual
Change-Id: I873bc44647d509bad0ac035058ea13ac57717416
Fixes: 37213814
Fixes: 37008758
2017-04-11 15:49:06 -04:00
jackqdyulei
806f78d988 Add showChargingMethod in BatteryInfo
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)
2017-04-06 13:16:58 -07:00
Jason Monk
58be7a675b Add colorError
Remove scatered references to old error color and replace them with
references to new colorError

Test: make & visual
Change-Id: Icca8cd790db351c3dfce2197f2046879d062a2c0
2017-02-24 14:57:27 -05:00
jackqdyulei
5dc1f36599 Make precentage calculation round up by 0.5%
So we will show 1% when actually number is 0.5%

Bug: 35305983
Test: RunSettingsLibRoboTests
Change-Id: I26f11f25a7d78cc6b09cb358abd82017fa7cea00
2017-02-21 16:40:01 -08:00
TreeHugger Robot
6e82080513 Merge "Move Badging from ScoredNetwork to NetworkingBadging." 2017-02-18 01:14:04 +00:00
Jason Monk
790442e4cd Tuner updates
Some UX updates to the tuner to feel better and align with settings
UX patterns.

Test: visual
Change-Id: I9c57194b9649c61e0d6d3f9e21a51d9c4a5c1286
2017-02-15 13:35:00 -05:00
Sundeep Ghuman
699deaf610 Move Badging from ScoredNetwork to NetworkingBadging.
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
2017-02-14 14:04:18 -08:00
Fan Zhang
73b161ddc1 Fix a crash when opening app data usage for work profile
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
2017-02-08 12:02:52 -08:00
Sundeep Ghuman
d57f324776 Update Status Bar with Badged Wifi Icons.
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
2017-01-24 15:18:32 -08:00
TreeHugger Robot
9553a1ecc2 Merge "Visual refresh for QS" 2017-01-20 18:08:53 +00:00
Jason Monk
3250885c9f Visual refresh for QS
Adds circles and things

Test: visual
Change-Id: I7d974fcfe6257357abfd1a7d0ee521f0e6cee588
2017-01-20 11:29:25 -05:00
Sundeep Ghuman
f84e0573fc Insert badged icons into the WifiSettings picker.
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
2017-01-19 16:28:24 -08:00
jackqdyulei
b68fd7ae0a Remove hardcoded color for cellular data usage view
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
2017-01-04 16:12:44 -08:00
Tony Mak
bfba9d485e Disallow user to block notification from OobConfig
Change-Id: Ifb2ea790559fc91f88b38ecf29a2b0a7949aeabb
Fix: 29632126
2016-07-14 15:29:44 +08:00
Philip P. Moltmann
545a58ab6b Prevent PrintSpooler from being disabled
Change-Id: I40fb7b25174a41d04f767fbf8ee1da8c02e7156a
Fixes: 29830022
2016-06-28 23:28:48 +00:00
Andrew Sapperstein
5c3734456e Update System UI to use theme colors.
Instead of using hardcoded values, use colorPrimary, colorAccent, etc
to style system UI. Required setting a theme on several views to
get the proper accent color in the right place.

Deletes a lot of hard-coded colors from the app.
Deletes an unused view: StatusBarHeaderView

BUG: 28625050
BUG: 29003410
BUG: 28625105
Change-Id: I46cd8eba7cf5afdab53c7882aa4aac5af46772a9
2016-06-21 11:15:19 -07:00
Svetoslav Ganov
a9c2500a68 Disallow disable of the system shared libs.
bug:28173410

Change-Id: If731f2d90312a083bb940f83431ba3eccf213947
2016-04-13 19:31:40 -07:00
Evan Rosky
aa7f51fe8c Centralized user icon drawing with badges
Renamed CircleFramedDrawable to UserIconDrawable and
added badge/frame support.
Replaced several instances of user icon drawing with
UserIconDrawable

Bug: 27483956
Change-Id: I10d665406ea8b085667aa8c71ffcedffe72dafbd
2016-04-07 23:09:40 +00:00
Muyuan Li
18d2b32423 SettingsLib: refactor for extensibility.
Add short version of charging / discharging labels. Extended getBatteryInfo method to take in additional flag for short version labels.

Change-Id: I499ce59493f1345c3084d48829ded5117d470e44
(cherry picked from commit e686bf4514d9c1116a4eaa8af285f44613e23b36)
2016-04-04 23:19:29 +00:00
Svet Ganov
81fb0d4acd Disallow disabling of the package installer
bug:26426558

Change-Id: Ia40a146c37c219a6edbb5d0457b1fce45b021266
2016-03-04 09:27:26 -08:00
Julia Reynolds
21c30548ba Prevent users from blocking certain system notifications.
Bug: 26575595
Change-Id: I0c890852a441085fffab143a590a12fbd7f2b2a3
2016-01-15 15:00:02 -05:00
Jason Monk
c06fbb1298 Move battery saver notification to QS
Remove the battery saver notification and instead create a detail
panel within QS that allows it to be turned on and off.

Change-Id: I54654d26183586fa171fda04877a840701f8ef33
2016-01-11 14:29:23 -05:00
Wei Liu
30275c1924 Refactor UidDetailProvider and its dependencies to SettingsLib.
so that it can be reused by Wear app data usage.

Change-Id: Ifd5709647ba031bb38b2293c35def01bcdee1448
2015-08-25 11:01:36 -07:00