Remove annoying message

This commit is contained in:
Victor Shcherb 2014-09-25 01:24:29 +02:00
parent 608e8bf1e9
commit 52ede190c3

View file

@ -4,17 +4,15 @@ import net.osmand.plus.OsmandPlugin;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.widget.Toast;
public class MediaRemoteControlReceiver extends BroadcastReceiver { public class MediaRemoteControlReceiver extends BroadcastReceiver {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Intent sent", Toast.LENGTH_LONG).show();
if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction())) { if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction())) {
AudioVideoNotesPlugin plugin = OsmandPlugin.getEnabledPlugin(AudioVideoNotesPlugin.class); AudioVideoNotesPlugin plugin = OsmandPlugin.getEnabledPlugin(AudioVideoNotesPlugin.class);
if(plugin != null && intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT) != null) { if(plugin != null && intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT) != null) {
System.out.println("OsmAnd AV Button pressed " + intent.getIntExtra(Intent.EXTRA_KEY_EVENT, 0)); // System.out.println("OsmAnd AV Button pressed " + intent.getIntExtra(Intent.EXTRA_KEY_EVENT, 0));
// Toast.makeText(context, "Button pressed " + intent.getIntExtra(Intent.EXTRA_KEY_EVENT, 0), Toast.LENGTH_LONG).show(); // Toast.makeText(context, "Button pressed " + intent.getIntExtra(Intent.EXTRA_KEY_EVENT, 0), Toast.LENGTH_LONG).show();
} }
} }