Fix crash issue when user uses multi-window mode on VoicemailSettings
IllegalStateException happens because entries and entryValues are not
set in ListPreference at the timing of onRestoreInstanceState.
Activity recreation occurs due to multi-window mode and
VoicemailSettingsActivity#onRestoreInstanceState is called and then,
ListPreference#onPrepareDialogBuilder is called. ListPreference
requires entries and entryValues but they are still not set. They are
set in VoicemailSettingsActivity.#onResume. But it is called after
VoicemailSettingsActivity#onRestoreInstanceState.
To avoid this crash, add "screenLayout" property in configChanges
attributes of VoicemailSettingsActivity to avoid recreating activity.
Test: manual - Checked Multi-window mode on VoicemailSettings
Bug: 63694457
Change-Id: I2f0d68de25615121a7bd032431f4b153bcb6e8b4
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e2001fd..a76b372 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -564,7 +564,7 @@
<activity android:name="com.android.phone.settings.VoicemailSettingsActivity"
android:label="@string/voicemail"
- android:configChanges="orientation|screenSize|keyboardHidden"
+ android:configChanges="orientation|screenSize|keyboardHidden|screenLayout"
android:theme="@style/DialerSettingsLight">
<intent-filter >
<!-- DO NOT RENAME. There are existing apps which use this string. -->