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
Add new method to get rainbow bt icon and also refactor
AdaptiveHomepageIcon:
1. Rename
2. Add ConstantState
Bug: 126425211
Test: RunSettingsRoboTests
Change-Id: Idb8aaf253d0d9e2ab33d8852f093e6689ebadde4
- Add AdaptiveIconShapeDrawable for the homepage icon backgrounds
- Rename RoundedHomepageIcon -> AdaptiveHomepageIcon to reflect that the
adaptive icon shape is used
Bug: 123829919
Test: mp settings; manually viewing homepage icons
Change-Id: I9fddfbf57461b300200f30f716d861878bbbcc38
- the account detail settings page is launched with the correct user
handle when there is work profile to indicate which profile the account
belongs to. When we process the dynamic tile, for the page, we should
add this info to the tile intent, so that it can be launched with the
correct profile.
- when we launch the tile intent, check whether there's user handle
specified. If so, launch the intent directly without prompting for
profile selection.
Change-Id: I91f8c666a826909006b1f53907b3441825322c10
Fixes: 119657694
Test: make RunSettingsRoboTests
And switch to getId() instead of title when comparing 2 tiles. This is
more accurate and more efficient.
Bug: 77600770
Test: robotests
Change-Id: I587d90702d98956bf7b420529ac3280351ca4a10
And each page has ability to turn on/off rounded icons. This CL only
adds the flag, it doesn't actually change icon shape yet.
- Boolean config in xml
- New protected method for each DashboardFragment to load config
- Plumb the boolean into DashboardFeatureProvider for future use.
- Remove some unused APIs from DashboardFeatureProvider
Bug: 110405144
Fixes: 79748104
Test: robotests
Change-Id: Id34782e75aa7289967e4dd1f4fe2978688092702
the personal profile when in a managed profile.
This change introduces the com.android.settings.profile metadata with possible values "primary_profile_only" and "all_profiles" (the default
value when not specified). If an application declares this metadata with a value of "primary_profile_only", in a work profile the ProfileSelectDialog is never shown and the application is opened straight in the personal profile. If an application specifies a value of "all_profiles" or does not specify anything, the ProfileSelectDialog is shown to the user.
Bug: 79868199
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java#openTileIntent_profileSelectionDialog_shouldShow
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java#openTileIntent_profileSelectionDialog_explicitMetadataShouldShow
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java#openTileIntent_profileSelectionDialog_shouldNotShow
Change-Id: Id62ab44b58b93c479407cc1bacc7a806a09bfd1b
Developer options page crash for restricted users because the page
removes all preferences while DashboardFeatureProvider tries to
manipulate preferences on screen.
Added a null check to skip changin prefs in DashboardFeatureProvider
because the pref is going to be removed either way.
Change-Id: Ic83fd0dfb2a906605fb1d992d7b36c2163630e89
Fixes: 78655710
Test: robotests
- save the loaded icon drawable to a local var, instead of setting it to
the tile.icon and later reset it, so that we will not run into the issue
that the icon will become null when this is called multiple times.
Change-Id: I0fc73961986cddd97ad1e74b0609ac47d011cc87
Fixes: 78445923
Test: make RunSettingsRoboTests
- also fix the issue of dynamic tile icon is being cached and not
updated properly.
Change-Id: I9289260340c1cddc4123fda88c366d658a11ddfc
Fixes: 74255242
Test: visual
- Remove SettingsDrawerActivity.EXTRA_SHOW_MENU and force up nav button
to always show. The button doesn't do anything yet. It just finishes
current activity.
- Remove dead code about suggestions
Change-Id: I61fa9fefbaa9bced841a05969544b1c824c564ce
Bug: 72337421
Test: rebuild
- remove the check for feature flag for suggestion UI v2 and switch to
use the v2 codes.
- remove all code related to v1 of suggestion UI
Fixes: 70573674
Test: make RunSettingsRoboTests
Change-Id: I99ab318c1c0192508a9c5e9e708e86319120d55b
This is the initial change for updating the suggestion cards:
- add a feature flag to swap between the new and current UI
- change suggestions to a standalone dashboard item. It becomes a
horizontal scroll list that won't collapse/expand.
- the expand/collapse logic now only control the conditions list
- add draft for the new suggestion UI elements, but detail to fine-tune
to match the UI spec will come in following changes.
Bug: 70573674
Test: make RunSettingsRoboTests
Change-Id: I00c901e2598b26a34288fc73fd6031cc26a29ac6
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
- if tile order is set in the metadata, it will be used as preference
order instead of the intent priority specified.
Change-Id: If1a09219ece7bb71fc476aad60dc66d7653dfd28
Fixes: 65172575
Test: make RunSettingsRoboTests
Change to always use the new UI that combines the suggestion and conditions,
and remove all codes relating to the old UI.
Bug: 37645754
Bug: 62621808
Test: make RunSettingsRoboTests
Change-Id: I3421a9e5182f6606843392d6fae8b9f07c5f2e46