Commit Graph

4383 Commits

Author SHA1 Message Date
TreeHugger Robot
e723c9c073 Merge "Add smart battery tip." 2018-01-12 23:11:23 +00:00
yuemingw
68b0320856 Block settings when DISALLOW_CONFIG_BRIGHTNESS.
Test: m -j RunSettingsRoboTests
Change-Id: I667c76dfef20158ab2a72178fb82b8183b448976
Fix: 67675654

Change-Id: I83f2e0086e16cd2a0dbc4cbcc31d4e2d454934cd
2018-01-12 23:03:17 +00:00
Fan Zhang
4f389a7731 Tweak app notification page title and expand button cutoff
Change-Id: If9b93023ac9ab946b7c2b0dd65852948029da896
Fixes: 71813209
Test: visual
2018-01-12 15:00:09 -08:00
TreeHugger Robot
e31f582baf Merge "Introduce boolean flag to show/hide Location Scanning preference." 2018-01-12 21:53:12 +00:00
James Lemieux
99d10a4e62 Adopt robolectric 3.6.1
Bug: 71596155
Test: make RunSettingsRoboTests
Change-Id: I46362bae1e3ddd3ce19ade1c93250d272f3366e6
2018-01-12 13:49:29 -08:00
TreeHugger Robot
e9a3a14330 Merge "Add ability to show/hide individual settings in Sounds page." 2018-01-12 20:11:30 +00:00
Ben Lin
e8377718e0 Introduce boolean flag to show/hide Location Scanning preference.
This introduce one new flag:
config_show_location_scanning

Which when set to false, will hide "Scanning" in Location preference.

Some OEMs may control Bluetooth/Wi-Fi scanning themselves, so they may
want to hide the page from users.

Bug: 62418710
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=LocationScanningPreferenceControllerTest

Change-Id: I19f0020a2c94f70b3b7956529f57af098ccc79fd
2018-01-12 19:48:37 +00:00
jackqdyulei
e682126a11 Add smart battery tip.
Also move the action method from BatteryTip to TipAction. Since it
need extra data that we don't want to store it in parcel.

Bug: 71502850
Test: RunSettingsRoboTests
Change-Id: Ib658426725158d26fcdd437fa8bf6bf24e9a8c14
2018-01-12 10:32:12 -08:00
TreeHugger Robot
194085f5c5 Merge "Make a strong reference to LifecycleOwner in tests" 2018-01-12 18:01:23 +00:00
TreeHugger Robot
6c14a6a699 Merge "Zen Mode messages + calls are ListPreferences (radio button dialog)" 2018-01-12 15:33:14 +00:00
Beverly
daa13a969f Zen Mode messages + calls are ListPreferences (radio button dialog)
Bug: 63077372
Test: ZenModeCallsPreferenceControllerTest
Test: ZenModeMessagesPreferenceControllerTest
Change-Id: I5d2516402b261413c51a1b4eba5153ffadf1459b
2018-01-12 14:52:17 +00:00
Joachim Sauer
cff4bcb554 Merge changes from topic "tz_picker"
* changes:
  New manual time zone picker.
  Data loading component for new time zone picker.
2018-01-12 11:25:32 +00:00
TreeHugger Robot
24b2d92fdb Merge "Update screen pinning state whenever it changes." 2018-01-12 00:03:44 +00:00
jackqdyulei
adf11594d3 DO NOT MERGE Add metric log for anomaly.
This cl creates metric log when anomaly surfaces in battery page or
anomaly dialog.

Each anomaly action contains two fields:
1. FIELD_CONTEXT(int): determine which fragment start this action.
2. FIELD_ANOMALY_ACTION_TYPE(int): determine action type for this
anomaly.

**Cherry-picked from ag/3120176. Fix merge conflict in import part
in AdvancedPowerUsageDetail**

Bug: 68215016
Test: RunSettingsRoboTests
Change-Id: I83761e2a9c206ea7a04f7d031a6961fdab7ca9a0
2018-01-11 14:52:48 -08:00
Fan Zhang
4e08869e1a Make a strong reference to LifecycleOwner in tests
Change-Id: Id3b26ded6c903b67b9880dbfe1a0656a564c8947
Fixes: 71867776
Test: rerun tests
2018-01-11 14:30:16 -08:00
Ajay Nadathur
7b1d96a345 Skip option missing on pattern lock screen
- Skip present during suw/deferred + non-fingerprint flow
- Skip hidden when opened from settings
- Skip hidden during suw/deferred when trying to setup up fingerprint

