518 Commits

Author SHA1 Message Date
Makoto Onuki
69ade35741 Merge "Once auto-battery saver is ever set, don't show suggestion" into pi-dev 2018-04-09 20:29:30 +00:00
TreeHugger Robot
e5b621a6af Merge "Allow 3 variants of icon size in TwoTargetPreference." into pi-dev 2018-04-09 19:04:22 +00:00
Fan Zhang
874425d3f2 Allow 3 variants of icon size in TwoTargetPreference.
Bug: 77726902
Test: robotests
Change-Id: I2770e78827227edff28fcf7e9429c916780588b4
2018-04-06 16:59:38 -07:00
Makoto Onuki
5972773e47 Once auto-battery saver is ever set, don't show suggestion
Bug: 77228046
Test: manual test after adb shell settings delete secure suppress_auto_battery_saver_suggestion
Test: m -j ROBOTEST_FILTER=BatterySaverButtonPreferenceControllerTest RunSettingsRoboTests
Test: b ROBOTEST_FILTER=BatterySaverUtilsTest RunSettingsLibRoboTests
Change-Id: Ib224263dc20e7844b7a79fe175fde26c773bd05a
2018-04-06 14:58:14 -07:00
TreeHugger Robot
919f606df9 Merge "Update battery strings to respect user 24 hour setting" into pi-dev 2018-04-06 18:17:11 +00:00
Salvador Martinez
b9e8cfa5d3 Update battery strings to respect user 24 hour setting
ICU on android doesn't respect users 24 hour setting by default.
This CL makes it so that tell ICU what the users setting is so that
it will respect it.

Test: robotests updated
Bug: 77483888
Change-Id: I46eec2a10530b8b490f6a681c3a9b0a9dd4d68bd
2018-04-05 15:00:23 -07:00
Lei Yu
ae7686534e Hide app if it shares uid with whitelisted app
Statsd blame app based on uid, which may mapping to multiple packages.
If there is one app in whitelist, then we shouldn't blame other apps
in same group.

Bug: 77560853
Test: RunSettingsLibTests
Change-Id: Ic21fea9701f9199c016674eaca3b0382e3a80837
2018-04-05 13:49:45 -07:00
Jovana Knezevic
c3724b5e91 Merge "Adding user accessor functions to UserManagerHelper." into pi-dev 2018-04-02 22:59:24 +00:00
TreeHugger Robot
5b4eed556b Merge "Add isAudioOn() in HeadsetProfile" into pi-dev 2018-03-30 03:12:51 +00:00
ryanywlin
8561d193f1 Add isAudioOn() in HeadsetProfile
* Add this API for checking audio status from BlueTooth Headset Service

Bug: 74130772
Test: ROBOTEST_FILTER="HeadsetProfileTest" make -j40 RunSettingsLibRoboTests
Change-Id: I80b3dbc8b0f9926859ff08f6849cafca89e940a7
2018-03-30 09:14:23 +08:00
jovanak
12f105e54a Adding user accessor functions to UserManagerHelper.
Fixing a failing test. Currently unable to test removing current user, since current user is system user.

Fixes: 73415209
Test: unit tests
Change-Id: Ie374aa97383e3dd8ec4ef96b0d680fa8a04172b5
2018-03-29 15:28:31 -07:00
TreeHugger Robot
740d37193f Merge "Update wifi header summary text to show metered state" into pi-dev 2018-03-28 19:15:05 +00:00
TreeHugger Robot
9bd77dea82 Merge "Change the time format to short" into pi-dev 2018-03-28 16:45:45 +00:00
Salvador Martinez
6f6fe75572 Update wifi header summary text to show metered state
When we detect a network as metered or the user manually overrides
the metered state for a network we should show this in the summary
text for the network. This CL makes it so that this state overrides
the network speed when needed.

Test: robotests
Bug: 68030417
Change-Id: Ia1f3f0a537b6ff711a430466b83664d8f1cad0b6
2018-03-27 18:07:44 -07:00
Lei Yu
128f56302d Change the time format to short
So it will show "2 days, 15 hr, 2 min" instead of "2d 15h 2m"

