summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-11 10:08:00 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-11 10:08:00 +0000
commitc31bbfac1418e782cdaa5fde3a859da71d3692f2 (patch)
tree75e5ee0adf99f924bff5d2aa4efb3fc1148d0204
parentfb32d333e50982ac200418f81edd45f7343ec7ad (diff)
parente5ebcd9bacfb20a7c033df4107101b215c98cfac (diff)
Snap for 8432708 from e5ebcd9bacfb20a7c033df4107101b215c98cfac to s-keystone-qcom-release
Change-Id: I1b40c1c56f952a9da194d78977bf7c6d98435c23
-rw-r--r--src/com/android/phone/settings/PhoneAccountSettingsFragment.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
index 39500e048e..64b219f204 100644
--- a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
+++ b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
@@ -382,6 +382,7 @@ public class PhoneAccountSettingsFragment extends PreferenceFragment
} else {
mAccountList.removePreference(mAllCallingAccounts);
mMakeAndReceiveCallsCategory.removePreference(mDefaultOutgoingAccount);
+ mMakeAndReceiveCallsCategoryPresent = false;
}
if (isXdivertAvailable) {
@@ -490,15 +491,17 @@ public class PhoneAccountSettingsFragment extends PreferenceFragment
getPreferenceScreen().findPreference(SMART_FORWARDING_CONFIGURATION_PREF_KEY));
}
- SwitchPreference vibratingButton = (SwitchPreference)
- mMakeAndReceiveCallsCategory.findPreference(BUTTON_VIBRATING_KEY);
- if (vibratingButton != null) {
- mMakeAndReceiveCallsCategoryPresent = true;
- final int vibrating = Settings.Global.getInt(
- getActivity().getContentResolver(),
- Settings.Global.VIBRATING_FOR_OUTGOING_CALL_ACCEPTED, 1);
- vibratingButton.setChecked(vibrating != 0);
- vibratingButton.setOnPreferenceChangeListener(this);
+ if (mButtonVibratingForMoCallAccepted != null) {
+ if (mTelephonyManager.isMultiSimEnabled()) {
+ mMakeAndReceiveCallsCategoryPresent = true;
+ final int vibrating = Settings.Global.getInt(
+ getActivity().getContentResolver(),
+ Settings.Global.VIBRATING_FOR_OUTGOING_CALL_ACCEPTED, 1);
+ mButtonVibratingForMoCallAccepted.setChecked(vibrating != 0);
+ mButtonVibratingForMoCallAccepted.setOnPreferenceChangeListener(this);
+ } else {
+ mMakeAndReceiveCallsCategory.removePreference(mButtonVibratingForMoCallAccepted);
+ }
}
if (!mMakeAndReceiveCallsCategoryPresent) {