Settings: Set key order during rebind
When the activity is resumed, injected preferences were losing their order. This could potentially lead to two bottom preferences in a given category. Ensure the order is retained during key rebind to prevent such issues. Follow up to change I666ebd7f90c11f1836bac10f7fca38baa5aedf93 Change-Id: I1dc0148c5595f20daf026970d6514e63776b0499 Signed-off-by: AnierinB <anierin@evolution-x.org>
This commit is contained in:
parent
d117f53b77
commit
ed77d8bd20
1 changed files with 4 additions and 0 deletions
|
|
@ -638,6 +638,10 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
|||
observers = mDashboardFeatureProvider.bindPreferenceToTileAndGetObservers(
|
||||
getActivity(), this, forceRoundedIcons, preference, tile, key,
|
||||
mPlaceholderPreferenceController.getOrder());
|
||||
// Order the prefs within their respective category
|
||||
if (KEY_ORDER.containsKey(key)) {
|
||||
preference.setOrder(KEY_ORDER.get(key));
|
||||
}
|
||||
} else {
|
||||
// Don't have this key, add it.
|
||||
final Preference pref = createPreference(tile);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue