package com.nulldreams.media.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class RemoteControlReceiver extends BroadcastReceiver {

    private static final String TAG = RemoteControlReceiver.class.getSimpleName();

    public RemoteControlReceiver() {
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.v(TAG, "onReceive " + intent.getAction());
    }
}

@@ -157,16 +157,145 @@
 oid.
-util.Log
+os.Bundle;%0Aimport android.util.Log;%0Aimport android.view.KeyEvent;%0A%0Aimport com.nulldreams.media.manager.PlayManager;%0A%0Aimport java.util.Set
 ;%0A%0Ap
@@ -611,18 +611,880 @@
 Action()
-);
+ + %22 %22 + intent.toString());%0A        Bundle bundle = intent.getExtras();%0A        Set%3CString%3E set = bundle.keySet();%0A        KeyEvent event = bundle.getParcelable(Intent.EXTRA_KEY_EVENT);%0A        if (event.getAction() == KeyEvent.ACTION_UP) %7B%0A            switch (event.getKeyCode()) %7B%0A                case KeyEvent.KEYCODE_MEDIA_NEXT:%0A                    PlayManager.getInstance(context).next();%0A                    break;%0A                case KeyEvent.KEYCODE_MEDIA_PREVIOUS:%0A                    PlayManager.getInstance(context).previous();%0A                    break;%0A                case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:%0A                    PlayManager.getInstance(context).dispatch();%0A                    break;%0A            %7D%0A        %7D%0A        /*for (String key : set) %7B%0A            Log.v(TAG, %22onReceive key=%22 + key + %22 value=%22 + bundle.get(key));%0A        %7D*/
 %0A    %7D%0A%7D

add lockscreen control compat on kitkat