Skip to content

Commit 819934d

Browse files
Daneshtemasek
authored andcommitted
Settings : Don't disable persisting for MultiSelectListPreference
There is an aosp bug where MultiSelectListPreference stores a custom state type, but doesn't override onRestoreState and causes an exception to be thrown when inside activities that don't override orientation change. This patch resolves this issue by persisting the preference change, which bypasses that route. No functional impact since we override the values from the settings provider onresume anyway. Repro : - Launch dialer - Launch Settings - Launch blacklist - Launch settings - Rotate phone - Realize you need this patch :) Change-Id: Ie51119190fa6c43db612223bdb60c00fe607b9bf
1 parent 485377c commit 819934d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

res/xml/blacklist_prefs.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@
2727
android:title="@string/blacklist_private_numbers_title"
2828
android:dialogTitle="@string/blacklist_private_numbers_title"
2929
android:entries="@array/blacklist_policy_private_entries"
30-
android:entryValues="@array/blacklist_policy_private_values"
31-
android:persistent="false" />
30+
android:entryValues="@array/blacklist_policy_private_values" />
3231

3332
<MultiSelectListPreference
3433
android:key="button_blacklist_unknown_numbers"
3534
android:title="@string/blacklist_unknown_numbers_title"
3635
android:dialogTitle="@string/blacklist_unknown_numbers_title"
3736
android:entries="@array/blacklist_policy_unknown_entries"
38-
android:entryValues="@array/blacklist_policy_unknown_values"
39-
android:persistent="false" />
37+
android:entryValues="@array/blacklist_policy_unknown_values" />
4038

4139
<com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference
4240
android:key="phone_blacklist_regex_enabled"

0 commit comments

Comments
 (0)