Bug: 76113036
Test: RunSettingsLibRoboTests
Change-Id: I31df2ac8e1ebc0616ef58ea2d21a50ca9788b392
2018-03-27 11:28:59 -07:00
TreeHugger Robot
9753e774ce Merge "Hearing Aid Profile: set and get activeDevice" into pi-dev 2018-03-23 18:22:27 +00:00
TreeHugger Robot
f3f86dd09e Merge "Support CATEGORY_LEANBACK_LAUNCHER on tv devices." into pi-dev 2018-03-23 17:06:02 +00:00
Christine Franks
0f4545ac64 Merge "Allow developer options in retail mode" into pi-dev 2018-03-23 01:11:22 +00:00
Julia Reynolds
538ba7ac35 Merge "Update duration text" into pi-dev 2018-03-22 20:04:40 +00:00
Leif Hendrik Wilden
10e7b47158 Support CATEGORY_LEANBACK_LAUNCHER on tv devices.
Bug: 73902033
Test: Manually tested.
Change-Id: I792f7b8f6182affe3621c1a8f0ffc8c4f132f480
2018-03-22 10:33:40 -07:00
Makoto Onuki
ff61d8872c Merge "Implement new BS warning / notification flow (1/2)" into pi-dev 2018-03-21 22:32:33 +00:00
Julia Reynolds
4ccdede3e3 Update duration text
Change-Id: Ib390aaf1a82d28ab197628b09e80ca439c392eae
Fixes: 72651488
Bug: 74318867
Test: make -j RunSettingsLibRoboTests
2018-03-21 15:37:31 -04:00
Jovana Knezevic
c7034f7ab1 Merge "Adding UserManagerHelper class to SettingsLib." into pi-dev 2018-03-21 19:34:32 +00:00
Makoto Onuki
16a0dd2d5e Implement new BS warning / notification flow (1/2)
- Show the battery saver confirmation dialog only for the first time.
- Start counting # of manual activations, which will be used in a
follow-up CL.

Bug: 74120126
Test: Manual tests with ./vendor/google_experimental/users/omakoto/android-battery-tester
Test: m -j ROBOTEST_FILTER=BatterySaverUtilsTest RunSettingsLibRoboTests
Test: cd frameworks/base/packages/SystemUI/tests && \
        atest src/com/android/systemui/power/PowerUITest.java src/com/android/systemui/power/PowerNotificationWarningsTest.java
Change-Id: If6a081a6222e6a87c4cd332364c89856e7648a36
2018-03-21 12:15:51 -07:00
Salvador Martinez
d5eab8b668 Merge "Update logging util to not crash on null" into pi-dev 2018-03-21 16:23:26 +00:00
TreeHugger Robot
b16affc402 Merge "Prevent callbacks after onStop is called." into pi-dev 2018-03-20 23:00:45 +00:00
Hansong Zhang
d7b3591659 Hearing Aid Profile: set and get activeDevice
Add setActiveDevice() for Hearing Aid Profile in SettingsLib

Bug: 69623109
Test: robolectric test and manual test
Change-Id: I70eafe030747053876e2ab8a125d5dd01c5e0eb9
2018-03-20 15:33:36 -07:00
jovanak
10a5d7fe22 Adding UserManagerHelper class to SettingsLib.
It's a simple wrapper for adding/removing/switching users.

It provides an interface to register listeners for user changes.

Moving it here to be used in CarSettings and SystemUI for the car.

It's not car-specific, so it could be used by anyone who needs it.

Fixes: 74456332
Bug: 74456744
Test: Unit tests in UserManagerHelperTest.java.
Change-Id: I94b3051ed1e4f96d98e5ab2a7a5a7fa75bc5cade
2018-03-20 13:51:35 -07:00
Christine Franks
77ff57992b Allow developer options in retail mode
Bug: 70985064
Test: make -j100 && make RunSettingsLibRoboTests -j100
Change-Id: I900ea38c8ce0ceb041092a426e58db0cf0ed59f3
2018-03-20 20:03:10 +00:00
TreeHugger Robot
6b0a9bc054 Merge "Move the setActiveDevice logic from Settings to SettingsLib (1/2)" into pi-dev 2018-03-20 19:56:51 +00:00
Hansong Zhang
6a416327e5 Move the setActiveDevice logic from Settings to SettingsLib (1/2)
Currently the Settings app handles the logic of setting active device;
however, this should be handled by SettingsLib so the logic can be shared.

Bug: 75984255
Test: robolectric test
Change-Id: Ia44e16c550d5b57c985e29e46e17044a895b495a
2018-03-19 18:20:38 -07:00
Sundeep Ghuman
93d591bccb Prevent callbacks after onStop is called.
Bug: 74196862
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: Idab27f7d493fdd097d55aac40750912e454addb2
2018-03-19 16:31:48 -07:00
Salvador Martinez
97c85365ab Update logging util to not crash on null
The logging for the wifi access points could cause a crash if
a bad scan result is passed in for any reason. This CL updates
it to be resilient to that by doing a best effort logging of
the scan results.

