am 20fc473c: am f0336eb8: am 2cb287f9: am 9ea996a3: Do not restore the media button event receiver
* commit '20fc473c69ae9c564ceb7fd357acc09c6b9e1aaf':
Do not restore the media button event receiver
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 9ec5be3..1869372 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -756,9 +756,6 @@
// Broadcast vibrate settings
broadcastVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);
broadcastVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION);
-
- // Restore the default media button receiver from the system settings
- restoreMediaButtonReceiver();
}
private int rescaleIndex(int index, int srcStream, int dstStream) {
@@ -4884,26 +4881,6 @@
/**
* Helper function:
- * Restore remote control receiver from the system settings.
- */
- private void restoreMediaButtonReceiver() {
- String receiverName = Settings.System.getStringForUser(mContentResolver,
- Settings.System.MEDIA_BUTTON_RECEIVER, UserHandle.USER_CURRENT);
- if ((null != receiverName) && !receiverName.isEmpty()) {
- ComponentName eventReceiver = ComponentName.unflattenFromString(receiverName);
- // construct a PendingIntent targeted to the restored component name
- // for the media button and register it
- Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
- // the associated intent will be handled by the component being registered
- mediaButtonIntent.setComponent(eventReceiver);
- PendingIntent pi = PendingIntent.getBroadcast(mContext,
- 0/*requestCode, ignored*/, mediaButtonIntent, 0/*flags*/);
- registerMediaButtonIntent(pi, eventReceiver);
- }
- }
-
- /**
- * Helper function:
* Set the new remote control receiver at the top of the RC focus stack.
* precondition: mediaIntent != null, target != null
*/