When an account is added or removed, the account preference controller
just updates the account list, whereas there's no trigger point for the
account data sync preferences to refresh.
Add an API to update all preferences in DashboardFragment, so we can
refresh the account sync preferences whenever the account list is
updated.
Bug: 185479221
Test: robotest, manual
Change-Id: Ide3d972abae09ce0175e3bafbb1f4a5e307d20c8
- Creates new preferences that are shown when device-state rotation
is supported.
- Hides standard preferences when device-state rotation is supported.
- Controllers/Preferences for individual folded/unfolded rotation
settings are created and added programatically based on the settable
device states available.
Test: Manually + Unit tests
Bug: 195757480
Change-Id: I16f50fd3664756b363c7eb79e5c35eb0d3b6df17
Revert submission 16745827-device-state-auto-rotation-preferences-aops
Reason for revert: Checking if reason for test failures
Reverted Changes:
I77ed93f04:Add support for device state based auto-rotation p...
I5b2791f54:Add support for device state based auto-rotation p...
If254220ca:Add support for device state based auto-rotation p...
If254220ca:Add support for device state based auto-rotation p...
Fix: 219652963
Change-Id: Id95d5d7bb18a28403a6d3199945044e6617e0772
- Creates new preferences that are shown when device-state rotation
is supported.
- Hides standard preferences when device-state rotation is supported.
- Controllers/Preferences for individual folded/unfolded rotation
settings are created and added programatically based on the settable
device states available.
Test: Manually + Unit tests
Bug: 195757480
Change-Id: If254220ca3018bc6ec1c4e3947375733f6816f92
To make InputMethodPreference support 2 target
reference, CL[1] move the PrimarySwitchPreference
into SettingsLib.
Change all PrimarySwitchPreference reference to
Settingslib one and remove the original one.
[1]: Idea3935d95b8d22b00ca89313e9eb3e979e4aa74
Bug: 197705032
Test: Presubmit
Change-Id: I95d111522344bb7cbdd380382e48fe60a5ebc9a2
- Root cause: the side effect of the parallel controller loading.
- Solution: disable the parallel approach and remove the entry point
of parallel approach in DashboardFragment.
Fixes: 187838753
Test: Robo test for AppInfoDashboardFragment, ConfigureNotificationSettings,
ConnectedDeviceDashboardFragment, DevelopmentSettingsDashboardFragment,
NetworkDashboardFragment, DashboardFragment
Change-Id: If3b09c4fd6f33042e0ed38704f08e855ab8f5377
- remove the outer circle of the icons
- tint the icons including injected ones
Test: robotest, visual
Bug: 182870640
Change-Id: If72c37152f4f0d68e25149b11d497eef1c7ece91
We use homepage preference when it's a injected IAs on homepage
Test: See the screenshot for Google icons
Fix: 177213699
Change-Id: Ibd08ff305cdd6b556b5ceee486df01678c9212a6
This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.
Bug: 168765701
Test: m checkbuild
Change-Id: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
Replace WiFi related terms which contain Master wording.
Goal: Create a fixit for Android Platform to reduce the use of non-inclusive language for all code.
Bug: 161425297
Test: make RunSettingsRoboTests -j or
make RunSettingsRoboTests ROBOTEST_FILTER=DashboardFragmentTest
make RunSettingsRoboTests ROBOTEST_FILTER=WirelessDebuggingPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=AutomaticStorageManagementSwitchPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=AllInOneTetherPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=TopLevelNetworkEntryPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=PrimarySwitchPreferenceTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiPrimarySwitchPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherPreferenceControllerTest
Change-Id: I9395c50e092e124016609f88f7c8151554a0d874
- Use the multiple tasks to enhance the controllers loading.
Bug: 137558156
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.dashboard
Change-Id: I629ff5dc81347cddf9762a87015b9b86b6a46e50
Allow developers to inject MasterSwitchPreference, a switch
preference with two tap targets, to Settings page.
Developers should declare keyhint and switch_uri for the activity
in AndroidManifest,and then implement a SwitchesProvider.
Bug: 132808482
Test: robotest
Change-Id: I64cdf18268be0cfcd38aab2c059144536dd79b32
This CL before, if controller have UIBlocker interface
will going to blocker condition to make whole page
invisible for a certain time until slice is fully loaded.
This CL add the check condition that if the controller
have UIBlocker inferface but didn't have slice uri will
not go to blocker condition.
Bug: 141292712
Test: make -j42 RunSettingsRoboTests ROBOTEST_FILTER=DashboardFragmentTest
Change-Id: I79daae131654f8fd823a9c8f1be46ad6c7921908
Create a config resource for OEMs to add suppressed tile's key, then
DashboardFragment will filter related tiles out from Settings.
OEMs can use this way to suppress security patch injected tile if they
don't use Google OTA.
Fixes: 130734771
Test: visual, robotests
Change-Id: I4cab79c8672048fa543d39b2a8f38ffe338189c8
1. Don't create UiBlockerController if there is no related controller
2. Don't update visibility if UiBlockerController is null
3. Use findPreference() from DashboardFragment, which already has null
check.
Change-Id: Iee24c64317fb9d5a1cf2076d25728af485d390c5
Fixes: 122807414
Fixes: 122805831
Test: RunSettingsRoboTests
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
- register the advanced button expand listener and add the metrics log
when it is clicked.
Fixes: 70930626
Test: make RunSettingsRoboTests
Change-Id: Ife4af4bd4a0a8534cf9ba63949660a810b09446a
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
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
Previously, DashboardFragment stores preference controllers in an
ArrayMap of <Class, AbstractPreferenceController>. Thus when there are
multiple controllers of same class (ie. multiple
PreferenceCategoryControllers), they cannot be stored simultaneously.
This changes the value to a List so we can store multiple controllers of
the same Class without extraneous sub-classing.
Bug: 70949662
Test: All existing tests still pass.
Added
DashboardFragmentTest#testPreferenceControllerSetter_shouldAddAndNotReplace
and DashboardFragmentTest#updateState_doesNotSkipControllersOfSameClass.
Change-Id: I397e8c91977ea1180d48a3af75dd4058bf1175c0
When the dashboard summary is being initialized, it will rebuild the UI
while the summary loader tries to to go through the tiles to update the
summary. Both is being done on a separate backgroud thread, and it will
run into concurrent modification issue if the thread is being swapped
while one is looping through the list.
Instead of letting clients access the list of tiles directly, add a
getter method in DashboardCategory to get a copy of the list of tiles
for all read-only operations.
Change-Id: I479669abd8d1d0a8ee9a4113d8ad2244da56f4d8
Fixes: 69677575
Test: make RunSettingsRoboTests
- functionality for hiding portions of the preferences in the preference
screen is added to the support lib. So, changing the settings
implementation to use the feature from the support lib instead.
- remove ProgressiveDisclosureMixin and the related code
Fixes: 63985174
Test: make RunSettingsRoboTests
Change-Id: Ib1d39b2db93d78a56c7adf90abcae5226f9564c2
When determining whether to tint the tile icon, first check whether the
tintable metadata set for the tile. If no metadata set, will then follow
the default logic that tint the tile icon if it is not coming from the
Settings package.
Change-Id: Idf0863e0c6ab063aeaa6d013fa620508ced31fdb
Fix: 62473193
Test: make RunSettingsRoboTests
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.
Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
- Migrated ArgumentMatcher subclasses to lambdas
- Replaced any() with nullable() where tests were failing
Test: cd tests/robotests && mma
Bug: 38456058
Change-Id: Ice8c39b435c45b87f82dbbd9860e68f235314cf8
- Add a method in VisibilityLoggerMixin to log visible event using
LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
to next page.
- In next page's onResume(), extract the previous page's metricsCategory
and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters
Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
Use the centralized registry to look up category key instead.
Bug: 32936784
Test: make RunSettingsRoboTests -j40
Change-Id: I0b8c72d70f93e4b5c58871ac90de41f69ad15653
- use context instead of activity to retrieve resource details.
- revert the change previously made in getActivity() calls.
- add null checking in package name and tile intent.
Fix: 34396855
Test: make RunSettingsRoboTests
Change-Id: Ic853939fee3c381b663c0320354da51d3b2a0e11
Insteads of inserting tile onto screen using absolute priority values,
now each page can have a placeholder preference, and at run time we will
add dynamic dashboard tiles to placeholder's place.
Bug: 32827787
Test: RunSettingsRoboTests
Change-Id: I1fe9e11dce4eb6fb4a9b56af05a2b8e5cdae00d2