* AbstractPreferenceController now can implement OnActivityResultListener to receive callback from DashboardFragment#onActivityResult()
Bug: 270096758
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.dashboard.DashboardFragmentTest
Change-Id: Ib734287c6fe06fcdde3b2fe6ae9f4b778020b60b
Resubmiting reverted CL Ia1f84669090e04b3a2aaac82bb5971032d74a125.
Reson: Bug was found in another CL (in this topic)
Test: Treehugger
Bug: 268682423
Change-Id: I0fead8915b2bb6281e29b32f7426c35b0138b10e
For the title/summary uri, do not set the placeholder when it already
has content. This can avoid clearing the text before re-rendering.
Test: robotest, visual
Fix: 256657256
Change-Id: I0518f5247fd2acf6a5eaa63f0f363275103a79af
Test: adjust injection target of live translate in local device https://hsv.googleplex.com/6649669464621056
Bug: 242280896
Change-Id: I5c7eccceafeb159aac55e98dc7eb1daa17844de5
This change adds a new top-level setting, of which the availability is
controlled by a build time config value. It also registers the new
communal category so that prebuilt packages can inject preferences into
it.
Bug: 261641080
Test: verified on device that communal settings show up on top level
Test: atest ScreenSaverPreferenceControllerTest
Change-Id: Idf79ae5b89ecc3498373de56a677b4876fb121c3
If the injection icon is to be retrieved from a provider, the preset
transparent drawable is a 1x1 icon, which may cause the preference
padding change before and after the injection icon reloading.
Bug: 253471066
Test: robotest, visual
Change-Id: Ie88f69bb047a64a6a0ee30c060d8cbb8fe27b3d7
Attrs could not have same name, so create a common parent for the
messageText. And BiometricEnrollCheckbox is not in use.
Replace some com.android.settingslib.R with com.android.settings.R,
because these are files in settings instead of settingslib.
Bug: 253772249
Test: TAP
Change-Id: Ifa796e923bf26facf4935be4968637affdb4b48b
1. Separate "Keyboard" from "Language & input".
2. Use FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_UI to control the
different UI until Settings launches the new UI design.
Bug: 242680328
Test: local test
Change-Id: Id1ea6d3e3c2e6b83bc4b4d835c6b27e31311c530
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
Should set highlight Preference key after
isDuplicateClick to ensure clicked Preference
key & highlight Preference are different and
then isDuplicateClick returns a correct value.
Bug: 233553587
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.dashboard
manual
1. Click all left pane items and see if there is any launch problem.
2. Check if duplicate click check works.
Change-Id: Ic6394b96896fd3a0fb926707565f63beff74a27b
Whenever the highlighted item is clicked, Settings shouldn't start the
second-layer page again even if the user goes to its child page.
Ex. When the user goes to the Tethering page, clicking on the menu
entry "Network & Internet" should not switch to the page.
Exception: in the deep link case, allow the first click event on the
highlighted item to launch the second-layer page when the page is not
the same as the one on the right pane.
Fix: 215267159
Test: manual, robotest
Change-Id: I2315e0069facc4867cb157752b1a3144716b7d17
Viewpager2 created view based on the first tab height, when tab is
selected, viewpager2 should recalculate height.
But this solution may not suitable for App list, so we only enable
for Location Settings which have different items in personal & work
profile.
Bug: 224521665
Test: manual
Change-Id: Ib19b30cb82b8b4f13f651795906289da53ded4ed
Before this change, USB flash drive is removed from storage spinner
when it's unmounted (by option menu 'Eject'), however, USB flash
drive will show in storage spinner when Storage Settings page is
resumed again.
After this change, USB flash drive will show in storage spinner
even if it's unmounted. It will be removed until it's unplugged
from device.
Bug: 225095144
Test: manual visual
Insert / Eject / Mount / unplug an USB flash drive and
observe UI behavior.
Change-Id: I6b81766216c7850b018997f2de12a19d9d8675be
The injection dynamic data was loaded in the background and then post to
main thread to update UI. However, it usually updates after
Fragement.onResume(), which causes the flicker.
To make it more smooth, DashboardFragment to wait for the dynamic data
observers to update UI for a short period, which eliminates the flicker
in most cases.
Also skip the repeated tiles refresh called by onCategoriesChanged in
onResume after all preferences refreshed.
Test: robotest, visual
Bug: 229177114
Change-Id: I04650af9692703f1fc1e6e5ad2090f051b1eeb81
Before this fix,
Both the list item and button are focusable by Talkback, and the list
item one is ok ("Personal, one of two."), the button one is read as
"Unlabeled".
After this fix,
Only the button is focusable by Talkback, read as "Personal, in list, 2
items."
Also test to make sure Switch Access not break.
Bug: 174626616
Test: manual test when Talkback / Switch Access enabled
Change-Id: I72765c1bcbb75e544d5829b21c3e2baf4355be1f
Implement the new-look by using AlertDialog's
custom title and custom view.
Using the RecyclerView so we can display profile
horizontally.
Bug: 174626616
Test: manual & robolectric
Change-Id: I9f5a7685d9217fc62e01799ad73f9b9a3ddbf19a
We determine if the visibility should be updated by mIsFirstLaunch, and
mIsFirstLaunch is set to false in onStop(). This breaks the updatability
if there's a change before onStop() gets called.
So we move the value assignment to the end of checkUiBlocker() because
at that time, all blocker work should be either finished or timeout.
Also remove mIsFirstLaunch since mUiBlockerFinished can cover the
determination with the new design.
Fixes: 229565193
Test: Toggle Use Location in the location page and see the Recent used
section react accordingly.
Change-Id: Id6005e5b8b29cb8a6309068d0a2177489a3fb2f4
Controller can implements LifecycleObserver to observe the lifecycle.
Before this fix, preference controller which defined in the XML file
must implement com.android.settingslib.core.lifecycle.LifecycleObserver
(which is deprecated, and is a subclass of
androidx.lifecycle.LifecycleObserver).
After this fix, preference controller which defined in the XML file
and implemented androidx.lifecycle.LifecycleObserver will successful
observe the lifecycle.
Fix: 149338098
Test: robotest & manual
Change-Id: If9e48e44267de8e89a5e8f45d256719130936320
The existing UiBlocker mechanism doesn't support additional visibility
control. With that, controllers that want to control their own
visibility won't be able to use UiBlocker.
Fixes: 223340393
Test: robotest
Change-Id: I2df2eb1ce77e2c94bb271a8b68cc8c6004df5c70
Apply a cache mechanism to prevent the flicker problem from entering
Storage page.
Bug: 191117970
Test: manual test
1) Create a work profile with TestDPC
2) The loading spinner will be shown when entering Storage page after
the first boot.
3) Back to Settings homepage and switch back to Storage page, the
loading spinner shouldn't be shown.
4) The preference order shouldn't be updated after changing the storage
size.
Change-Id: I518679f90c63e12f61f08d08d5ed3f3900825be2
Merged-In: I518679f90c63e12f61f08d08d5ed3f3900825be2
(cherry picked from commit cda892df85)