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

Commit 082ea43

Browse files
committed
skip getCallState
1 parent 4abd7c3 commit 082ea43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ public int onStartCommand(final Intent intent, int flags, int startId) {
226226
mWifiLock = mWifiManager.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, this.getPackageName()+"-wifi-call-lock");
227227
mWifiLock.setReferenceCounted(false);
228228
mTelephonyManager = (TelephonyManager) getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
229-
mGSMIdle = mTelephonyManager.getCallState() == TelephonyManager.CALL_STATE_IDLE;
229+
230+
// getCallState is deprecated in api 31. So we skip this test for now.
231+
// mGSMIdle = mTelephonyManager.getCallState() == TelephonyManager.CALL_STATE_IDLE;
230232

231233
IntentFilter phoneStateFilter = new IntentFilter(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
232234
registerReceiver(mPhoneStateChangedReceiver, phoneStateFilter);

0 commit comments

Comments
 (0)