commit | 7126fddfe4609bdbe7ee5b56a85ae29896bd516b | [log] [tgz] |
---|---|---|
author | SongFerng Wang <songferngwang@google.com> | Wed Nov 22 01:47:55 2023 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed Nov 22 01:47:55 2023 +0000 |
tree | 3b4122d8e5f9aa4d4779120c5621d29a2a523b9b | |
parent | 6cf28bc0521fa0dadecbbc1f9847982998a78aed [diff] | |
parent | 2d16858c17131b320dda841bbcabcce984cda57c [diff] |
Merge "Renew the API getCallState" into main
diff --git a/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroup.java b/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroup.java index ebfb283..cc0f22d 100644 --- a/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroup.java +++ b/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroup.java
@@ -240,8 +240,8 @@ return true; }); - pref.setEnabled(getTelephonyManagerForSubscriptionId(subId).getCallState() - == TelephonyManager.CALL_STATE_IDLE); + pref.setEnabled(getTelephonyManagerForSubscriptionId(subId) + .getCallStateForSubscription() == TelephonyManager.CALL_STATE_IDLE); pref.setOrder(order++); int resId = com.android.internal.R.string.wifi_calling_off_summary;
diff --git a/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java b/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java index 0a0b41f..5503e95 100644 --- a/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java +++ b/src/com/android/settings/network/telephony/WifiCallingPreferenceController.java
@@ -218,7 +218,7 @@ mTelephonyManager = getTelephonyManager(context, subId); // assign current call state so that it helps to show correct preference state even // before first onCallStateChanged() by initial registration. - mCallState = mTelephonyManager.getCallState(subId); + mCallState = mTelephonyManager.getCallStateForSubscription(); mTelephonyManager.registerTelephonyCallback(context.getMainExecutor(), this); }
diff --git a/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java b/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java index 739f8b2..a90d627 100644 --- a/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java +++ b/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java
@@ -125,7 +125,7 @@ if (prefSwitch != null) { isWfcEnabled = prefSwitch.isChecked(); isCallStateIdle = getTelephonyManagerForSub( - WifiCallingSettingsForSub.this.mSubId).getCallState() + WifiCallingSettingsForSub.this.mSubId).getCallStateForSubscription() == TelephonyManager.CALL_STATE_IDLE; boolean isNonTtyOrTtyOnVolteEnabled = true;