Commit Graph

3945 Commits

Author SHA1 Message Date
jeffreyhuang
ba76fbeb3b Phone number in about phone v2
- Introduce preference controller to manage phone number
 - Add new strings for multi sim devices

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: Ibf5dc65ba67969b6eeb095b8d202ef8a5faf16ca
2017-11-10 15:40:22 -08:00
jeffreyhuang
34c2387faa Dynamic preferences for sim status
- Support N-sim devices for sim status preference

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I0cea3f765f89c30a6595631ed501ab1c0010b736
2017-11-10 15:40:22 -08:00
jeffreyhuang
3adafdcc83 Dynamic preferences for IMEI
- Support N-sim devices for imei preference

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I0dda78b44e0c64ddd69c9a30e90c49f03b2260f3
2017-11-10 15:40:22 -08:00
tiansiming
3b8c4cd52e Modify Comparator in ZonePicker
The previous method "compareTo" isn't locale-sensitive, it cannot
sort the String in some other languages. So Collator is recommended
to be applyed here.

Bug: Sort doesn't work in some languages.
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=ZonePickerComparatorTest

Change-Id: Id107ab938cceefc77f9fb6918a0445fc92a0fcb7
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
2017-11-10 23:12:38 +00:00
Fan Zhang
ba0077977f Get rid of SearchIndexableResources entirely.
Bug: 37741509
Test: robotests
Change-Id: I7e6dba5e13378beae632c838b7dd13acfdc50b10
2017-11-10 15:10:55 -08:00
Chien-Yu Chen
5d242df477 Settings: Remove HAL HDR+ option
Test: RunSettingsRoboTests
Bug: 68223991
Change-Id: I9eb27c7e205ac005c6a71726e125ed1e512da33b
2017-11-10 14:32:25 -08:00
jeffreyhuang
0cdd620e62 Use uname instead of proc/version
- Update the displayed kernel version to use uname instead

Change-Id: Iced2540f775c03c273521c8965c2f331267982b2
Fixes: 67006899
Test: Manual with settings app
2017-11-10 14:24:02 -08:00
Fan Zhang
b21112bd3d Add instrumentation test for SearchResultTrampoline intent.
Forgot to add this when creating intent-filter

Bug: 64938328
Test: atest
Change-Id: I8cfc26c2c589b2ae1942d365ed7dbca0da90d580
2017-11-10 12:25:47 -08:00
Jeffrey Huang
49dac3d4ac Merge changes Ie283981d,Ie3f735e4,I6818966f,I4ca93d9b,Iabd46505
* changes:
  Introduce BuildNumberDialogController
  Introduce KernelVersionDialogController
  Introduce BasebandVersionDialogController
  Introduce SecurityPatchLevelDialogController
  Introduce FirmwareVersionDialogController
2017-11-10 18:47:25 +00:00
TreeHugger Robot
29b14a70d5 Merge changes I3ac6506a,I3fc80505
* changes:
  Add intent-filter to SearchResultTrampoline
  Create a feature flag for Search v2.
2017-11-10 02:31:35 +00:00
Christine Franks
e8338dc33d Merge "Support DISALLOW_CONFIG_LOCALE user restriction" 2017-11-10 01:36:05 +00:00
TreeHugger Robot
7d9637440a Merge "Expand all preferences when launch from search." 2017-11-10 01:17:28 +00:00
Fan Zhang
8068fda059 Add intent-filter to SearchResultTrampoline
Bug: 64938328
Test: atest
Change-Id: I3ac6506a6af3af9ff2bd60354ba23617b700ace8
2017-11-09 16:37:01 -08:00
TreeHugger Robot
bb09fd8425 Merge "Use setVisible instead of removePreference everywhere." 2017-11-10 00:02:58 +00:00
Christine Franks
91dad044cb Support DISALLOW_CONFIG_LOCALE user restriction
Bug: 67586452
Test: make ROBOTEST_FILTER="(LocaleListEditorTest)" RunSettingsRoboTests\
&& make cts && cts-tradefed run cts-dev -m DevicePolicyManager \
-t com.android.cts.devicepolicy.UserRestrictionsTest

Change-Id: I2260b106a111078a62ae7628d6f60e976b70069c
2017-11-09 23:57:03 +00:00
Doris Ling
6589a07d59 Expand all preferences when launch from search.
- when the fragment is created, checks the argument to see if the extra
fragment arg key is set. If so, do not hide the preferences in the
advanced button.

Change-Id: Id662ae1cec77edad7fcd5d6daa71929a8cb1402c
Fixes: 68988454
Test: make RunSettingsRoboTests
2017-11-09 15:18:09 -08:00
Fan Zhang
ff4da23a65 Create a feature flag for Search v2.
Also moved all other flags in a common file so we can track them more
easily.

