Skip to content

Commit 1154cc7

Browse files
committed
fix IllegalStateException
1 parent db693d5 commit 1154cc7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ public void stopListenToNativeCallsState() {
304304
telephonyManager.unregisterTelephonyCallback(callStateListener);
305305
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S && legacyCallStateListener != null){
306306
telephonyManager.listen(legacyCallStateListener, PhoneStateListener.LISTEN_NONE);
307-
Looper.myLooper().quit();
307+
if (Looper.myLooper() != null) {
308+
Looper.myLooper().quit();
309+
}
308310
}
309311
}
310312

0 commit comments

Comments
 (0)