You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was checking the implementation of the ShareProfileHelper.java and found that the following method hasValidAccountState will have the cursor open in very rare scenarios when cursor.moveToFirst() returns false or null (not sure of the implementation of this method). Hence I think we should have a safe check to close the cursor in the end even if the condition are not met.
Present Implementation of hasValidAccountState in ShareProfileHelper.java
Observing ANR with the following call stack in firebase.
com.truecaller.android.sdk.ShareProfileHelper.hasValidAccountState (ShareProfileHelper.java:96) com.truecaller.android.sdk.ShareProfileHelper.isValidTcClientAvailable (ShareProfileHelper.java:88) com.truecaller.android.sdk.ClientManager.<init> (ClientManager.java:87) com.truecaller.android.sdk.ClientManager.createInstance (ClientManager.java:67) com.truecaller.android.sdk.TruecallerSDK.init (TruecallerSDK.java:91) com.truecallersdk.TruecallerSdkPlugin.onMethodCall (TruecallerSdkPlugin.java:117) io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage (MethodChannel.java:262) io.flutter.embedding.engine.dart.DartMessenger.invokeHandler (DartMessenger.java:178) io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0 (DartMessenger.java:206)
The text was updated successfully, but these errors were encountered: