Renew the API getCallState
Since the getCallState was marked as @Deprecated, renew this API as the getCallStateForSubscription. Bug: 279852410 Test: build pass Change-Id: I224164a2d1089483d4f63da1651d7e87296e87f4
This commit is contained in:
@@ -240,8 +240,8 @@ public class NetworkProviderWifiCallingGroup extends
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
pref.setEnabled(getTelephonyManagerForSubscriptionId(subId).getCallState()
|
pref.setEnabled(getTelephonyManagerForSubscriptionId(subId)
|
||||||
== TelephonyManager.CALL_STATE_IDLE);
|
.getCallStateForSubscription() == TelephonyManager.CALL_STATE_IDLE);
|
||||||
pref.setOrder(order++);
|
pref.setOrder(order++);
|
||||||
|
|
||||||
int resId = com.android.internal.R.string.wifi_calling_off_summary;
|
int resId = com.android.internal.R.string.wifi_calling_off_summary;
|
||||||
|
@@ -218,7 +218,7 @@ public class WifiCallingPreferenceController extends TelephonyBasePreferenceCont
|
|||||||
mTelephonyManager = getTelephonyManager(context, subId);
|
mTelephonyManager = getTelephonyManager(context, subId);
|
||||||
// assign current call state so that it helps to show correct preference state even
|
// assign current call state so that it helps to show correct preference state even
|
||||||
// before first onCallStateChanged() by initial registration.
|
// before first onCallStateChanged() by initial registration.
|
||||||
mCallState = mTelephonyManager.getCallState(subId);
|
mCallState = mTelephonyManager.getCallStateForSubscription();
|
||||||
mTelephonyManager.registerTelephonyCallback(context.getMainExecutor(), this);
|
mTelephonyManager.registerTelephonyCallback(context.getMainExecutor(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -125,7 +125,7 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment
|
|||||||
if (prefSwitch != null) {
|
if (prefSwitch != null) {
|
||||||
isWfcEnabled = prefSwitch.isChecked();
|
isWfcEnabled = prefSwitch.isChecked();
|
||||||
isCallStateIdle = getTelephonyManagerForSub(
|
isCallStateIdle = getTelephonyManagerForSub(
|
||||||
WifiCallingSettingsForSub.this.mSubId).getCallState()
|
WifiCallingSettingsForSub.this.mSubId).getCallStateForSubscription()
|
||||||
== TelephonyManager.CALL_STATE_IDLE;
|
== TelephonyManager.CALL_STATE_IDLE;
|
||||||
|
|
||||||
boolean isNonTtyOrTtyOnVolteEnabled = true;
|
boolean isNonTtyOrTtyOnVolteEnabled = true;
|
||||||
|
Reference in New Issue
Block a user