Add description for Wi-Fi calling mode

Replace the view of dialog with custom view that adds description
as summary.

Test: manual
Bug: 34793636
Change-Id: If9792b0a35c59c1260176b4b2c62107861de73b5
Merged-In: If9792b0a35c59c1260176b4b2c62107861de73b5
This commit is contained in:
Kazuya Ohshiro
2016-08-29 18:29:35 +09:00
committed by Hall Liu
parent 70b1830e7e
commit eb57875f64
9 changed files with 445 additions and 14 deletions

View File

@@ -77,8 +77,8 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment
//UI objects
private SwitchBar mSwitchBar;
private Switch mSwitch;
private ListPreference mButtonWfcMode;
private ListPreference mButtonWfcRoamingMode;
private ListWithEntrySummaryPreference mButtonWfcMode;
private ListWithEntrySummaryPreference mButtonWfcRoamingMode;
private Preference mUpdateAddress;
private TextView mEmptyView;
@@ -237,10 +237,11 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment
mImsManager = ImsManager.getInstance(
getActivity(), SubscriptionManager.getPhoneId(mSubId));
mButtonWfcMode = (ListPreference) findPreference(BUTTON_WFC_MODE);
mButtonWfcMode = (ListWithEntrySummaryPreference) findPreference(BUTTON_WFC_MODE);
mButtonWfcMode.setOnPreferenceChangeListener(this);
mButtonWfcRoamingMode = (ListPreference) findPreference(BUTTON_WFC_ROAMING_MODE);
mButtonWfcRoamingMode = (ListWithEntrySummaryPreference) findPreference(
BUTTON_WFC_ROAMING_MODE);
mButtonWfcRoamingMode.setOnPreferenceChangeListener(this);
mUpdateAddress = (Preference) findPreference(PREFERENCE_EMERGENCY_ADDRESS);
@@ -291,10 +292,14 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment
if (!isWifiOnlySupported) {
mButtonWfcMode.setEntries(R.array.wifi_calling_mode_choices_without_wifi_only);
mButtonWfcMode.setEntryValues(R.array.wifi_calling_mode_values_without_wifi_only);
mButtonWfcMode.setEntrySummaries(R.array.wifi_calling_mode_summaries_without_wifi_only);
mButtonWfcRoamingMode.setEntries(
R.array.wifi_calling_mode_choices_v2_without_wifi_only);
mButtonWfcRoamingMode.setEntryValues(
R.array.wifi_calling_mode_values_without_wifi_only);
mButtonWfcRoamingMode.setEntrySummaries(
R.array.wifi_calling_mode_summaries_without_wifi_only);
}