Commit Graph

5807 Commits

Author SHA1 Message Date
Todd Kennedy
4fa4eeb675 Merge "OMS: rebase settings when overlays update" into pi-dev am: 203b7b1792
am: 45d58cab2c

Change-Id: Iab503a1196a7412d101e4c5c7831785bf5fd18bb
2018-05-11 11:53:09 -07:00
Todd Kennedy
203b7b1792 Merge "OMS: rebase settings when overlays update" into pi-dev 2018-05-11 17:44:53 +00:00
AL Ho
ae2893db10 Update Accessibility vibration settings.
- Get notification vibration and haptic feedback intensity respectively.
- Use xliffs to compose these strings.
- Use the version that passed in Vibrator.class to get Vibrator
  instance.
- Refactor switch/case part in getSummary() of
  VibrationIntensityPreferenceController.
  Let AccessibilitySettings and VibrationIntensityPreferenceController
  both call it.
- Add robolectric test for method: updateVibrationSummary().
- Refine test method, use real preference and test summary value.
- Remove redundancy.

Bug: 75322064
Test: make ROBOTEST_FILTER=AccessibilitySettingsTest RunSettingsRoboTests
Change-Id: Ia3c7447b1ab1e336b36ad439800b673821417e48
Merged-In: Ia3c7447b1ab1e336b36ad439800b673821417e48
2018-05-11 08:56:13 +00:00
AL HO
204dcfdb4c Merge "Update Accessbility vibration settings." into pi-dev 2018-05-11 07:11:14 +00:00
TreeHugger Robot
9e629edb09 Merge "Fix a strict mode violation in SystemUpdatePrefController" into pi-dev 2018-05-11 05:49:29 +00:00
TreeHugger Robot
8c71d3853f Merge "Fix a strict mode violation in SystemUpdatePrefController" 2018-05-11 04:46:53 +00:00
Fan Zhang
93d3b5174d Fix a strict mode violation in SystemUpdatePrefController
Change-Id: I4770b878b6f69318f08f8974c5c4d2690c5611d4
Bug: 78626509
Test: robotests
2018-05-11 03:45:48 +00:00
AL Ho
92216ae148 Update Accessbility vibration settings.
- Get notification vibration and haptic feedback intensity repectively.
- Use xliffs to compose these strings.
- Use the version that passed in Vibrator.class to get Vibrator
  instance.
- Refactor switch/case part in getSummary() of
  VibrationIntensityPreferenceController.
  Let AccessibilitySettings and VibrationIntensityPreferenceController
  both call it.
- Add robolectric test for method: updateVibrationSummary().
- Refine test method, use real preference and test summary value.
- Remove redundancy.

Bug: 75322064
Test: make ROBOTEST_FILTER=AccessibilitySettingsTest RunSettingsRoboTests
Change-Id: Ia3c7447b1ab1e336b36ad439800b673821417e48
Merged-In: Ia3c7447b1ab1e336b36ad439800b673821417e48
2018-05-11 11:13:25 +08:00
Lei Yu
90e7041170 Merge "Fix a bug in AnomalyDetectionJobService" into pi-dev am: b98039e263
am: 5740dd8604

Change-Id: I0b982809ccb0419b5773fb05c9b59f402dbbcbee
2018-05-10 18:26:48 -07:00
Doris Ling
56df32dc0b Merge "Map the new category keys to the corresponding fragment." into pi-dev am: be5fa599be
am: b04528670b

Change-Id: I44e1cc9b2e631b19bb51079230821d5e59f496ec
2018-05-10 18:14:54 -07:00
Lei Yu
b98039e263 Merge "Fix a bug in AnomalyDetectionJobService" into pi-dev 2018-05-11 00:49:22 +00:00
TreeHugger Robot
be5fa599be Merge "Map the new category keys to the corresponding fragment." into pi-dev 2018-05-11 00:46:42 +00:00
Fan Zhang
4ca363470b Fix a strict mode violation in SystemUpdatePrefController
Change-Id: I4770b878b6f69318f08f8974c5c4d2690c5611d4
Merged-In: I4770b878b6f69318f08f8974c5c4d2690c5611d4
Fixes: 78626509
Test: robotests
2018-05-11 00:32:01 +00:00
Lei Yu
1ac4967311 Merge "Add action for low battery tip" into pi-dev am: ed7101cd2a
am: c051396951

