Commit Graph

6381 Commits

Author SHA1 Message Date
TreeHugger Robot
87dfe60ad0 Merge "Convert BatterySaverButton controller to Slice compatible." into pi-dev 2018-05-23 17:16:48 +00:00
Fan Zhang
6162b04751 Merge "Convert BatterySaverButton controller to Slice compatible." 2018-05-23 17:14:35 +00:00
TreeHugger Robot
c7b90ee998 Merge "Return null when setting can't be changed." into pi-dev 2018-05-23 17:08:29 +00:00
Jayachandran C
f0cc6b754e Remove connectivity monitor switch from developer options
Test: Verify connectivity monitor switch is no more shown
      under developer options

Bug: 79255514
Change-Id: I755885398b92a726b0b979815c33793abe01ea66
Merged-In: I755885398b92a726b0b979815c33793abe01ea66
2018-05-23 16:59:01 +00:00
Jayachandran Chinnakkannu
b7647b9340 Merge "Remove connectivity monitor switch from developer options" 2018-05-23 16:57:56 +00:00
TreeHugger Robot
53f6b7cb06 Merge "Add Location Slice" into pi-dev 2018-05-23 16:23:09 +00:00
Daichi Ueura
9555afb64e Hide entire hidden field for non-hidden networks
This CL hides not just hidden network spinner but entire
hidden field when a user is adding a network from scanned
network list.

Test: robotests
Bug: 80114851
Change-Id: I8b29fd764d62af1e46beaa7d26fae97848f4efe6
2018-05-23 09:18:07 -07:00
TreeHugger Robot
2626288bfa Merge "Return null when setting can't be changed." 2018-05-23 16:01:22 +00:00
Matthew Fritze
e31e60ce94 Add Location Slice
Location is an intent-only Slice.

Test: Robotests
Change-Id: Ie9ed05be2224f2c4b393ed201d5f313f80183edc
Merged-In: I07e27683b46fe4ded8215009a983bb909555fb59
Fixes: 67997314
2018-05-23 08:09:07 -07:00
Fan Zhang
db03de4e80 Convert BatterySaverButton controller to Slice compatible.
- Update preference key to match the key defined in SettingsSlicesContract
- Model TwoStateButtonPreference similar to TwoStatePreference (add
  setChecked, isChecked method)
- Remove TwoStateButtonPreferenceController entirely because all methods
  are moved into Preference directly for better encapsulation.
- Make BatterySaverButtonPrefController direclty implement
  TogglePreferenceController. It was not possible before because the
  interface between TwoStateButtonPreferene is too different from
  TwoStatePreference.

Bug: 80106671
Test: robotests
Change-Id: Ib72807dcf1b36e959e08df8d80538c3f9f79b76d
Merged-In: Ib72807dcf1b36e959e08df8d80538c3f9f79b76d
2018-05-23 08:00:41 -07:00
TreeHugger Robot
44a05fbb50 Merge "Add Location Slice" 2018-05-23 13:44:05 +00:00
TreeHugger Robot
842ea91baa Merge "Clear indexing before adding all Slices" into pi-dev 2018-05-23 13:26:19 +00:00
Chihhang Chuang
3b387a028a Refactor nfc preference controller
- Remove BaseNfcPreferenceController.
- NfcPreferenceController inherit from TogglePreferenceController.
- AndroidBeamPreferenceController inherit from BasePreferenceController.
- Override getIntentFilter in NfcPreferenceController to listen changes.
- Add an API (hasAsyncUpdate) into BasePreferenceController to
distinguish the setting which is updated asynchronously.

Change-Id: I7c9c48ea7f1ad01a02524beabf9d30baa3db891f
Fixes: 67997761
Fixes: 74887543
Test: RunSettingsRoboTests
2018-05-23 13:58:28 +08:00
Matthew Fritze
f1a7006d31 Add Location Slice
Location is an intent-only Slice.

Test: Robotests
Bug: 67997314
Change-Id: I07e27683b46fe4ded8215009a983bb909555fb59
2018-05-22 21:13:47 -07:00
Fan Zhang
ddc6c646c0 Convert BatterySaverButton controller to Slice compatible.
- Update preference key to match the key defined in SettingsSlicesContract
- Model TwoStateButtonPreference similar to TwoStatePreference (add
  setChecked, isChecked method)
- Remove TwoStateButtonPreferenceController entirely because all methods
  are moved into Preference directly for better encapsulation.
- Make BatterySaverButtonPrefController direclty implement
  TogglePreferenceController. It was not possible before because the
  interface between TwoStateButtonPreferene is too different from
  TwoStatePreference.

Bug: 80106671
Test: robotests
Change-Id: Ib72807dcf1b36e959e08df8d80538c3f9f79b76d
2018-05-22 20:22:26 -07:00
Matthew Fritze
d9613b2742 Return null when setting can't be changed.
If a Slice cannot be changed, return null instead of
an error slice.

