Always trigger user action when screen turns on

This commit is contained in:
Christopher Eby 2012-01-10 08:19:06 -06:00
parent d441686f19
commit 6f71b196b7

View File

@ -892,6 +892,8 @@ public final class PlaybackService extends Service
setFlag(FLAG_PLAYING);
else if (!mPlugInitialized)
mPlugInitialized = true;
} else if (Intent.ACTION_SCREEN_ON.equals(action)) {
userActionTriggered();
}
}
}
@ -954,6 +956,7 @@ public final class PlaybackService extends Service
IntentFilter filter = new IntentFilter();
filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
filter.addAction(Intent.ACTION_HEADSET_PLUG);
filter.addAction(Intent.ACTION_SCREEN_ON);
registerReceiver(mReceiver, filter);
}