Bug #6539

NetCipher leaking IntentReceiver

Added by n8fr8 almost 2 years ago.

Status:NewStart date:01/22/2016
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Component:

Description

I have downloaded the NetCipher code and noticed that two BroadcastReceivers are registered but only one is unregistered in the onPause method.
This leads to the app causing this error when closing it:

E/ActivityThread: Activity sample.netcipher.NetCipherSampleActivity has leaked IntentReceiver sample.netcipher.NetCipherSampleActivity$6@21a3692a that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity sample.netcipher.NetCipherSampleActivity has leaked IntentReceiver sample.netcipher.NetCipherSampleActivity$6@21a3692a that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:904)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:705)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1674)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1654)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1648)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:495)
at sample.netcipher.NetCipherSampleActivity.onResume(NetCipherSampleActivity.java:179)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
at android.app.Activity.performResume(Activity.java:6076)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3008)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3050)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2425)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5294)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

Also available in: Atom PDF