Change-Id: If2fee93c5ab5ba96fb843b11633f5704043b3067
2018-05-10 17:25:45 -07:00
Lei Yu
c6b50f1d77 Merge "Update strings in battery settings." into pi-dev am: faa5c2281e
am: 37a0f5cf7d

Change-Id: I55da31048dd2804198272f8016e135860a5433ee
2018-05-10 16:54:00 -07:00
TreeHugger Robot
a3d991cc0c Merge "Make it so client code does not tie tether to wifi" 2018-05-10 23:44:01 +00:00
Lei Yu
1e014ca87c Merge "Use user doze whitelist in anomaly detection" into pi-dev am: d257c1a2d9
am: aeb5b38c52

Change-Id: Id75f81f42a2de2b459e6fd0c705e916324021959
2018-05-10 15:57:28 -07:00
TreeHugger Robot
ed7101cd2a Merge "Add action for low battery tip" into pi-dev 2018-05-10 21:52:43 +00:00
TreeHugger Robot
faa5c2281e Merge "Update strings in battery settings." into pi-dev 2018-05-10 21:28:31 +00:00
Doris Ling
24827a1c7b Map the new category keys to the corresponding fragment.
- map category night_light to NightDisplaySettings
- map category gestures to GestureSettings

Bug: 79530682
Bug: 79532703
Test: make RunSettingsRoboTests
Change-Id: Idc45957d2515e148226897f58fcc358a8c7f37dd
2018-05-10 13:51:28 -07:00
Salvador Martinez
188af9439e Make it so client code does not tie tether to wifi
The wifi service already handles turning off tethering if
multi-interface is/isn't supported. We don't need to do tie wifi
and tethering stuff together in the UI.

Test: robotests still pass
Bug: 79213401
Change-Id: I699dfe2d7646f248a54faa5a8429176697614cdf
2018-05-10 13:36:08 -07:00
Lei Yu
d257c1a2d9 Merge "Use user doze whitelist in anomaly detection" into pi-dev 2018-05-10 20:10:42 +00:00
Lei Yu
8d538ef12d Add action for low battery tip
The action should be same as EarlyWarningTip.
1. Option to "turn on battery saver" is battery is low
2. Or show "battery saver is on" and take user to "battery saver" page.

Fixes: 76113067
Test: RunSettingsRoboTests

Change-Id: I896358305a8ae4cd97c3864bbf6e556b4d025dd7
2018-05-10 12:58:47 -07:00
Fan Zhang
4979f434fc Merge "Fix a typo in AndroidManifest.xml" into pi-dev am: 3a9fbac582
am: e50f5effa0

Change-Id: I68689c03344b1987b905b32f95f91d82b5a9e129
2018-05-10 11:32:23 -07:00
Lei Yu
bc54cedabd Update strings in battery settings.
1. Message in high usage dialog
2. Title in app usage list

Change-Id: Iac610483e10e8d2a93a18ca664aec17d9561aaf8
Fixes: 78638843
Test: RunSettingsRoboTests
2018-05-10 11:31:29 -07:00
Fan Zhang
3a9fbac582 Merge "Fix a typo in AndroidManifest.xml" into pi-dev 2018-05-10 18:07:27 +00:00
Lei Yu
a00e39365c Fix a bug in AnomalyDetectionJobService
Even though onStopJob is called, the service may still exist, so
we need to reset the mIsJobCanceled in onStartJob

Also remove the batteryStats since we don't need it anymore.

