diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2011-10-12 09:40:17 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-12 09:40:17 -0700 |
commit | 49f61439db7f8960745b0a5664795b5a5ad31ef8 (patch) | |
tree | 4d167c27a94d6d30cf5015206a3a928553a81a47 | |
parent | 34877877bb563e7e20600e6777cca4dc358a12d9 (diff) | |
parent | 09b4d99822678e57ba6ed1568832980ba64be330 (diff) | |
download | frameworks_base-49f61439db7f8960745b0a5664795b5a5ad31ef8.zip frameworks_base-49f61439db7f8960745b0a5664795b5a5ad31ef8.tar.gz frameworks_base-49f61439db7f8960745b0a5664795b5a5ad31ef8.tar.bz2 |
Merge "DO NOT MERGE Fix 5389442 RemoteControlClient javadoc" into ics-mr0
-rw-r--r-- | media/java/android/media/RemoteControlClient.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/media/java/android/media/RemoteControlClient.java b/media/java/android/media/RemoteControlClient.java index 198ae4c..77acfe6 100644 --- a/media/java/android/media/RemoteControlClient.java +++ b/media/java/android/media/RemoteControlClient.java @@ -35,14 +35,27 @@ import android.util.Log; import java.lang.IllegalArgumentException; /** - * TODO javadoc update for ComponentName - PendingIntent change * RemoteControlClient enables exposing information meant to be consumed by remote controls * capable of displaying metadata, artwork and media transport control buttons. - * A remote control client object is associated with a media button event receiver. This + * + * <p>A remote control client object is associated with a media button event receiver. This * event receiver must have been previously registered with * {@link AudioManager#registerMediaButtonEventReceiver(ComponentName)} before the * RemoteControlClient can be registered through * {@link AudioManager#registerRemoteControlClient(RemoteControlClient)}. + * + * <p>Here is an example of creating a RemoteControlClient instance after registering a media + * button event receiver: + * <pre>ComponentName myEventReceiver = new ComponentName(getPackageName(), MyRemoteControlEventReceiver.class.getName()); + * AudioManager myAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); + * myAudioManager.registerMediaButtonEventReceiver(myEventReceiver); + * // build the PendingIntent for the remote control client + * Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON); + * mediaButtonIntent.setComponent(myEventReceiver); + * PendingIntent mediaPendingIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, mediaButtonIntent, 0); + * // create and register the remote control client + * RemoteControlClient myRemoteControlClient = new RemoteControlClient(mediaPendingIntent); + * myAudioManager.registerRemoteControlClient(myRemoteControlClient);</pre> */ public class RemoteControlClient { |