Bug: 68825426
Bug: 64938328
Test: rerun robotests
Change-Id: I3fc805054cb960bedd965b1b907be759df50b95d
2017-11-09 14:57:08 -08:00
Fan Zhang
a72620b67b Use setVisible instead of removePreference everywhere.
Change-Id: I2e8084b23d3cb2c0a31a38c01716fc76236734ea
Fixes: 68956750
Test: robotests
2017-11-09 13:22:36 -08:00
Fan Zhang
5c1e686d3f Merge "Update app icon for ManageDomainUrls setting" 2017-11-09 20:52:57 +00:00
TreeHugger Robot
b84c1c5afa Merge "Prevent crash in Search from Stack overflow" 2017-11-09 20:18:58 +00:00
Fan Zhang
4e540db06d Update app icon for ManageDomainUrls setting
Change-Id: I6c26a055983ea72049d1633336d6da8736a78fa0
Fixes: 69057114
Test: robotests
2017-11-09 11:02:23 -08:00
jeffreyhuang
4cbeaf6729 Introduce BuildNumberDialogController
- Create a controller to display data and for the
  build number field in FirmwareVersionDialogFragment

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: Ie283981d6e7ed519df1a77fd21158feb37f0efd8
2017-11-09 11:02:04 -08:00
jeffreyhuang
890d3c766c Introduce KernelVersionDialogController
- Create a controller to display data and for the
  kernel version field in FirmwareVersionDialogFragment

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: Ie3f735e4559d8b01f67c65a1a46f1f1ad2dcdcd5
2017-11-09 11:02:04 -08:00
jeffreyhuang
633a67c821 Introduce BasebandVersionDialogController
- Create a controller to display data and for the
  baseband version field in FirmwareVersionDialogFragment

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I6818966f43549f41f20a488190e3116322858089
2017-11-09 11:02:04 -08:00
jeffreyhuang
bebb100e0a Introduce SecurityPatchLevelDialogController
- Create a controller to display data and handle user input for the
  security patch level field in FirmwareVersionDialogFragment

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I4ca93d9b0e74a5eaf5746704d46de42f5ae27224
2017-11-09 11:02:04 -08:00
jeffreyhuang
799c777f67 Introduce FirmwareVersionDialogController
- Create a controller to display data and handle user input for the
 Android Version field in FirmwareVersionDialogFragment

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: Iabd46505103711451001a9374906188c707be548
2017-11-09 11:02:04 -08:00
Matthew Fritze
f6cf598d03 Prevent crash in Search from Stack overflow
NotificationSettingBase's getPreferenceController call
is recursive with no base case which crashes search.

Root cause here is that NotificationSettingsBase should
not be indexed for seacrh but was probably failing the
code inspection test. Added NotificationSettingsBase
child classes to grandfather list of classes that
should be ignored for search.

Change-Id: I04ed242db3a394b88e0d0ac420aaaff6f9301cb5
Fixes: 69096424
Test: robotests
2017-11-09 10:40:14 -08:00
Christine Franks
a760cc12ff Merge "NightDisplayController -> ColorDisplayController" 2017-11-09 17:50:06 +00:00
TreeHugger Robot
f558d4663b Merge "Forward wallpaper activity results to the caller." 2017-11-08 21:18:57 +00:00
Ajay Nadathur
d473e38c74 Forward wallpaper activity results to the caller.
- Added Activity.FLAG_ACTIVITY_FORWARD_RESULT to the intent that
launches the wallpaper activities.
- WallpaperSuggestionActivity also finishes itself after launching
intent.

Bug: 65691577
Test: Added robolectric test. Also verified manually that result code is
being forwarded
Change-Id: I2f8b0fac7a35c38e14c4a733b7552fd2e58dd0db
2017-11-08 11:03:04 -08:00
Julia Reynolds
d0965a21e4 Merge "PreferenceControllers are the way of the future." 2017-11-08 13:33:40 +00:00
TreeHugger Robot
d85cd117c8 Merge "Remove DynamicAvailabilityPreferenceController." 2017-11-08 02:26:16 +00:00
TreeHugger Robot
07e63ea23d Merge "Add ConnectedAccessPointPreference" 2017-11-07 22:48:52 +00:00
Fan Zhang
b5f5ffbece Remove DynamicAvailabilityPreferenceController.
- This class is over complex to use, and get in the way of show/hide
  pref when availability change.
- The function from DynamicAvailabilityPreferenceController can be done
  with PreferenceCategoryController.