Test: Manually verified, robolectric tests updated
bug: 71763670
Change-Id: Ie3aac68a6d04c7727320af83532640580248bd47
2018-01-11 14:30:12 -08:00
Fan Zhang
207f4dda9e Merge "Misc fixes in device info page" 2018-01-11 22:19:05 +00:00
TreeHugger Robot
66c061a09f Merge "Add developer tiles for layer and window trace" 2018-01-11 21:37:53 +00:00
TreeHugger Robot
d99a8ef4f8 Merge "Misc fixes" 2018-01-11 21:16:46 +00:00
Fan Zhang
f93fcd366a Update screen pinning state whenever it changes.
Change-Id: I98f0a7b0afcc76bcf822786e6cf3ea37004db1a8
Fixes: 71845181
Test: robotests
2018-01-11 12:42:16 -08:00
Fan Zhang
1f37d2cc7a Misc fixes in device info page
- Move DeviceInfoSettings to deviceinfo package
- Remove deprecated manifest entries
- Rename a bunch of things
- Add ripple and change text color to accent for security patch

Change-Id: I35c04e53829a67cba553f984ad1a1b9319077873
Fixes: 71775150
Test: robotests
2018-01-11 12:31:02 -08:00
Fan Zhang
43c85f5f92 Misc fixes
- Allow everyone to submit tests.
- Fix SoundPreferenceControllerTest

Fixes: 71860595
Test: rebuild
Change-Id: I36626beb304966d3d453ebe02d37625e6e724d08
2018-01-11 11:39:56 -08:00
Joachim Sauer
0cdbe1897c New manual time zone picker.
This implements a new manual time zone picker that allows selection of a
time zone for a selected country. It also allows selecting a fixed
offset time zone (most importantly Etc/UTC, which is a frequently
requested feature).

The new time zone picker is currently behind a feature flag
(settings_zone_picker_v2), which is disabled by default.

Test: manual
Test: SettingsFunctionalTests
Test: SettingsRobotTests
Bug: 62255208
Change-Id: I89c5a04bcb562b6facf5f31a8aa4ad1cdd51ab10
2018-01-11 18:03:16 +00:00
TreeHugger Robot
0fea51b343 Merge "Add ability to show/hide Color Correction and Color Inversion." 2018-01-11 17:49:56 +00:00
Joachim Sauer
0bed37a086 Data loading component for new time zone picker.
Add new data loading classes for improved manual time zone picker.

These classes use existing sources mostly from ICU4J to construct the
list of regions and timezones to present to the user.

Test: SettingsRoboTests
Bug: 62255208
Change-Id: I244c391a41b0b53cd3f7857f9c0d1ef766a39b17
2018-01-11 12:18:54 +00:00
TreeHugger Robot
66898b0cc9 Merge "Update master switch style" 2018-01-11 03:00:28 +00:00
Ben Lin
f1346930bc Add ability to show/hide Color Correction and Color Inversion.
This adds two new boolean flags:
config_show_color_inversion_preference
config_show_color_correction_preference

Which whent set to false, will hide the color inversion and color
correction preference items, respectively.

Bug: 62378109
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=AccessibilitySettingsTest

Change-Id: I06eac8e141bd6564495298c6c6544a7b059a4e73
2018-01-10 18:33:01 -08:00
TreeHugger Robot
343d5edfc0 Merge "Propagate extras when switching between choose lock activities" 2018-01-11 00:17:27 +00:00
Vishnu Nair
dc6bc4820e Add developer tiles for layer and window trace
Bug: 64831661
Test: Toggle layer and window trace from new QS Tile
Test: make RunSettingsRoboTests ROBOTEST_FILTER=LayerTraceTest && make RunSettingsRoboTests ROBOTEST_FILTER=WindowTraceTest
Change-Id: I86b63361821e1bf5dd6a934e7fcb7e810740b74a
2018-01-10 16:07:23 -08:00
Fan Zhang
46b5474be4 Update master switch style
- When off, background grey
- When on, background accent
- Switch toggle always white, only change the slider color during on/off

Change-Id: I0ca49439f4e20e75517d503f28cc3068930591e8
Bug: 69462439
Test: robotests
2018-01-10 15:52:20 -08:00
Ben Lin
b1f6f24dcc Merge "Introduce boolean flags to show/hide items for Language & input." 2018-01-10 22:29:28 +00:00
Ajay Nadathur
b14b996dbf Propagate extras when switching between choose lock activities
bug: 71715828
Test: Manually tested, added robolectric test
Change-Id: Ide18c94f52fe896aee0636ef702cd808b7d88638
2018-01-10 14:10:54 -08:00
Ben Lin
921e3d14b8 Add ability to show/hide individual settings in Sounds page.
This adds the following 7 new boolean flags:
config_show_alarm_volume
config_show_charging_sounds
config_show_media_volume
config_show_notification_ringtone
config_show_notification_volume
config_show_screen_locking_sounds
config_show_touch_sounds

Which when set to false, will hide the respective preferences in Sounds
page.

Bug: 69813881
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.notification all pass.

Change-Id: I84a2ce66b07c00d658422ce1a0eacaf9a01fae8a
2018-01-10 13:58:58 -08:00
TreeHugger Robot
537f0b816c Merge "Build slice from indexed data in SliceProvider" 2018-01-10 20:39:06 +00:00
Ben Lin
c28b46f2ea Introduce boolean flags to show/hide items for Language & input.
This adds seven new boolean flags:
config_show_phone_language
config_show_virtual_keyboard_pref
config_show_physical_keyboard_pref
config_show_spellcheckers_settings
config_show_tts_settings_summary
config_show_pointer_speed
config_show_vibrate_input_devices

