Return CharSequence instead of String.
All user visible string should be modeled as CharSequence.
Bug: 73950519
Test: robotest
Change-Id: I30befef0c33f94351d4a2774e283bd1ed804aa8b
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936
Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
- If a <preference> tag also defines a controller, we will try to
instantiate it before displaying the UI. The same logic is shared by
BaseSearchIndexProvider so it also drives search suppression.
- If user also defines a list of controllers programatically, the
programatically created ones takes precedence.
Bug: 73668763
Test: WIP
Change-Id: I7aecec270bcd3af261e012ef1f6995d2a523cfa1
The Bluetooth Active Device state should be updated for all
CachedBluetoothDevice entries.
This should be done inside CachedBluetoothDeviceManager in SettingsLib
instead of BluetoothDeviceUpdater in the Settings app.
Bug: 72316092
Test: Manual - two headsets and switching the active device
Change-Id: If379bb0853dcd78385430cf14192e9adfae4ecd0
The device name is reflected in three places: A Settings.Global flag
which can be read by third party apps, the Bluetooth device name, and
the Wi-Fi tethering hotspot name.
The Bluetooth and Wi-Fi names can be changed independently of the device
name, but if the user sets the device name, they are all changed in
parallel.
Due to the naming restrictions of Bluetooth devices and SSIDs, the SSID
naming restrictions apply to the device name.
Bug: 63819909
Test: Robotest
Change-Id: I3a81535fc07d183557a6fa5d54baef3c7868499c
When there are multiple connected A2DP/HFP devices, if a connected
device's name is clicked on, that device will be chosen as
Active - i.e., it will be the device chosen for audio out / phone call.
Test: Manual: multiple connected A2DP devices, and selecting each as
the Active Device.
Bug: 64767509
Change-Id: Iee76286110ed87703d6a968f50273c22cd7c7086
1. Remove the placeholder summary so it won't show blank summary
2. Update settings_entity_header to make text center_vertical,
so it could align with the icon.
Bug: 71742145
Test: Screenshot
Change-Id: I185114a4e0c8d996f218075a8633e802fabf3c66
And create PreferenceControllers for each setting
The page is still pretty janky and controllers are invoked manually.
Next CL will clean these up.
Bug: 32953042
Test: TODO
Change-Id: I1d7478324f5de4fdb464d79f89086f7e79c0ee67
Adds dynamic summary getter in relevant BasePreferenceControllers.
Preferece controllers that don't have dynamic summaries or which
are not yet BasePreferenceControllers are not changed right now.
Change-Id: I435ccab7758d90515583fd8ca10a9b1ef0c858b9
Fixes: 71514936
Test: robotests
Then UI won't be janky(as everything slide down a little bit)
Bug: 63910184
Test: RunSettingsRoboTests
Change-Id: Ie4074694f54af92da52f09d2caaab5490fa73647
Also refactor the preference controller
1. Extend from BasePreferenceController.
2. pass in the preference key. Then it could be reused in different
places with different key.
Bug: 69333961
Test: Screenshot | RunSettingsRoboTests
Change-Id: I773ca022baa326481045c1659565c9a21111200a
In the new design, bluetooth preference is not MasterSwitchPreference
any more. This cl creates BluetoothSwitchPreference while reuse the
BluetoothEnabler.
Future cl will remove the BluetoothMasterSwitchPreference when P
feature is finalized.
Bug: 69333961
Test: RunSettingsRoboTests
Change-Id: Ie1f934b4e93a6758a1b0cf83bb5098585a635c2a
Usecase:
1) Connect with carkit that supports PBAP/MAP
2) Try to uncheck the checkbox for contact sharing from device sub
settings menu
Expected Result:
1) DUT should display "Connected (No Media or Phone)"
1) Should be able to disconnect when checkbox moves from selected->unselected,
and carkit should be able to connect when checkbox is selected again
Observation:
1) No UI updates when PBAP/MAP are connected.
2) On unchecking Contact sharing checkbox nothing happens. PBAP connection
remains active and user is not asked to disconnect profile level connection.
Fix:
Add support for PBAP UI preference in SettingsLib. Also Fix issues related to MAP
profile addition/removal.
Test: Connect from carkit, try disconnecting from sub settings menu by unchecking
Contact Sharing checkbox and check if PBAP is successfully disconnected.
Bug: 35014213
Change-Id: I4981aa063b2541b58ce1d36e3576578cbeb02acc
IMHO we don't need to expose switch in SwitchWidgetController.
This controller already has enough API to control the switch.
Also rename mSwitchWidget to mSwitchController because it is not a
widget.
Bug: 69973752
Test: test still pass
Change-Id: I0ac247e34468a44109ab26019f1303c814e381f2
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.
Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
Step by step:
1. Pair and connect with BTHS (e.g. SBH50).
2. Click the settings icon of paired device, and check "Use for" items.
-----------------------------------------------------------------
Expected Result:
After step 2, "Contact sharing" should not be checked.
Actual Result:
After step 2, "Contact sharing" is checked.
Fix:
Set phone book permission as REJECTED if class of Device is
not AUDIO_VIDEO_HANDSFREE
Test: Checked above usecase and issue is not observed
Bug: 64372703
Change-Id: I178a09dd9e76d67c461c4b04d9b2ee0078ed24c9
Get the PreferenceGroup there and add/remove preference
through the callback
Also add ConnectedBluetoothDeviceUpdater which only filter
the connected device.
Bug: 69333961
Test: RunSettingsRoboTests
Change-Id: Ia2ab6b6708329227929d6fe442df3a8d45bf86f5
The core thing is to find out a way to update group when devices
(bt device and usb device)are updated.
The infrastructure contains three parts:
1. ConnectedDeviceController
Normal PreferenceController. Get info from sub controller and update
the preferenceGroup.
2. BluetoothDeviceUpdater
Listen to bluetooth callback, decide whether to add/remove devices
3. DevicePreferenceCallback
Interface to add/remove preference. This interface will be used in
ConntectedDeviceController and future SavedDeviceController
Bug: 69333961
Test: RunsettingsRoboTests
Change-Id: I85a9ef216a801d5f0dd1cf0130d53850a68be4bd
Add feature flag to toggle connected device between new and old
feature.
ConnectedDeviceDashboardFragment will contain new feature will
ConnectedDeviceDashboardFragment2 will hold old feature.
Bug: 69333961
Test: Build
Change-Id: I0ea932c69dea5242129aab994d5142b1f87fbea0
The BluetoothDevicePreference need to know whether to display with an
invalid name. However pass in the whole fragment is over-killing.
This cl decouple it for several reasons:
1. In P, BluetoothDevicePreference will be used in other fragment.
2. In preference lifecycle from end user side, this flag is constant.
Bug: 69333961
Test: RunSettingsRoboTests
Change-Id: I3dbcd2a4aafa3ead74371534250e5e7c3ee221f7
- Remove the old DevelopmentSettings
- Remove references to the feature flag
Fixes: 65522949
Test: make RunSettingsRoboTests -j40
Change-Id: Ie2eb3465127d79a027de6bb58a47bb15e3094f89
This cl contains the moving about:
1. Several methods in Bluetooth/Utils.java
2. Bluetooth icon drawables
3. Bluetooth strings
4. Tests
Bug: 65488978
Test: RunSettingslibRoboTests
Change-Id: I682daa3eeb5022beb90a95763c70d19d32d54915