Bug: 80155832
Test: robotests
Change-Id: I843fee76cf19d49cc994062059cb231f222120b2
Merged-In: Ib94136c449c6d9c1911f89833bba62fd2263daa4
2018-05-22 20:18:09 -07:00
Matthew Fritze
417693021e Return null when setting can't be changed.
If a Slice cannot be changed, return null instead of
an error slice.

Bug: 80155832
Test: robotestst
Change-Id: Ib94136c449c6d9c1911f89833bba62fd2263daa4
2018-05-22 20:17:10 -07:00
Matthew Fritze
4b26969839 Clear indexing before adding all Slices
Before we index, add a call to clear indexed data before
indexing again. It's an optional call.

Fixes: 80065409
Test: robotests

Change-Id: Iddb0ce02c50d84b51fbf6fc2be0bdc9aa1f5987a
2018-05-22 20:02:20 -07:00
TreeHugger Robot
6be5e331cf Merge "Update airplane mode key to match framework constant" into pi-dev 2018-05-23 03:00:47 +00:00
Matthew Fritze
8f36eb8cfb Update airplane mode key to match framework constant
Change pref key for airplane mode to "airplane_mode" to match the
constant declared in SettingsSlicesContract.

Bug: 80106671
Test: robotests
Change-Id: I898befffbdafc3004fc127414edd04f60ff2554e
2018-05-22 18:51:11 -07:00
TreeHugger Robot
5a0a7ef4bb Merge "Factor in PRIVATE_DNS_MODE_DEFAULTSETTING value" into pi-dev 2018-05-23 01:02:39 +00:00
Matthew Fritze
8ad8516f48 Update airplane mode key to match framework constant
Change pref key for airplane mode to "airplane_mode" to match the
constant declared in SettingsSlicesContract.

Bug: 80106671
Test: robotests
Change-Id: I625bed440dd7f1f8509cd00ced5ba67f08a0e737
Merged-In: I898befffbdafc3004fc127414edd04f60ff2554e
2018-05-22 17:34:19 -07:00
Matthew Fritze
1dd25fd87c Add isSliceable API to BasePrefController
Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.

Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.

Test: robotests
Change-Id: I85848c2cdf3e151fa94b33dd1dc5c0374ef94b5b
Merged-In: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
Fixes: 79779103
2018-05-22 22:43:24 +00:00
TreeHugger Robot
f81fe9c354 Merge "Add isSliceable API to BasePrefController" 2018-05-22 21:02:45 +00:00
Jayachandran C
127bfcfe2d Remove connectivity monitor switch from developer options
Test: Verify connectivity monitor switch is no more shown
      under developer options

Bug: 79255514
Change-Id: I755885398b92a726b0b979815c33793abe01ea66
2018-05-22 13:24:33 -07:00
hughchen
d9f1e1c049 Merge "When BT is off hide rename preference" into pi-dev am: a419c4717d
am: a29fe74817

Change-Id: I9e2068de44126344af52532fbe076acd9121883d
2018-05-22 11:18:15 -07:00
Matthew Fritze
bf1f5b5813 Add isSliceable API to BasePrefController
Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.

Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.

Test: robotests
Bug: 79779103
Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
2018-05-22 11:06:42 -07:00
TreeHugger Robot
a419c4717d Merge "When BT is off hide rename preference" into pi-dev 2018-05-22 17:48:31 +00:00
TreeHugger Robot
39f98e9018 Merge "Fix availability status for AOD gestures" into pi-dev 2018-05-22 16:50:12 +00:00
hughchen
4e2160904d When BT is off hide rename preference
* Hide the preference when BT is off, shown preference when BT is on.

Bug: 78247352
Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDeviceNamePreferenceControllerTest
Change-Id: Id1e11c7b546d7ac5bc8606e8645d07d77f2b522f
2018-05-22 09:35:34 -07:00
Julia Reynolds
49d8b0a3e4 Merge "Don't reset channel field when loading the app" into pi-dev am: 7ae4b0bbdc
am: a7aee6eea5

Change-Id: Ib6804e0fa325d04360b620aa36f043c6c707db1b
2018-05-22 08:51:52 -07:00
TreeHugger Robot
1a825ca803 Merge "Fix availability status for AOD gestures" 2018-05-22 15:48:21 +00:00
TreeHugger Robot
7ae4b0bbdc Merge "Don't reset channel field when loading the app" into pi-dev 2018-05-22 15:36:22 +00:00
Matthew Fritze
25fc14c607 Add Bluetooth Slice
Bluetooth slice is added a special case, due to the migration of
bluetooth to a Switch Bar instead of a preference with a controller.

Change-Id: I8b70bb66c862255a4e8d2426ac09939ba6197624
Merged-In: Icfdcd77601ad1e64e0f6c352a8d691f0181515c8
Fixes: 67997327
Test: robotests
2018-05-22 06:59:49 -07:00
Julia Reynolds
306e2d9f84 Don't reset channel field when loading the app
Only save data that's changed.

Change-Id: Iaa8265f543a7c1ec418d9d016986e0a253f28df6
Fixes: 79216856
Test: robo tests
2018-05-22 13:43:24 +00:00
Chia-I Wu
72a9730426 Merge "Show color modes from config_availableColorModes" into pi-dev am: 5c99a41a9c
am: 2dc9650a76