Bug: 68956750
Bug: 32953042
Test: robotests
Change-Id: Ia7b7e214c072b8c77f5de3d959fdb1dc79217f76
2017-11-07 12:58:48 -08:00
TreeHugger Robot
2260321fd8 Merge "Move Index provider conversion into Settings provider" 2017-11-07 20:52:51 +00:00
TreeHugger Robot
7036377d72 Merge "Prevent monkey from changing usb settings" 2017-11-07 19:37:03 +00:00
Matthew Fritze
55ce64dcd9 Move Index provider conversion into Settings provider
Pre-patch, settings search provider would push all of its
fragments into to search via SearchIndexableResources with
an implicit contract of if the resource's xml == 0, then
it was a settings fragment with an Index provider.

One, implicit contract is bad. Two, it was messy at indexing time.

So this patch moves htat conversion into the search index provider.
Such that all of the indexables are either real Resources or Raw.

Change-Id: I39f4351c03d123bb9b45edb4df7f924cfaff2b38
Fixes: 65376542
Fixes: 37741509
Test: robotests
2017-11-07 11:18:26 -08:00
jeffreyhuang
7b17780134 Prevent monkey from changing usb settings
- Prevent monkey from revoking usb debugging authorizations
 - Prevent monkey from changing usb configurations

Bug: 68707778
Test: make RunSettingsRoboTests -j40
Change-Id: Idce99d60f0fbce5a9d93aceb0c2a07d27482de10
2017-11-07 09:58:42 -08:00
Jeffrey Huang
a414573d62 Merge "Move iccid number to sim status dialog" 2017-11-07 17:58:01 +00:00
TreeHugger Robot
c41646606d Merge "Fix robolectric test failure" 2017-11-07 02:40:18 +00:00
Fan Zhang
d9f5d1ca06 Merge "Convert SecuritySubSetting into DashboardFragment" 2017-11-07 01:58:42 +00:00
Fan Zhang
a681094e8a Convert SecuritySubSetting into DashboardFragment
Bug: 32953042
Test: robotests
Change-Id: Iecdb0a42695644ff8aa095bcd49b5ccb16aa46d4
2017-11-06 17:26:25 -08:00
Fan Zhang
491e475dfb Fix robolectric test failure
Bug: 36971201
Test: robotests
Change-Id: I5adc98b8bc42b98b39d38bf08e2ac1bfa5139819
2017-11-06 15:12:14 -08:00
Lei Yu
d854eec1a8 Merge "Fix crash in settings robo test." 2017-11-06 21:16:37 +00:00
jeffreyhuang
5b8202a296 Move iccid number to sim status dialog
- Remove iccid number logic from imei dialog
 - Add iccid number log to sim status dialog

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I087688645169b387b9d65264e2c8b70ca565a44e
2017-11-06 12:38:45 -08:00
TreeHugger Robot
5f6c80a288 Merge "Guard against a NPE when disconnecting suggestion service." 2017-11-06 20:29:56 +00:00
jackqdyulei
fbede9c080 Add ConnectedAccessPointPreference
This preference contains:
1. All the logic from AccessPointPreference
2. Gear icon on the right

Bug: 68807544
Test: RunSettingsRoboTests & Screenshot
Change-Id: I128401d81b075c4e9c5ca711562de26e73147745
2017-11-06 12:27:26 -08:00
jackqdyulei
65370d21fd Fix crash in settings robo test.
This is a regression from ag/3120176. In AnomalyDialogFragment when
creating the real dialog, it creates the RuntimePermissionPresenter
which causes the stub error.

In this cl we shadow the RuntimePermissionPresenter since in this
test we only focus on that created dialog has the correct message
(dialog title, dialog message)

Bug: 68941201
Test: RunSettingsRoboTests
Change-Id: I9c09922453f7797f375d0f61b9d8eba660bfbfef
2017-11-06 11:16:36 -08:00
Julia Reynolds
ac3f7e80dc PreferenceControllers are the way of the future.
Migrates Notification settings (app level, group level, and channel
level) into PreferenceControllers (and most importantly:
PreferenceControllerTest)

Note: this removes the 'Advanced' preference group, but does
not yet use the standard system 'Advanced' grouping as it does
not currently support our use case (where we don't know how many
fields to show outside of 'Advanced' until onResume() and also
where we need fields to show below the 'Advanced' group).

Test: make RunSettingsRoboTests
Change-Id: Iddd1b4771922db322e5f73562e9d63ed077c5396
2017-11-06 13:50:26 -05:00
Fan Zhang
f6073fb978 Guard against a NPE when disconnecting suggestion service.
Change-Id: Ib10502b9467365f6e348737655806ef2369a747b
Fixes: 68885411
Test: robotests
2017-11-06 10:30:05 -08:00