Bug: 74507895
Test: robotests
Change-Id: I4eaf948d7279374b1f4d009ef6f4fd0119f22ab7
2018-03-19 16:14:33 -07:00
Jong Wook Kim
a6268f8c9d Merge "Display that MAC is randomized in About Phones" into pi-dev 2018-03-19 18:14:08 +00:00
Jong Wook Kim
0c3904eb5a Display that MAC is randomized in About Phones
When Connected MAC Randomization is enabled and the device is
disconnected, there isn't a valid MAC address to display since we don't
know what the device's next MAC address is going to be.

In such cases, display "MAC address is randomized" instead of an invalid
MAC address in About Phones page.

Bug: 73663275
Test: make RunSettingsLibRoboTests -j40
Change-Id: I0a4df2b1b0823632b26f90e097c26f47dd5a0a67
2018-03-19 15:53:25 +00:00
Salvador Martinez
ba499efa7a Softens one of the battery strings per UI request
Bug: 74448640
Test: robotests updated
Change-Id: I25a18dcad343fd0eeeeac504570eea7a1a325a1a
2018-03-16 15:19:14 -07:00
Andrew Sapperstein
2572f6b7ae Merge "Add sysWhitelistedAppsExceptIdle in whitelist" into pi-dev 2018-03-15 05:09:59 +00:00
Lei Yu
e93e77b5b2 Add sysWhitelistedAppsExceptIdle in whitelist
Add sysWhitelistedAppsExceptIdle to PowerWhitelistBackend so we
can get doze whitelist except idle. Now this list is used in
anomaly detection in settings.

Bug: 74241534
Test: RunSettingsLibRoboTests
Change-Id: I42619cbc9fe29f33f83fbd1517017db6016e3674
2018-03-13 15:21:14 -07:00
TreeHugger Robot
4c6130ddcc Merge "Add tests to prevent NPE regression." into pi-dev 2018-03-13 16:59:52 +00:00
Beverly Tai
75431913ef Merge "Using zen duration preference" into pi-dev 2018-03-12 21:39:18 +00:00
Sundeep Ghuman
5fde6405f8 Add tests to prevent NPE regression.
Bug: 73484770
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Idd909dc3ac78ba9ed75ff06040b2c0842a7c74b8
2018-03-12 12:59:24 -07:00
Beverly
09da25f00d Using zen duration preference
Test: make ROBOTEST_FILTER=ZenDurationDialogTest RunSettingsLibRoboTests -j40
Bug: 73741459
Change-Id: Ide76ac8016b84f128c47ad3731eeced25dce8c73
2018-03-07 13:57:59 -05:00
TreeHugger Robot
13da2a778f Merge "Fix duplicate text in battery string" into pi-dev 2018-03-07 18:02:27 +00:00
Anton Hansson
d137c872cd frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
2018-03-07 11:42:04 +00:00
Salvador Martinez
b9bac49370 Fix duplicate text in battery string
The word 'about' was duplicated in the string. This CL fixes the
string and makes the tests for that particular string more robust.

Test: robotests
Bug: 74220105
Change-Id: Ifeff3e08a64c5f23b7a64dfc0d35ca912ce7f65a
2018-03-07 00:37:10 +00:00
TreeHugger Robot
3ae0efcc09 Merge "Add default implementation to handle master dev option switch." 2018-03-01 02:38:47 +00:00
TreeHugger Robot
2c5079c641 Merge "Auto set summary on preference during updateState" 2018-03-01 01:29:22 +00:00
Doris Ling
7e91932382 Add default implementation to handle master dev option switch.
- subclass that does not override the methods will inherit the default
behavior: preference will be enabled/disabled when the top level
developer options switch is turned on/off.

Bug: 73955632
Test: make RunSettingsLibRoboTests
Change-Id: I477170afd7eb4d74a807c933dcc254ff7a4bbd96
2018-02-28 16:06:19 -08:00
TreeHugger Robot
80fd74680e Merge "Update battery discharging strings" 2018-02-28 23:22:30 +00:00
Fan Zhang
3ce7f37104 Auto set summary on preference during updateState
Change-Id: Ibc24f3f041841d9fe7d53674a672bc2bacad895b
Fixes: 73950519
Test: robotests
2018-02-28 13:42:11 -08:00