androidandroid-activitykeyguard

How to solve keyguard Update Monitor Error


I'm getting the following logcat errors while app crashing in device.

12-15 23:16:04.225      570-587/? E/KeyguardUpdateMonitor﹕ Object tried to add another callback
java.lang.Exception: Called by
        at com.android.internal.policy.impl.keyguard.KeyguardUpdateMonitor.registerCallback(KeyguardUpdateMonitor.java:1107)
        at com.android.internal.policy.impl.keyguard.KeyguardSelectorView.onResume(KeyguardSelectorView.java:331)
        at com.android.internal.policy.impl.keyguard.KeyguardHostView.onScreenTurnedOn(KeyguardHostView.java:1130)
        at com.android.internal.policy.impl.keyguard.KeyguardViewManager.onScreenTurnedOn(KeyguardViewManager.java:403)
        at com.android.internal.policy.impl.keyguard.KeyguardViewMediator.handleNotifyScreenOn(KeyguardViewMediator.java:1814)
        at com.android.internal.policy.impl.keyguard.KeyguardViewMediator.access$2400(KeyguardViewMediator.java:106)
        at com.android.internal.policy.impl.keyguard.KeyguardViewMediator$4.handleMessage(KeyguardViewMediator.java:1450)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:194)
        at android.os.HandlerThread.run(HandlerThread.java:60)

Can anyone help, thanks.


Solution

  • In my case this error occured because my application running in UI thread while restarting that application again it can't load so app crashes these errors displayed.

    I used System.gc() in onPause method so while restarting app garbage collection invoked automatically.

    Now my app working Perfectly.