Commit Graph

42276 Commits

Author SHA1 Message Date
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
Salvador Martinez
eb66aac00f Re-add support string that was being used by wifi
A wifi button was piggybacking on a support string. This CL adds a
new string for the button to use instead.

Test: robotests pass
Bug: 71858657
Change-Id: Ic0da845fb70f33fc4365a4ee4586de685e3ef338
2018-01-11 10:55:55 -08:00
Salvador Martinez
86a9be347c Add support for early warning query
This CL adds the necessary code to enable the early warning query
from the provider.

Test: robotests in topic
Bug: 71593245
Bug: 71812931
Change-Id: I32e10d1b9f752af672b5d1c6ccb8ba9f2f9cc387
2018-01-11 10:16:49 -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
jackqdyulei
b7a35b5c06 Add metric id for anomaly fragments. am: 2fd1c9839c
am: 9bf0e057c8

Change-Id: I4d5941fb40ed03c6b4ed8563cb58bfc2a888f6be
2018-01-11 01:56:23 +00:00
jackqdyulei
9bf0e057c8 Add metric id for anomaly fragments.
am: 2fd1c9839c

Change-Id: Iff6c41c8549cdc102e954d6a429a9ab56d4e10c6
2018-01-11 01:53:47 +00:00
TreeHugger Robot
415e875324 Merge "Fix alignment in location requests screen" 2018-01-11 01:35:42 +00:00
TreeHugger Robot
9b89a98d56 Merge "Add 50% and 100% to auto battery saver settings" 2018-01-11 01:10:30 +00:00
TreeHugger Robot
343d5edfc0 Merge "Propagate extras when switching between choose lock activities" 2018-01-11 00:17:27 +00:00
TreeHugger Robot
db35899fd4 Merge "Fix NPE in SetupChooseLockpattern screen" 2018-01-11 00:15:01 +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
Hansong Zhang
4b367aba78 DO NOT MERGE Add developer menu to select max number of connected audio devices
The new developer option modifies the system property
"persist.bluetooth.maxconnectedaudiodevices"; it allows testing
multiple connected devices for A2DP, AVRCP, HFP.

Bug: 71603731
Test: Robolectric test
Change-Id: If8c2c26ad4c9a2b7458a2d16a0c29d5f9b4df5c7
2018-01-10 15:42:56 -08:00
Ben Lin
b1f6f24dcc Merge "Introduce boolean flags to show/hide items for Language & input." 2018-01-10 22:29:28 +00:00
Makoto Onuki
1e08dd8e18 Add 50% and 100% to auto battery saver settings
The settings UI will be updated for P eventually, but let's add more
options to the settings for dogfooders until the UI update happens.

Also add the current value to the choices, so that if we push a number
that's not in the choices, the settings app will work properly.

Bug: 68769804
Bug: 71762373
Test: Manual test
Change-Id: I22fd14d43f4575885b4b8e068d3df1e65f60c9e1
2018-01-10 14:22:57 -08: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
43e2e87889 Add string variants for "device" products.
Bug: 62379606
Test: Strings are showing for device products.
Change-Id: I2ecde371f0a7eaaaca118c3e03b194a6ecc7a5fd
2018-01-10 14:06:28 -08:00
Ajay Nadathur
6f6a7c6412 Fix NPE in SetupChooseLockpattern screen
bug: 71807569
Test: Manually tested and verified no longer crash
Change-Id: I9b6a20377f2cf7ffb9be12de7bfa59f8b1063625
2018-01-10 14:01:21 -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
jackqdyulei
2fd1c9839c Add metric id for anomaly fragments.
1. PowerUsageAnomalyDetails
2. AnomalyDialogFragment

Bug: 37681923
Test: Build

Change-Id: Ia82fde0fa3e61b6284dc18db3018dd223a0e435b
(cherry picked from commit 725562c748)
2018-01-10 03:10:28 +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
TreeHugger Robot
2d1bdd8de4 Merge "DND string fixes" 2018-01-10 00:45:24 +00:00
Malcolm Chen
c8a34adc18 Merge "Rename setDataEnabled to setUserDataEnabled." am: 43b1b97e3e am: 5e90d8ea7a
am: e99f20cd95  -s ours

Change-Id: I941272824a99adbbc86653c02551e2a93440f887
2018-01-10 00:19:49 +00:00
Malcolm Chen
e99f20cd95 Merge "Rename setDataEnabled to setUserDataEnabled." am: 43b1b97e3e
am: 5e90d8ea7a

Change-Id: I62b5c85e1737ef5ca23b2037b221a70e58121fe3
2018-01-10 00:07:09 +00:00
Malcolm Chen
5e90d8ea7a Merge "Rename setDataEnabled to setUserDataEnabled."
am: 43b1b97e3e

Change-Id: Ib11eca12b1331494972c86a18670c348abae3d2c
2018-01-09 23:56:14 +00:00
Treehugger Robot
43b1b97e3e Merge "Rename setDataEnabled to setUserDataEnabled." 2018-01-09 23:46:55 +00:00
TreeHugger Robot
463d33edf6 Merge "Tweak layouts for action button to match spec" 2018-01-09 23:32:43 +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
Antony Sargent
e2399b4ad1 Fix alignment in location requests screen
In Settings->Security & location->Location, the list of apps that have
recently requested location was moved up on the screen, and this made it
clear that the indentation of the app name was misaligned with the title
of Preference items that came after this. It turns out our custom layout
for AppPreference reserved a bit more space for icons than regular
Preference items.

While examining the layout file for location settings I also fixed a
small nit in a comment.

Fixes: 71056360

Test: Visual (go to Settings->Security & location->Location, and the app
names in the list should be indented at the same level as the Preference
items below)

Change-Id: I87e144c83cc2d13e322f65291415af037c405257
2018-01-09 15:20:28 -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