Change-Id: I6d48efecb750ad4e464569cac426d87014a8db90
Fixes: 77968649
Test: RunSettingsRoboTests
2018-05-10 11:07:17 -07:00
Todd Kennedy
94fecb94e9 OMS: rebase settings when overlays update
When an overlay package has been upgraded, OMS needs to reconcile any
previous settings about the overlay with the new state of affairs.
Sometimes it is possible to rebase the OMS settings on the new
information [e.g. the overlay has changed categories]; sometimes the OMS
settings have to be scrapped [e.g. the overlay has changed target
package]. Update OMS to do The Right Thing.

Bug: 78809704
Test: manual (adb shell stop, adb push specially prepared overlays, adb shell start, adb exec-out cmd overlay dump)
Test: ran unit tests
Test: adb install out/target/product/walleye/data/app/SettingsUnitTests/SettingsUnitTests.apk
Test: adb shell am instrument -w -e class com.android.settings.display.ThemePreferenceControllerTest com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Test: NOTE: 3 of 4 failures both pre and post change; looks like there are issue with the unit tests themselves

Change-Id: Icd1ae633dbee5b5ca957fa6b652af6209b4b1260
2018-05-10 11:02:42 -07:00
Beverly Tai
60a9ed8627 Merge "DO NOT MERGE Add zen starred contacts preference" into pi-dev 2018-05-10 13:28:47 +00:00
ryanywlin
f95ed0925b Merge changes from topic "add-hearing-aid-device-in-audio-switch" into pi-dev am: 7e31e22f57
am: 82db752ef0

Change-Id: I7e9a40b08afebedb7b44a6345cda8b2564db315d
2018-05-09 20:46:27 -07:00
TreeHugger Robot
7e31e22f57 Merge changes from topic "add-hearing-aid-device-in-audio-switch" into pi-dev
* changes:
  Add hearing aid device in audio switch
  Find active device for add hearing aids device into audio switcher.
  Three methods for adding hearing aids device into audio switcher.
2018-05-10 03:31:33 +00:00
Mehdi Alizadeh
3167f72961 Merge changes from topic "swipe-up-gesture-overlay" into pi-dev
* changes:
  Imports com.android.settings.R to fix build breakage
  Adds two overlay settings fields for Swipe Up gesture
2018-05-10 03:01:05 +00:00
ryanywlin
8276d966e9 Add hearing aid device in audio switch
- Add connected hearing aid device to MediaOutputPreferenceController
and HandsFreeProfileOutputPreferenceController

- Set active device to different profile depend on HisyncId

Bug: 78142719
Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j28
Test: make RunSettingsRoboTests ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j28
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
Change-Id: Ib8fe4f06f8564572dffdce6fcc3f29578bf91bd9
2018-05-10 10:28:20 +08:00
Lei Yu
bfedf3d506 Merge changes Ifa91ad93,I14f9696a into pi-dev am: d067cbcfc9
am: 9e639df738

Change-Id: Ic156328bb3249d9c82cc4ea38dc17bc39ddf0d27
2018-05-09 19:25:25 -07:00
Lei Yu
d71e8d8c87 Use user doze whitelist in anomaly detection
Bug: 77924141
Test: RunSettingsRoboTests
Change-Id: Id9503c9468292f128b76ea872d6603c49965d919
2018-05-09 19:22:57 -07:00
ryanywlin
9f407aba36 Find active device for add hearing aids device into audio switcher.
- Find active device accroding to different stream type and
output device.

- update isStreamFromOutputDevice() to identify general case like
DEVICE_OUT_BLUETOOTH_A2DP is subset of DEVICE_OUT_ALL_A2DP.

- add test case for these methods.

Bug: 78142719
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
Change-Id: I381135c120dbf051679bff7626d47e41f8d589da
2018-05-10 10:20:30 +08:00
ryanywlin
eb5019d05a Three methods for adding hearing aids device into audio switcher.
- Add three methods for subclass to get connected device list
denpending on different profiles.

- Test case for these methods.

