- Here these pages include AppInfoDashboardFragment, ConnectedDeviceDashboardFragment,
DevelopmentSettingsDashboardFragment, NetworkDashboardFragment, ConfigureNotificationSettings.
- The TimeSpentInAppPreferenceController use the LiveDataController.
Fixes: 135299529
Bug: 137558156
Test: compilation
Change-Id: I455a16536c9966184f1b2bd81d1f1217f3e09f9d
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId
Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function
Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
We don't rely on FooterPreferenceMixinCompat
to create footer preference in dashboard fragment.
Instead, declare a FooterPreference explicitly in
xml of screen.
Test: visual, robotest
Bug: 124129485
Change-Id: I4c5b60c3926583eb0d9f0d4cd6996bf169d6408c
- Condition is already supported in PersonalSettingsFragment
- Suggestion is already supported in PersonalSettingsFragment
- Static/dynamic tiles are supported in TopLevelSettings
Change-Id: I51882e3bd0919ad95109baefac683d98667c11e3
Fixes: 110405144
Test: robotests
When possible, remove or simplify getNonIndexable() logic in fragments,
and use searchable="false" in xml to suppress index.
Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69
Fixes: 112608186
Test: robotest and manual search
This patch focused on fixing compile errors and some runtime errors.
Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
* For fix the TreeHugger error in pi-dev, cherry pick the ag/4042235 in
master and fix TreeHugger error. Change android.support.v7.* to androidx.*
* 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
* For fix the TreeHugger error in pi-dev, cherry pick the ag/4042014 in
master and fix TreeHugger error. Change android.support.v7.* to androidx.*
* Dynamicly add preference in controller
* Add test cases for DiscoverableFooterPreferenceController
Bug: 79294219
Test: make -j50 RunSettingsRoboTests
Change-Id: Id4c1e86c9a0a0cd69d8106a18f2cf4a0fa31782b
* Using getConnectedDevicesSummaryResourceId() to get the resource id to shown the summary.
Bug: 79299421
Test: make -j50 RunSettingsRoboTests
Change-Id: I268de4d989fe01eff463a5ec1c0a174e094e56c0
* Add PreviouslyConnectedDevicePreferenceController to handle the preference should be
enable or disable.
Example: If there are no previously connected devices disable the preference otherwise
enable it.
* Add PreviouslyConnectedDevicePreferenceControllerTest
1. Verify the callback can be registered and unregistered
2. Verify the preference is enable when there
have more than 1 previously connected device
3. Verify the preference is disable when there
have no previously connected device
Bug: 78250052
Test: make -j50 RunSettingsRoboTests
Change-Id: I31b5d416aaf907c3bbf1cb61de6e7401463e3df7
Merged-In: I31b5d416aaf907c3bbf1cb61de6e7401463e3df7
* For fix the TreeHugger error in pi-dev, cherry pick the ag/3935357 in
master and fix TreeHugger error.
* Add PreviouslyConnectedDevicePreferenceController to handle the preference should be
enable or disable.
Example: If there are no previously connected devices disable the preference otherwise
enable it.
* Add PreviouslyConnectedDevicePreferenceControllerTest
1. Verify the callback can be registered and unregistered
2. Verify the preference is enable when there
have more than 1 previously connected device
3. Verify the preference is disable when there
have no previously connected device
Bug: 78250052
Test: make -j50 RunSettingsRoboTests
Change-Id: I31b5d416aaf907c3bbf1cb61de6e7401463e3df7
* Bluetooth and NFC added back to "Connection preferences"
Bug: 79299421
Test: make -j50 RunSettingsRoboTests
Change-Id: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90
Merged-In: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90
* For fix the TreeHugger error in pi-dev, cherry pick the ag/4023339 in
master and fix TreeHugger "Automatic merge failed" error.
* Bluetooth and NFC added back to "Connection preferences"
Bug: 79299421
Test: make -j50 RunSettingsRoboTests
Change-Id: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90
* Implement available media devices group
* Add AvailableMediaDeviceGroupController to realize UI, the user can see the all device that can be activated in this group.
* ConnectedDeviceGroupController change to show the device that cannot be activated but is connected.
* Refactoring the below class, implement the controller in connected_devices.xml.
ConnectedDeviceGroupController.java
SavedDeviceGroupController.java
ConnectedDeviceDashboardFragment.java
connected_devices.xml
* Add AvailableMediaBluetoothDeviceUpdaterTest to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged
* Add test that used to verify device is connected or not in BluetoothDeviceUpdaterTest.
* Add test that used to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged in ConnectedBluetoothDeviceUpdaterTest.
* Add AvailableMediaDeviceGroupControllerTest to verify bluetooth feature is supported or not and test register callback.
* Add test that used to verify bluetooth feature is supported or not and test register callback in ConnectedDeviceGroupControllerTest.
* Add test that used to verify bluetooth feature is supported or not and test register callback in SavedDeviceGroupControllerTest
Bug: 74134939
Test: make -j40 RunSettingsRoboTests
Change-Id: I54d03c2ddadc6a4be7519dd74cdbcb5055d44083
This CL removes the toggle from the bluetooth preference and instead
takes users to a new dedicated screen for toggling bluetooth status.
On this screen we show a different summary text depending on whether
bluetooth and bluetooth scanning are on/off. Also, we were able to
delegate most of the UI/bluetooth handling to already existing
classes.
Test: robotests
Bug: 77543471
Merged-In: I036a3992bbd78896da8364b55ecc51afc4464b6e
Change-Id: I036a3992bbd78896da8364b55ecc51afc4464b6e
This CL removes the toggle from the bluetooth preference and instead
takes users to a new dedicated screen for toggling bluetooth status.
On this screen we show a different summary text depending on whether
bluetooth and bluetooth scanning are on/off. Also, we were able to
delegate most of the UI/bluetooth handling to already existing
classes.
Test: robotests
Bug: 77543471
Change-Id: I036a3992bbd78896da8364b55ecc51afc4464b6e
* Move save device group to "Previously connected devices"
Bug: 74134939
Test: make -j60 RunSettingsRoboTests
Change-Id: Iff7894033df402d42dcc0ccaea6db3106edb7013
Merged-In: Iff7894033df402d42dcc0ccaea6db3106edb7013
* For fix the conflicts in pi-dev, cherry pick the commit 86d3e58c8d in
master and merge the conflict.
* Add @SearchIndexable in
PreviouslyConnectedDeviceDashboardFragment.java
* Move save device group to "Previously connected devices" preference
Bug: 74134939
Test: make -j60 RunSettingsRoboTests
Change-Id: Iff7894033df402d42dcc0ccaea6db3106edb7013
Merged-In: Iff7894033df402d42dcc0ccaea6db3106edb7013
Also update the shortcut:
1. Change the name to "Devices"
2. Change it point to "Connected device" page
Bug: 74806595
Fixes: 69926683
Test: robo test still pass
Change-Id: Ic57756fc955dc622cc22d0be64f02b5ae07a2915
Move BT, NFC preference out of Connection Preference,
To Connected devices page.
Because NFC and Android Beam are controlled by the same controller,
Create each controller for those preference and leave the sharing part.
Change-Id: I8bc303a5f487de9c667487119b49e1e4130aa80c
Fixes: 72458929
Test: manually test, make RunSettingsRoboTests
1. Implement the search index provider for
ConnectedDeviceDashboardFragment.
2. Since in SEARCH_INDEX_DATA_PROVIDER fragment is null,
so we need to pass in context to all components
instead of getting it from fragment.
3. Update test for it as well as creating new shadow.
Change-Id: If0aa67d5b6ca207c6b728c8355581bf414577091
Fixes: 69333961
Test: RunSettingsRoboTests
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
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
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
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
- Use prefContext to create preference.
- rename "Gestures" to "Gesture shortcuts"
- Add search keyword to individual gesture settings so when search
"gesture" they also show up.
- call super() for all getNonIndexableKeys() in search provider
Fix: 38327387
Fix: 36621897
Fix: 36685646
Test: make RunSettingsRoboTests
Change-Id: Ia5ddfeae08cb27c278dfb8d2376594e21d8f283c
Create the obsolete version of the belowing fragments, so we could
flip between old page and new page.
BluetoothSettingsObsolete and DeviceListPreferenceObsoleteFragment
contains all the old logic but:
1. Logic about BluetoothPairingPreferenceController(ag/2239482),
since this preference shouldn't be checked in without the flag :(
This cl also adds logic in MasterSwitchPreferenceController to flip
these two pages.
Following cl will refactor these fragment to make it compatible
to new framework.
Bug: 35877041
Test: RunSettingsRoboTests
Change-Id: I1cc1bc2d49d8a3e11c3127e56f6409fbc84028d8
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.
Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
&& make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
Remove the master switch duplicates between the switch
and their targets. Only show the actual Wifi and Bluetooth
settings as search results.
Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: I226cc8db40a308bd9bcfacdd4fc6ae709fb809c5
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.
Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4