Which when individually set to false, will hide the item from "Language
& input" in System. It will also hide them from surfacing in search
results.

Bug: 62379555
Test: Individual controller tests are all updated.

Change-Id: I9ef1c3037b0bec6ffa5a627006507f4f16e534c4
2018-01-10 11:27:58 -08:00
Matthew Fritze
8c96843fe3 Build slice from indexed data in SliceProvider
Connect the SliceIndexing data to the SliceProvider,
such that a query to SliceProvider can build a Slice
via the indexed data from SlicesIndexingManager.

We take the key from the Uri supplied to the SettingSliceProvider
and find a potential matching row in the indexed data. The
matched data is then used to Build a slice for the caller.

Bug: 67996923
Test: robotests
Change-Id: If51bfd1a05c3f3817ae720554f95a98fc7b002e1
2018-01-10 10:58:33 -08:00
yuemingw
533dfdfbfd Block Settings APP UI when disallow_airplane_mode is set.
Test: runtest -x packages/apps/Settings/tests/unit/src/com/android/settings/core/UserRestrictionTest.java
Fix: 67675441

Change-Id: Ice234cecf4de191b797ad4219852cf821720ab78
2018-01-10 16:37:54 +00:00
TreeHugger Robot
de63357366 Merge "Settings: Enable laser sensor toggle for user builds" 2018-01-10 10:26:42 +00:00
TreeHugger Robot
92aa8583c6 Merge changes Ie4c98617,I6a7248d9
* changes:
  Add BatteryTipDialogFragment.
  Add high usage battery tip
2018-01-10 03:15:27 +00:00
TreeHugger Robot
9c76ab230f Merge "Hook up smart battery to Settings value." 2018-01-10 02:47:17 +00:00
jackqdyulei
fde637ff60 Add BatteryTipDialogFragment.
This DialogFragment handles all the tip related dialogs. This cl makes:
1. All the tips parcelable.
2. Add dialog for HighUsageTip. It also need adapter to populate app
list in dialog.
3. Add and update tests

Bug: 70570352
Test: RunSettingsRoboTests
Change-Id: Ie4c986172cfc73d8746abc7457d966c8600c6145
2018-01-09 17:33:19 -08:00
TreeHugger Robot
11c697fb2c Merge "Remove redundant assertion from test" 2018-01-10 00:57:49 +00:00
Fan Zhang
256ebf4245 Remove redundant assertion from test
It's already asserted in other tests, and is causing flakes.

Change-Id: I02ea5cf200e535410e7897a51caf1c98d1682068
Fixes: 70530199
Test: robotest
2018-01-09 15:22:19 -08:00
jackqdyulei
ca102facf0 Add high usage battery tip
1. Add both model and detector
2. Move the screen usage method to BatteryUtils
so we could reuse it.
3. Add and update the tests

Bug: 70570352
Test: RunSettingsRoboTests

Change-Id: I6a7248d9d48ee8cb6fc2c18c8c225210d49b6bc9
2018-01-09 15:00:41 -08:00
Beverly
02b81c137e DND string fixes
Bug: 63077372
Test: make ROBOTEST_FILTER=ZenModeRepeatCallersPreferenceControllerTest RunSettingsRoboTests -j40
Change-Id: Ib2002c75fe86e829bfbbca947affc28dc801cedd
2018-01-09 17:49:04 -05:00
TreeHugger Robot
5ff1df89fa Merge "Add wifi metered controls in wifi settings." 2018-01-09 22:16:10 +00:00
jackqdyulei
713fa6bee0 Hook up smart battery to Settings value.
Bug: 71502850
Test: RunSettingsRoboTests
Change-Id: Icbc99af8f681e67af54e3509b3eec40ac9d9668e
2018-01-09 13:15:03 -08:00
jackqdyulei
261c29c485 Add wifi metered controls in wifi settings.
1. Add it in wifi detail page
2. Add it in wifi dialog
2. Remove it in "Mobile network" page

Bug: 68030417
Test: RunSettingsRoboTests
Change-Id: I2e001c55f3c6c75a660e429732dfbece97b0ca9e
2018-01-09 12:44:51 -08:00
jackqdyulei
131d3b3c2f Add smart battery page for battery settings
This page contains prefs for smart battery and app restriction.

Bug: 71502850
Test: RunSettingsRoboTests

Change-Id: I194af30cbc7b2496b10098fcb67f1116e0722310
2018-01-09 12:05:36 -08:00
Emilian Peev
33b956d574 Settings: Enable laser sensor toggle for user builds
User builds should also have the camera lensor enable/disable
developer option.

Bug: 71702869
Test: Manual,
make ROBOTEST_FILTER=CameraLaserSensorPreferenceControllerTest
RunSettingsRoboTests -j40
Change-Id: Iaa1aadfee0351b9e5fcaa8282e4dcd7b16e9ebf4
2018-01-09 18:39:45 +00:00