Change-Id: Ib248095ea777d13b4449369096953de574c98bb5
2018-05-22 00:31:52 -07:00
Chia-I Wu
5c99a41a9c Merge "Show color modes from config_availableColorModes" into pi-dev 2018-05-22 07:09:53 +00:00
Lei Yu
563727631c Merge "When restrict, use uid inside AppInfo" into pi-dev am: 4376993a87
am: 0a084dadc2

Change-Id: I649e128ef5070562349de6951c9b3c2f1fbc1a76
2018-05-21 22:30:58 -07:00
TreeHugger Robot
4376993a87 Merge "When restrict, use uid inside AppInfo" into pi-dev 2018-05-22 05:22:24 +00:00
tim peng
e3a87548e5 Merge changes I6d4f8ec3,Id4c1e86c into pi-dev
* changes:
  Make device discoverable in Connected Devices settings page
  Add bluetooth discoverable footer preference in connected devices page
2018-05-22 04:44:15 +00:00
TreeHugger Robot
c9d258a11e Merge "Misc GAR fixes" into pi-dev 2018-05-22 03:08:15 +00:00
Matthew Fritze
d2bb2ab259 Add Bluetooth Slice
Bluetooth slice is added a special case, due to the migration of
bluetooth to a Switch Bar instead of a preference with a controller.

Bug: 67997327
Test: robotests
Change-Id: Icfdcd77601ad1e64e0f6c352a8d691f0181515c8
2018-05-21 20:03:24 -07:00
Chia-I Wu
d4cfb414c3 Show color modes from config_availableColorModes
Check config_availableColorModes to decide which color mode options
to show.

Bug: 73824924
Bug: 73825738
Test: 2016, 2017, and 2018 devices
Change-Id: I42915595348061ff4b3f2fdf14753e96dfcb2052
2018-05-21 19:58:08 -07:00
TreeHugger Robot
346063dd5c Merge "Dynamically showing "driving mode"" into pi-dev 2018-05-22 02:48:34 +00:00
timhypeng
78eb5a81ba Make device discoverable in Connected Devices settings page
* Set preference title by bluetooth state
* Enable bluetooth discoverable mode in Connected device page
* Add more test cases for DiscoverableFooterPreferenceController

Bug: 79294219
Test: make -j50 RunSettingsRoboTests
Change-Id: I6d4f8ec3870c43bf48e9666eabd60068aa8950bb
Merged-In: I6d4f8ec3870c43bf48e9666eabd60068aa8950bb
2018-05-22 02:15:12 +00:00
timhypeng
4f636b90b8 Add bluetooth discoverable footer preference in connected devices page
* Dynamicly add preference in controller
* Add test cases for DiscoverableFooterPreferenceController

Bug: 79294219
Test: make -j50 RunSettingsRoboTests
Change-Id: Id4c1e86c9a0a0cd69d8106a18f2cf4a0fa31782b
Merged-In: Id4c1e86c9a0a0cd69d8106a18f2cf4a0fa31782b
2018-05-22 02:14:38 +00:00
Lei Yu
d06d1165eb When restrict, use uid inside AppInfo
Before this CL, we use packageManager to get uid for battery
restriction. However it may not be correct all the time.

For example, RestrictedAppDetails will be opened as main user
however inside we also show work profile apps, in this case
we can't get correct uid by only using normal API in PackageManager.

This CL change it to use uid from AppInfo, which is correct all
the time.

Bug: 79992590
Test: RunSettingsRoboTests
Change-Id: Id33a5f6409d6bace0d756e5ac06432acb8b2cf65
2018-05-22 02:02:06 +00:00
Erik Kline
aee4396874 Factor in PRIVATE_DNS_MODE_DEFAULTSETTING value
This setting can be used to change the in-code default.

Test: as follows
    - built, flashed, booted
    - make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest passes
    - make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest passes
Bug: 79719289
Change-Id: I27e5fb9cc66dde1df72395c22179bca3f62ef782
2018-05-22 10:52:55 +09:00
hughchen
a47e64829d Dynamically showing "driving mode"
Dynamically showing "driving mode" in "Connection preferences" summary.
In cl/196700988, when driving mode is available/not available will using
Settings.System to set flag.
Example :
driving mode is available : Settings.System.putInt(mContentResolver,
DRIVING_MODE_SETTINGS_ENABLED, 1)
driving mode is not available : Settings.System.putInt(mContentResolver,
DRIVING_MODE_SETTINGS_ENABLED, 0);

This CL using Settings.System to get driving mode state that used to dynamically
showing "driving mode"

Bug: 79299421
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedConnectedDeviceControllerTest
Change-Id: I702fa4fbc752c7b470184cf58f2e604f9f28c057
Merged-In: I702fa4fbc752c7b470184cf58f2e604f9f28c057
2018-05-22 01:48:19 +00:00
TreeHugger Robot
8075586a2e Merge "Add action log in "Restrict app page"." into pi-dev 2018-05-22 01:32:14 +00:00