Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit f9a28f3

Browse files
committed
skip getCallState
1 parent ae2b6de commit f9a28f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

android/src/main/java/com/carusto/ReactNativePjSip/PjSipService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ public int onStartCommand(final Intent intent, int flags, int startId) {
272272
mWifiLock = mWifiManager.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, this.getPackageName()+"-wifi-call-lock");
273273
mWifiLock.setReferenceCounted(false);
274274
mTelephonyManager = (TelephonyManager) getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
275-
mGSMIdle = mTelephonyManager.getCallState() == TelephonyManager.CALL_STATE_IDLE;
275+
276+
// getCallState is deprecated in api 31. So we skip this check for now.
277+
// mGSMIdle = mTelephonyManager.getCallState() == TelephonyManager.CALL_STATE_IDLE;
278+
276279
IntentFilter phoneStateFilter = new IntentFilter(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
277280
registerReceiver(mPhoneStateChangedReceiver, phoneStateFilter);
278281

0 commit comments

Comments
 (0)