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
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
Only the injected items on the top level pages should always be opened
on the right pane, so we should only register the split rule for that
part. This will leave flexibilities for those injected items in the
subpages.
Fixes: 216026158
Test: Go to Passwords & accounts > {account} > Google Account and see
the page opened in a full screen/new task.
Change-Id: I9f311547854ace410e93fdb4ca394df1079f723c
- Create TopLevelHighlightMixin to handle highlight actions and simplify
TopLevelSettings
- Fix the error highlight and the flicker after screen rotation
- Postpone creating the fragment until it's needed to accelerate the
initialization and to fix the search highlight function breakage after
toggling light/dark mode
- Register activity embedding rules only once for injection and
wallpaper
- Do not highlight Tips & support since it's full screen
- Refactor ActivityEmbeddingRulesController
Bug: 207316936
Test: manual, robotest build pass
Change-Id: If322ec180b03ee123987c70779a25c6a570d9faf
We should keep consistent split rule for wallpaper and other home menu
item. So, we create this cl to register the split rule for wallpaper.
Also, I do some minor refactoring in this cl for reusing existing
method and better code quality.
Test: Go to wallpaper, and click back key. App can close.
Fix: 204406425
Fix: 204364572
Change-Id: Ia7de9483b351d1121cc26c4af1cb8a89ad0a16bc
Settings app registers SubSettings SplitPairRule with clearTop
true, it will finish Settings app if users click back button on
a SubSettings page.
This change registers SubSettings SplitPairRule with clearTop
true when users click a SubSettings item in Settings home menu.
And this change registers SubSettings SplitPairRule with clearTop
false when users click a SubSettings item in search result.
Bug: 204501750
Test: manual
1. Settings -> Search settings -> search a SubSettings item
(e.g., Battery)
2. Click the searched item.
3. Click back button.
Change-Id: I6e1862de528e971137ae7087de608bbdd79096b2
We should align behavior between injected apps and in-app entries.
Test: Open the Google/DW page and click back key. Then, app is closed
directly.
Fix: 204406425
Change-Id: I57831c4df78b502b3998b3f7384df2900dbfe56f
This reverts commit 096c090b80.
Reason for revert: crash is fixed in this change
Bug: 202510128
Test: manual, build
Change-Id: Ifff8d58cfdcf43e123b11dee308665b2617cb4b3
1. Add a preference group adapter to perform highlighting
2. Add a class for mapping highlighable menu keys and preference keys
3. Add an API to determine if the screen is in split mode
Bug: 199017944
Test: manual, build
Change-Id: I8e3fe5fb96480a31ee0f3b3afb6ad78999d3d2bc
Add FLAG_ACTIVITY_NEW_TASK to the intent if META_DATA_LAUNCH_NEW_TASK is
set to true to make it launch a separate task.
Bug: 197702494
Bug: 197700978
Bug: 197702789
Test: Set this metadata to true and make sure this page is launched in another task.
Change-Id: I3b4e5745e940a3db5db6be51e17a9c505915e3c0
Settings Injection used to start activities with
startActivityForResult() and its extension, where there was not result
really being handled. Hence, this CL corrects the way it starts
activities by removing the "ForResult" part.
Fixes: 197704126
Test: robotest and launch Android Auto to see it being launched in
another task.
Change-Id: I259b2555cf62f8966afdf664b337af5f216b3843
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
The flicker preferences are injected from external apps and the text
shifting is due to it needing time to load the icon from the content
uri. To avoid flicker, put a transparent icon as default to wait for
icon update.
Fixes: 189165518
Test: robotests & visual
Change-Id: I727eeefd5455711a53d3fd9ccd5356a15b9daae4
Remove the silky condition and clean up redundant files.
Bug: 183670633
Test: robotests & visual with turning on/off silky home
Change-Id: I9259108534935ed8551748b922098dd52043afc1
- remove the outer circle of the icons
- tint the icons including injected ones
Test: robotest, visual
Bug: 182870640
Change-Id: If72c37152f4f0d68e25149b11d497eef1c7ece91
Remove the summary space holder for the injected items that are not
assigned a summary or a summary uri.
Test: visual, robotest
Fixes: 187006845
Bug: 182357397
Change-Id: I7b3d165f0ffd771dd0110962c9e3159c4977d6e3
Based on the Android S design, apply the new foreground image inset to
AdaptiveIcon to generate the new injected IAs icon.
Fixes: 177213699
Test: robotest & visual with turning on/off silky home
Change-Id: If1961a3a41cda92f5435beb47799e8250820d9fb
Create configs to record the packages and orders of homepage tiles and
then according to these data to override homepage tile positions.
Bug: 168166015
Test: visual with turning on/off silky home
Change-Id: I3fcb54ac531a124101084bb40064b5a7227bf311
Remove the summary of the homepage IA if silky home enabled.
Fixes: 170933968
Test: robotest & visual with turning on/off silky home
Change-Id: I502b6590cece9b80e9923109fe0582cc4d9a1c56
1. Make the icon provided by the content provider override static icon.
2. Apply the background settings "bg.hint" and "bg.argb" to icon_uri.
Bug: 167568758
Test: visual, robotest
Change-Id: I44c66d8ea2686df1dfe1f9ad28645da7e21414ed
The summary of injected items may flicker when the data is change from
URI.
Root cause:
If an external app injects an entry to Settings with a dynamic summary,
Settings will observe the summary change via the provideed URI. However,
sometimes when Settings observes the data change and then refreshes the
UI, the data doesn't really change and settings still gets the same
summary. If it happens in a short period, the summary will seem
flickering.
Solution:
Check if the data really changes before refresh UI. Guard both title and
summary.
Fixes: 168309941
Fixes: 166785977
Test: robotest
Change-Id: I137fc317dcfd8919195c10fa8cf7d2559fe1029d
Symptom:
Once the work profile component of the tile is disabled after Settings
preloaded tiles, Settings will crash when the user clicks the work
option from the profile selection dialog.
Root cause:
Settings just checks the users from the preloaded tiles to prompt
profile selection dialog. It doesn’t check the activity for the work
profile user before launching.
Solution:
Resolve the activity by intent as users before launching if the work
profile is enabled. Directly start activity if only one user is
resolvable, otherwise prompt a dialog for profile selection.
Fixes: 162227425
Test: make RunSettingsRoboTests
Change-Id: Idcc4e5a266ab2a2252db30bb97d4be002212c677
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
- update contextual card proto interface to fit the new SettingsIntelligence
- show sticky cards at the tail of the card area
Bug: 149274976
Test: robotest
Change-Id: Icca167825c1c037ec12d8836d82c5fdff4331a8e
- Move the log point of onPreferenceTreeClick from DashboardFragment to
it's super class InstrumentedPreferenceFragment for better coverage.
- Write the preference click metric log in PreferenceController handling
case in DashboardFragment which will skip super class's log point.
Bug: 137559984
Test: robotest
Change-Id: I67178f613c74f755e20fc9dc41319974cb02e83c
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
For injected tiles, allow clients to provide dynamic title from
contentproviders similar to dynamic summary.
Fixes: 131837802
Test: robotests
Change-Id: Iacc80db5d003473cf59ede67d88441947a834888
We used to tint the injected pref icon when refreshing Tile. However,
when we are going to render the icon, we used Tile.getIcon which uses
the icon resource id to get the original version of icon directly.
Do a little refactor here to move the tinting logic inside Tile.getIcon.
Test: Manual/Visual inspection
Fixes: 129010399
Change-Id: I6f187b12cb6d91b54dcfe43e0ff34add55fd7b07