Bug: 78142719
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
Change-Id: Ia1367a53ab6a3432878a514490722871ed878954
2018-05-10 10:08:14 +08:00
Lei Yu
d067cbcfc9 Merge changes Ifa91ad93,I14f9696a into pi-dev
* changes:
  Update the BatteryTipPolicy
  Update and expose the low battery tip.
2018-05-10 02:06:19 +00:00
Mehdi Alizadeh
c93a97d9d5 Adds two overlay settings fields for Swipe Up gesture
Adds two overlay settings for Swipe Up gesture, one for the default
value (enabled/disabled), and another one to show/hide the Swipe Up
settings page in Settings app.

Bug: 78908915
Bug: 78641268
Test: Robotests and Manual test
Change-Id: If7bea967f3af9ebe96ab87e8a4d6d05c5daa4ed5
2018-05-09 18:44:42 -07:00
Fan Zhang
66156d68e7 Fix a typo in AndroidManifest.xml
And some drive-by clean up.

Change-Id: Ic036f8f5bec8064a5d55e0e032ce45e483323b14
Fixes: 78889604
Test: atest
2018-05-09 18:06:27 -07:00
Salvador Martinez
7e4f8a28eb Merge "Hide hidden network spinner for non-hidden networks" into pi-dev am: cda8a44cee
am: f94119e739

Change-Id: If887d0c414649489d483bf523316d1f960798000
2018-05-09 16:56:30 -07:00
TreeHugger Robot
cda8a44cee Merge "Hide hidden network spinner for non-hidden networks" into pi-dev 2018-05-09 23:41:23 +00:00
TreeHugger Robot
ab68a8107c Merge "Establish permanently unavailable settings" into pi-dev 2018-05-09 21:13:44 +00:00
Salvador Martinez
bfcedc54b0 Merge "Remove the Settings search keywords from Slices" into pi-dev am: 26453818b9
am: 7e34ffdb6a

Change-Id: Ib4abbf9c4b4db45ab99846b7377ecaea4c0e9745
2018-05-09 13:45:05 -07:00
Salvador Martinez
26453818b9 Merge "Remove the Settings search keywords from Slices" into pi-dev 2018-05-09 20:30:02 +00:00
Beverly
a4d5980869 DO NOT MERGE Add zen starred contacts preference
Bug: 78447976
Test: ZenModeStarredContactsPreferenceControllerTest
Change-Id: Ic9d1b08c3e80832b29ad8e223a34f35e2f763cf9
2018-05-09 16:12:10 -04:00
android-build-team Robot
9110d29f13 Merge "DO NOT MERGE Clear deprecated effects when saving zen policy" into pi-dev 2018-05-09 19:47:02 +00:00
android-build-team Robot
a75d1e41ce Merge "Don't check battery usage in excessive bg anomaly" into pi-dev am: 27f1e8e1e9
am: 5dc5fbc0d5

Change-Id: Idabb5bcca09b7617334133615e92bfce59281c18
2018-05-09 12:41:47 -07:00
Lei Yu
df83cf3c29 Update the BatteryTipPolicy
1. Add "testLowBatteryTip"
2. Update default value for low battery threshold

Change-Id: Ifa91ad93f484dc806dfc176ad5ffd912824f5063
Bug: 76113067
Test: RunSettingsRoboTests
2018-05-09 12:31:54 -07:00
Lei Yu
b2f089c468 Update and expose the low battery tip.
This tip was punted however we need to bring it back to P. It happens
when battery level is low or remaining time is less than 3 hour. The
suggestion is to turn on battery saver.

1. Extend tip from EarlyWarningTip since it has most common logic
2. Update the detector to align it to battery saver notifcation in
systemui.
3. Update tip order to surface low battery tip.

Follow CL will:
1. Hook up the low battery threshold to server side
2. Add test stub for this tip, so we could trigger it by adb.

Change-Id: I14f9696a549393bf980e31838fb86afd5d9efbc7
Bug: 76113067
Test: RunSettingsRoboTests
2018-05-09 12:31:41 -07:00