Replace CheckBoxPreference with SwitchPreference
- voicemail notification vibrant settings
- accessibility settings
- calling account received incoming calls
- additional settings -> callwaiting
- cdma voice privacy
- additional setting -> gsm call waiting
- turn on video calling
- auto retry
- remove cell broadcast related settings from phone package
Bug: 37746921
Test: Manual test
Change-Id: I3ddf09bf5430f0f5304f3ce5020282120db4d75e
diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index a67e2ad..2c007f6 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -26,7 +26,7 @@
android:entries="@array/tty_mode_entries"
android:entryValues="@array/tty_mode_values"/>
- <CheckBoxPreference
+ <SwitchPreference
android:key="button_hac_key"
android:title="@string/hac_mode_title"
android:persistent="true"
diff --git a/res/xml/call_feature_setting.xml b/res/xml/call_feature_setting.xml
index 6471b16..72be17c 100644
--- a/res/xml/call_feature_setting.xml
+++ b/res/xml/call_feature_setting.xml
@@ -46,13 +46,13 @@
</PreferenceScreen>
- <CheckBoxPreference
+ <SwitchPreference
android:key="button_enable_video_calling"
android:title="@string/enable_video_calling_title"
android:persistent="true"
android:defaultValue="true" />
- <CheckBoxPreference
+ <SwitchPreference
android:key="button_auto_retry_key"
android:title="@string/auto_retry_mode_title"
android:persistent="false"
diff --git a/res/xml/cdma_call_privacy.xml b/res/xml/cdma_call_privacy.xml
index f1a4c94..ca24d20 100644
--- a/res/xml/cdma_call_privacy.xml
+++ b/res/xml/cdma_call_privacy.xml
@@ -3,7 +3,7 @@
xmlns:settings="http://schemas.android.com/apk/res/com.android.phone"
android:title="@string/additional_cdma_call_settings">
- <com.android.phone.CdmaVoicePrivacyCheckBoxPreference
+ <com.android.phone.CdmaVoicePrivacySwitchPreference
android:key="button_voice_privacy_key"
android:title="@string/voice_privacy"
android:persistent="false"
diff --git a/res/xml/cell_broadcast_sms.xml b/res/xml/cell_broadcast_sms.xml
deleted file mode 100644
index 4b36d52..0000000
--- a/res/xml/cell_broadcast_sms.xml
+++ /dev/null
@@ -1,317 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:settings="http://schemas.android.com/apk/res/com.android.phone">
-
- <PreferenceCategory
- android:title="@string/cell_broadcast_sms">
-
- <CheckBoxPreference
- android:key="button_enable_disable_cell_bc_sms"
- android:title="@string/enable_disable_cell_bc_sms"
- android:persistent="false"
- android:summaryOn="@string/cell_bc_sms_enable"
- android:summaryOff="@string/cell_bc_sms_disable"/>
-
- </PreferenceCategory>
-
- <PreferenceCategory
- android:title="@string/cb_sms_settings">
-
- <ListPreference
- android:key="list_language"
- android:title="@string/list_language_title"
- android:summary="@string/list_language_summary"
- android:entries="@array/list_language_entries"
- android:entryValues="@array/list_language_values"
- android:dialogTitle="@string/list_language_dtitle"/>
-
- <CheckBoxPreference
- android:key="button_emergency_broadcast"
- android:title="@string/enable_disable_emergency_broadcast"
- android:persistent="false"
- android:summaryOn="@string/emergency_broadcast_enable"
- android:summaryOff="@string/emergency_broadcast_disable"/>
-
- <CheckBoxPreference
- android:key="button_administrative"
- android:title="@string/enable_disable_administrative"
- android:persistent="false"
- android:summaryOn="@string/administrative_enable"
- android:summaryOff="@string/administrative_disable"/>
-
- <CheckBoxPreference
- android:key="button_maintenance"
- android:title="@string/enable_disable_maintenance"
- android:persistent="false"
- android:summaryOn="@string/maintenance_enable"
- android:summaryOff="@string/maintenance_disable"/>
-
- <CheckBoxPreference
- android:key="button_local_weather"
- android:title="@string/enable_disable_local_weather"
- android:persistent="false"
- android:summaryOn="@string/local_weather_enable"
- android:summaryOff="@string/local_weather_disable"/>
-
- <CheckBoxPreference
- android:key="button_atr"
- android:title="@string/enable_disable_atr"
- android:persistent="false"
- android:summaryOn="@string/atr_enable"
- android:summaryOff="@string/atr_disable"/>
-
- <CheckBoxPreference
- android:key="button_lafs"
- android:title="@string/enable_disable_lafs"
- android:persistent="false"
- android:summaryOn="@string/lafs_enable"
- android:summaryOff="@string/lafs_disable"/>
-
- <CheckBoxPreference
- android:key="button_restaurants"
- android:title="@string/enable_disable_restaurants"
- android:persistent="false"
- android:summaryOn="@string/restaurants_enable"
- android:summaryOff="@string/restaurants_disable"/>
-
- <CheckBoxPreference
- android:key="button_lodgings"
- android:title="@string/enable_disable_lodgings"
- android:persistent="false"
- android:summaryOn="@string/lodgings_enable"
- android:summaryOff="@string/lodgings_disable"/>
-
- <CheckBoxPreference
- android:key="button_retail_directory"
- android:title="@string/enable_disable_retail_directory"
- android:persistent="false"
- android:summaryOn="@string/retail_directory_enable"
- android:summaryOff="@string/retail_directory_disable"/>
-
- <CheckBoxPreference
- android:key="button_advertisements"
- android:title="@string/enable_disable_advertisements"
- android:persistent="false"
- android:summaryOn="@string/advertisements_enable"
- android:summaryOff="@string/advertisements_disable"/>
-
- <CheckBoxPreference
- android:key="button_stock_quotes"
- android:title="@string/enable_disable_stock_quotes"
- android:persistent="false"
- android:summaryOn="@string/stock_quotes_enable"
- android:summaryOff="@string/stock_quotes_disable"/>
-
- <CheckBoxPreference
- android:key="button_eo"
- android:title="@string/enable_disable_eo"
- android:persistent="false"
- android:summaryOn="@string/eo_enable"
- android:summaryOff="@string/eo_disable"/>
-
- <CheckBoxPreference
- android:key="button_mhh"
- android:title="@string/enable_disable_mhh"
- android:persistent="false"
- android:summaryOn="@string/mhh_enable"
- android:summaryOff="@string/mhh_disable"/>
-
- <CheckBoxPreference
- android:key="button_technology_news"
- android:title="@string/enable_disable_technology_news"
- android:persistent="false"
- android:summaryOn="@string/technology_news_enable"
- android:summaryOff="@string/technology_news_disable"/>
-
- <CheckBoxPreference
- android:key="button_multi_category"
- android:title="@string/enable_disable_multi_category"
- android:persistent="false"
- android:summaryOn="@string/multi_category_enable"
- android:summaryOff="@string/multi_category_disable"/>
-
- </PreferenceCategory>
-
- <PreferenceCategory
- android:title="@string/general_news_settings">
-
- <CheckBoxPreference
- android:key="button_local_general_news"
- android:title="@string/enable_disable_local"
- android:persistent="false"
- android:summaryOn="@string/local_enable"
- android:summaryOff="@string/local_disable"/>
-
- <CheckBoxPreference
- android:key="button_regional_general_news"
- android:title="@string/enable_disable_regional"
- android:persistent="false"
- android:summaryOn="@string/regional_enable"
- android:summaryOff="@string/regional_disable"/>
-
- <CheckBoxPreference
- android:key="button_national_general_news"
- android:title="@string/enable_disable_national"
- android:persistent="false"
- android:summaryOn="@string/national_enable"
- android:summaryOff="@string/national_disable"/>
-
- <CheckBoxPreference
- android:key="button_international_general_news"
- android:title="@string/enable_disable_international"
- android:persistent="false"
- android:summaryOn="@string/international_enable"
- android:summaryOff="@string/international_disable"/>
- <!--
- <ListPreference
- android:key="list_general_news"
- android:title="@string/general_news_title"
- android:summary="@string/general_news_summary"
- android:entries="@array/general_news_entries"
- android:entryValues="@array/general_news_entryvalues"
- android:dialogTitle="@string/general_news_dialogtitle"/> -->
-
- </PreferenceCategory>
-
- <PreferenceCategory
- android:title="@string/bf_news_settings">
-
- <CheckBoxPreference
- android:key="button_local_bf_news"
- android:title="@string/enable_disable_local"
- android:persistent="false"
- android:summaryOn="@string/local_enable"
- android:summaryOff="@string/local_disable"/>
-
- <CheckBoxPreference
- android:key="button_regional_bf_news"
- android:title="@string/enable_disable_regional"
- android:persistent="false"
- android:summaryOn="@string/regional_enable"
- android:summaryOff="@string/regional_disable"/>
-
- <CheckBoxPreference
- android:key="button_national_bf_news"
- android:title="@string/enable_disable_national"
- android:persistent="false"
- android:summaryOn="@string/national_enable"
- android:summaryOff="@string/national_disable"/>
-
- <CheckBoxPreference
- android:key="button_international_bf_news"
- android:title="@string/enable_disable_international"
- android:persistent="false"
- android:summaryOn="@string/international_enable"
- android:summaryOff="@string/international_disable"/>
-
- <!--
- <ListPreference
- android:key="list_bf"
- android:title="@string/bf_news_title"
- android:summary="@string/bf_news_summary"
- android:entries="@array/bf_news_entries"
- android:entryValues="@array/bf_news_entryvalues"
- android:dialogTitle="@string/bf_news_dialogtitle"/> -->
-
- </PreferenceCategory>
-
- <PreferenceCategory
- android:title="@string/sports_news_settings">
-
- <CheckBoxPreference
- android:key="button_local_sports_news"
- android:title="@string/enable_disable_local"
- android:persistent="false"
- android:summaryOn="@string/local_enable"
- android:summaryOff="@string/local_disable"/>
-
- <CheckBoxPreference
- android:key="button_regional_sports_news"
- android:title="@string/enable_disable_regional"
- android:persistent="false"
- android:summaryOn="@string/regional_enable"
- android:summaryOff="@string/regional_disable"/>
-
- <CheckBoxPreference
- android:key="button_national_sports_news"
- android:title="@string/enable_disable_national"
- android:persistent="false"
- android:summaryOn="@string/national_enable"
- android:summaryOff="@string/national_disable"/>
-
- <CheckBoxPreference
- android:key="button_international_sports_news"
- android:title="@string/enable_disable_international"
- android:persistent="false"
- android:summaryOn="@string/international_enable"
- android:summaryOff="@string/international_disable"/>
-
- <!--
- <ListPreference
- android:key="list_sports_news"
- android:title="@string/sports_news_title"
- android:summary="@string/sports_news_summary"
- android:entries="@array/sports_news_entries"
- android:entryValues="@array/sports_news_entryvalues"
- android:dialogTitle="@string/sports_news_dialogtitle"/> -->
-
- </PreferenceCategory>
-
- <PreferenceCategory
- android:title="@string/entertainment_news_settings">
-
- <CheckBoxPreference
- android:key="button_local_entertainment_news"
- android:title="@string/enable_disable_local"
- android:persistent="false"
- android:summaryOn="@string/local_enable"
- android:summaryOff="@string/local_disable"/>
-
- <CheckBoxPreference
- android:key="button_regional_entertainment_news"
- android:title="@string/enable_disable_regional"
- android:persistent="false"
- android:summaryOn="@string/regional_enable"
- android:summaryOff="@string/regional_disable"/>
-
- <CheckBoxPreference
- android:key="button_national_entertainment_news"
- android:title="@string/enable_disable_national"
- android:persistent="false"
- android:summaryOn="@string/national_enable"
- android:summaryOff="@string/national_disable"/>
-
- <CheckBoxPreference
- android:key="button_international_entertainment_news"
- android:title="@string/enable_disable_international"
- android:persistent="false"
- android:summaryOn="@string/international_enable"
- android:summaryOff="@string/international_disable"/>
-
- <!--
- <ListPreference
- android:key="list_entertainment_news"
- android:title="@string/entertainment_news_title"
- android:summary="@string/entertainment_news_summary"
- android:entries="@array/entertainment_news_entries"
- android:entryValues="@array/entertainment_news_entryvalues"
- android:dialogTitle="@string/entertainment_news_dialogtitle"/> -->
-
- </PreferenceCategory>
-
-</PreferenceScreen>
diff --git a/res/xml/gsm_umts_additional_options.xml b/res/xml/gsm_umts_additional_options.xml
index f2234e3..33b0769 100644
--- a/res/xml/gsm_umts_additional_options.xml
+++ b/res/xml/gsm_umts_additional_options.xml
@@ -14,7 +14,7 @@
android:summary="@string/sum_loading_settings"
android:enabled="false"/>
- <com.android.phone.CallWaitingCheckBoxPreference
+ <com.android.phone.CallWaitingSwitchPreference
android:key="button_cw_key"
android:title="@string/labelCW"
android:persistent="false"
diff --git a/res/xml/phone_account_settings.xml b/res/xml/phone_account_settings.xml
index 27da54c..8e0d17a 100644
--- a/res/xml/phone_account_settings.xml
+++ b/res/xml/phone_account_settings.xml
@@ -64,7 +64,7 @@
android:entries="@array/sip_call_options_entries"
android:entryValues="@array/sip_call_options_values"/>
- <CheckBoxPreference
+ <SwitchPreference
android:key="sip_receive_calls_key"
android:title="@string/sip_receive_calls"
android:summary="@string/sip_receive_calls_summary"
diff --git a/res/xml/voicemail_settings.xml b/res/xml/voicemail_settings.xml
index 5634ba5..1fc1fe1 100644
--- a/res/xml/voicemail_settings.xml
+++ b/res/xml/voicemail_settings.xml
@@ -56,7 +56,7 @@
android:persistent="false"
android:ringtoneType="notification" />
- <CheckBoxPreference
+ <SwitchPreference
android:key="@string/voicemail_notification_vibrate_key"
android:title="@string/voicemail_notification_vibrate_when_title"
android:persistent="true" />
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 3e0e019..8386c34 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -33,11 +33,11 @@
import android.os.PersistableBundle;
import android.os.UserHandle;
import android.os.UserManager;
-import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
import android.provider.Settings;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -108,9 +108,9 @@
private SubscriptionInfoHelper mSubscriptionInfoHelper;
private TelecomManager mTelecomManager;
- private CheckBoxPreference mButtonAutoRetry;
+ private SwitchPreference mButtonAutoRetry;
private PreferenceScreen mVoicemailSettingsScreen;
- private CheckBoxPreference mEnableVideoCalling;
+ private SwitchPreference mEnableVideoCalling;
/*
* Click Listeners, handle click based on objects attached to UI.
@@ -234,9 +234,9 @@
maybeHideVoicemailSettings();
- mButtonAutoRetry = (CheckBoxPreference) findPreference(BUTTON_RETRY_KEY);
+ mButtonAutoRetry = (SwitchPreference) findPreference(BUTTON_RETRY_KEY);
- mEnableVideoCalling = (CheckBoxPreference) findPreference(ENABLE_VIDEO_CALLING_KEY);
+ mEnableVideoCalling = (SwitchPreference) findPreference(ENABLE_VIDEO_CALLING_KEY);
PersistableBundle carrierConfig =
PhoneGlobals.getInstance().getCarrierConfigForSubId(mPhone.getSubId());
diff --git a/src/com/android/phone/CallWaitingCheckBoxPreference.java b/src/com/android/phone/CallWaitingSwitchPreference.java
similarity index 82%
rename from src/com/android/phone/CallWaitingCheckBoxPreference.java
rename to src/com/android/phone/CallWaitingSwitchPreference.java
index bda8b3b..3f248ae 100644
--- a/src/com/android/phone/CallWaitingCheckBoxPreference.java
+++ b/src/com/android/phone/CallWaitingSwitchPreference.java
@@ -9,29 +9,27 @@
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
-import android.preference.CheckBoxPreference;
+import android.preference.SwitchPreference;
import android.util.AttributeSet;
import android.util.Log;
-import com.android.internal.telephony.Phone;
-
-public class CallWaitingCheckBoxPreference extends CheckBoxPreference {
- private static final String LOG_TAG = "CallWaitingCheckBoxPreference";
+public class CallWaitingSwitchPreference extends SwitchPreference {
+ private static final String LOG_TAG = "CallWaitingSwitchPreference";
private final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
private final MyHandler mHandler = new MyHandler();
private Phone mPhone;
private TimeConsumingPreferenceListener mTcpListener;
- public CallWaitingCheckBoxPreference(Context context, AttributeSet attrs, int defStyle) {
+ public CallWaitingSwitchPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
- public CallWaitingCheckBoxPreference(Context context, AttributeSet attrs) {
- this(context, attrs, com.android.internal.R.attr.checkBoxPreferenceStyle);
+ public CallWaitingSwitchPreference(Context context, AttributeSet attrs) {
+ this(context, attrs, com.android.internal.R.attr.switchPreferenceStyle);
}
- public CallWaitingCheckBoxPreference(Context context) {
+ public CallWaitingSwitchPreference(Context context) {
this(context, null);
}
@@ -81,9 +79,9 @@
if (mTcpListener != null) {
if (msg.arg2 == MESSAGE_SET_CALL_WAITING) {
- mTcpListener.onFinished(CallWaitingCheckBoxPreference.this, false);
+ mTcpListener.onFinished(CallWaitingSwitchPreference.this, false);
} else {
- mTcpListener.onFinished(CallWaitingCheckBoxPreference.this, true);
+ mTcpListener.onFinished(CallWaitingSwitchPreference.this, true);
}
}
@@ -93,7 +91,7 @@
ar.exception);
}
if (mTcpListener != null) {
- mTcpListener.onException(CallWaitingCheckBoxPreference.this,
+ mTcpListener.onException(CallWaitingSwitchPreference.this,
(CommandException)ar.exception);
}
} else if (ar.userObj instanceof Throwable || ar.exception != null) {
@@ -102,7 +100,7 @@
Log.d(LOG_TAG, "handleGetCallWaitingResponse: Exception" + ar.exception);
}
if (mTcpListener != null) {
- mTcpListener.onError(CallWaitingCheckBoxPreference.this, RESPONSE_ERROR);
+ mTcpListener.onError(CallWaitingSwitchPreference.this, RESPONSE_ERROR);
}
} else {
if (DBG) {
diff --git a/src/com/android/phone/CdmaCallOptions.java b/src/com/android/phone/CdmaCallOptions.java
index 4a5f229..bbd0069 100644
--- a/src/com/android/phone/CdmaCallOptions.java
+++ b/src/com/android/phone/CdmaCallOptions.java
@@ -25,10 +25,10 @@
import android.os.Handler;
import android.os.Message;
import android.os.PersistableBundle;
-import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
import android.telephony.CarrierConfigManager;
import android.util.Log;
import android.view.MenuItem;
@@ -38,7 +38,7 @@
private final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
private static final String BUTTON_VP_KEY = "button_voice_privacy_key";
- private CheckBoxPreference mButtonVoicePrivacy;
+ private SwitchPreference mButtonVoicePrivacy;
@Override
protected void onCreate(Bundle icicle) {
@@ -50,7 +50,7 @@
subInfoHelper.setActionBarTitle(
getActionBar(), getResources(), R.string.labelCdmaMore_with_label);
- mButtonVoicePrivacy = (CheckBoxPreference) findPreference(BUTTON_VP_KEY);
+ mButtonVoicePrivacy = (SwitchPreference) findPreference(BUTTON_VP_KEY);
PersistableBundle carrierConfig;
if (subInfoHelper.hasSubId()) {
carrierConfig = PhoneGlobals.getInstance().getCarrierConfigForSubId(
diff --git a/src/com/android/phone/CdmaVoicePrivacyCheckBoxPreference.java b/src/com/android/phone/CdmaVoicePrivacySwitchPreference.java
similarity index 84%
rename from src/com/android/phone/CdmaVoicePrivacyCheckBoxPreference.java
rename to src/com/android/phone/CdmaVoicePrivacySwitchPreference.java
index a5ff37e..5a99bb7 100644
--- a/src/com/android/phone/CdmaVoicePrivacyCheckBoxPreference.java
+++ b/src/com/android/phone/CdmaVoicePrivacySwitchPreference.java
@@ -22,29 +22,29 @@
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
-import android.preference.CheckBoxPreference;
+import android.preference.SwitchPreference;
import android.util.AttributeSet;
import android.util.Log;
-public class CdmaVoicePrivacyCheckBoxPreference extends CheckBoxPreference {
- private static final String LOG_TAG = "CdmaVoicePrivacyCheckBoxPreference";
+public class CdmaVoicePrivacySwitchPreference extends SwitchPreference {
+ private static final String LOG_TAG = "CdmaVoicePrivacySwitchPreference";
private final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
Phone phone;
private MyHandler mHandler = new MyHandler();
- public CdmaVoicePrivacyCheckBoxPreference(Context context, AttributeSet attrs, int defStyle) {
+ public CdmaVoicePrivacySwitchPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
phone = PhoneGlobals.getPhone();
phone.getEnhancedVoicePrivacy(mHandler.obtainMessage(MyHandler.MESSAGE_GET_VP));
}
- public CdmaVoicePrivacyCheckBoxPreference(Context context, AttributeSet attrs) {
- this(context, attrs, com.android.internal.R.attr.checkBoxPreferenceStyle);
+ public CdmaVoicePrivacySwitchPreference(Context context, AttributeSet attrs) {
+ this(context, attrs, com.android.internal.R.attr.switchPreferenceStyle);
}
- public CdmaVoicePrivacyCheckBoxPreference(Context context) {
+ public CdmaVoicePrivacySwitchPreference(Context context) {
this(context, null);
}
diff --git a/src/com/android/phone/GsmUmtsAdditionalCallOptions.java b/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
index 88d32fb..082eaa9 100644
--- a/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
+++ b/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
@@ -1,7 +1,6 @@
package com.android.phone;
import android.app.ActionBar;
-import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceScreen;
@@ -20,7 +19,7 @@
private static final String BUTTON_CW_KEY = "button_cw_key";
private CLIRListPreference mCLIRButton;
- private CallWaitingCheckBoxPreference mCWButton;
+ private CallWaitingSwitchPreference mCWButton;
private final ArrayList<Preference> mPreferences = new ArrayList<Preference>();
private int mInitIndex = 0;
@@ -40,7 +39,7 @@
PreferenceScreen prefSet = getPreferenceScreen();
mCLIRButton = (CLIRListPreference) prefSet.findPreference(BUTTON_CLIR_KEY);
- mCWButton = (CallWaitingCheckBoxPreference) prefSet.findPreference(BUTTON_CW_KEY);
+ mCWButton = (CallWaitingSwitchPreference) prefSet.findPreference(BUTTON_CW_KEY);
mPreferences.add(mCLIRButton);
mPreferences.add(mCWButton);
@@ -84,8 +83,8 @@
if (mInitIndex < mPreferences.size()-1 && !isFinishing()) {
mInitIndex++;
Preference pref = mPreferences.get(mInitIndex);
- if (pref instanceof CallWaitingCheckBoxPreference) {
- ((CallWaitingCheckBoxPreference) pref).init(this, false, mPhone);
+ if (pref instanceof CallWaitingSwitchPreference) {
+ ((CallWaitingSwitchPreference) pref).init(this, false, mPhone);
}
}
super.onFinished(preference, reading);
diff --git a/src/com/android/phone/settings/AccessibilitySettingsFragment.java b/src/com/android/phone/settings/AccessibilitySettingsFragment.java
index 0c186a9..af7d4bf 100644
--- a/src/com/android/phone/settings/AccessibilitySettingsFragment.java
+++ b/src/com/android/phone/settings/AccessibilitySettingsFragment.java
@@ -19,7 +19,7 @@
import android.content.Context;
import android.media.AudioManager;
import android.os.Bundle;
-import android.preference.CheckBoxPreference;
+import android.preference.SwitchPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceScreen;
@@ -66,7 +66,7 @@
private AudioManager mAudioManager;
private TtyModeListPreference mButtonTty;
- private CheckBoxPreference mButtonHac;
+ private SwitchPreference mButtonHac;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -79,7 +79,7 @@
mButtonTty = (TtyModeListPreference) findPreference(
getResources().getString(R.string.tty_mode_key));
- mButtonHac = (CheckBoxPreference) findPreference(BUTTON_HAC_KEY);
+ mButtonHac = (SwitchPreference) findPreference(BUTTON_HAC_KEY);
if (PhoneGlobals.getInstance().phoneMgr.isTtyModeSupported()) {
mButtonTty.init();
diff --git a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
index 07402db..670f98d 100644
--- a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
+++ b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
@@ -8,11 +8,11 @@
import android.net.sip.SipManager;
import android.os.Bundle;
import android.os.UserManager;
-import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceCategory;
import android.preference.PreferenceFragment;
+import android.preference.SwitchPreference;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -73,7 +73,7 @@
private AccountSelectionPreference mDefaultOutgoingAccount;
private ListPreference mUseSipCalling;
- private CheckBoxPreference mSipReceiveCallsPreference;
+ private SwitchPreference mSipReceiveCallsPreference;
private SipPreferences mSipPreferences;
@Override
@@ -173,7 +173,7 @@
mUseSipCalling.setValueIndex(optionsValueIndex);
mUseSipCalling.setSummary(mUseSipCalling.getEntry());
- mSipReceiveCallsPreference = (CheckBoxPreference)
+ mSipReceiveCallsPreference = (SwitchPreference)
getPreferenceScreen().findPreference(SIP_RECEIVE_CALLS_PREF_KEY);
mSipReceiveCallsPreference.setEnabled(SipUtil.isPhoneIdle(getActivity()));
mSipReceiveCallsPreference.setChecked(
diff --git a/src/com/android/phone/settings/VoicemailSettingsActivity.java b/src/com/android/phone/settings/VoicemailSettingsActivity.java
index 213baa0..d0e0656 100644
--- a/src/com/android/phone/settings/VoicemailSettingsActivity.java
+++ b/src/com/android/phone/settings/VoicemailSettingsActivity.java
@@ -25,10 +25,10 @@
import android.os.Handler;
import android.os.Message;
import android.os.UserManager;
-import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
import android.provider.ContactsContract.CommonDataKinds;
import android.telephony.TelephonyManager;
import android.text.BidiFormatter;
@@ -200,7 +200,7 @@
private VoicemailProviderListPreference mVoicemailProviders;
private PreferenceScreen mVoicemailSettings;
private VoicemailRingtonePreference mVoicemailNotificationRingtone;
- private CheckBoxPreference mVoicemailNotificationVibrate;
+ private SwitchPreference mVoicemailNotificationVibrate;
//*********************************************************************************************
// Preference Activity Methods
@@ -259,7 +259,7 @@
mVoicemailNotificationRingtone.setVoicemailRingtoneNameChangeListener(this);
mVoicemailNotificationRingtone.init(mPhone, mOldVmRingtoneName);
- mVoicemailNotificationVibrate = (CheckBoxPreference) findPreference(
+ mVoicemailNotificationVibrate = (SwitchPreference) findPreference(
getResources().getString(R.string.voicemail_notification_vibrate_key));
mVoicemailNotificationVibrate.setOnPreferenceChangeListener(this);