Commit 35401f4b authored by Paweł Wegner's avatar Paweł Wegner

cloudbrowser: unregister receiver.

parent 2b7bc4ab
......@@ -13,6 +13,7 @@ import android.os.Build;
public class NotificationHelper {
private Context m_context;
private NotificationManager m_notification_manager;
private Receiver m_receiver;
private static final String ActionPlay = "PLAY";
private static final String ActionPause = "PAUSE";
......@@ -31,11 +32,12 @@ public class NotificationHelper {
m_context = context;
m_notification_manager =
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
m_receiver = new Receiver();
final IntentFilter filter = new IntentFilter();
filter.addAction(ActionPlay);
filter.addAction(ActionPause);
filter.addAction(ActionNext);
context.registerReceiver(new Receiver(), filter);
context.registerReceiver(m_receiver, filter);
hidePlayerNotification();
m_context.startService(
......@@ -44,6 +46,7 @@ public class NotificationHelper {
}
public void release() {
m_context.unregisterReceiver(m_receiver);
hidePlayerNotification();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment