|
@@ -5,6 +5,7 @@ import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
|
|
|
import com.cooleshow.base.constanst.Constants;
|
|
import com.cooleshow.base.constanst.Constants;
|
|
|
|
+import com.cooleshow.base.utils.LOG;
|
|
|
|
|
|
|
|
|
|
public class PlayMusicReceiver extends BroadcastReceiver {
|
|
public class PlayMusicReceiver extends BroadcastReceiver {
|
|
@@ -14,6 +15,7 @@ public class PlayMusicReceiver extends BroadcastReceiver {
|
|
if (action.equals(Intent.ACTION_HEADSET_PLUG)) {
|
|
if (action.equals(Intent.ACTION_HEADSET_PLUG)) {
|
|
if (intent.hasExtra("state")) {
|
|
if (intent.hasExtra("state")) {
|
|
int state = intent.getIntExtra("state", 0);
|
|
int state = intent.getIntExtra("state", 0);
|
|
|
|
+ LOG.i("onReceive state "+state);
|
|
if (state == 0) {
|
|
if (state == 0) {
|
|
//无耳机插入
|
|
//无耳机插入
|
|
Constants.HEADSET_PLUE_TAG = "";
|
|
Constants.HEADSET_PLUE_TAG = "";
|