diff options
| author | 2013-05-10 16:16:45 -0700 | |
|---|---|---|
| committer | 2013-05-10 16:16:45 -0700 | |
| commit | 83d551898d4a441475e9582cd573cebb563a6ef3 (patch) | |
| tree | 30fa2b3e383af8c0e9b6f4d31000ce348ae9d379 | |
| parent | 24f18fc85005fa11bcebc2775f7b88b22662a708 (diff) | |
| parent | f8e54846146c234aa9a201f54eea70df93ee56e2 (diff) | |
am f8e54846: am 9766caed: Merge "Add an API to determine if a route is connecting." into jb-mr2-dev
* commit 'f8e54846146c234aa9a201f54eea70df93ee56e2':
Add an API to determine if a route is connecting.
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | media/java/android/media/MediaRouter.java | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt index 762b3b687ed5..0994df253b47 100644 --- a/api/current.txt +++ b/api/current.txt @@ -12335,6 +12335,7 @@ package android.media { method public int getVolume(); method public int getVolumeHandling(); method public int getVolumeMax(); + method public boolean isConnecting(); method public boolean isEnabled(); method public void requestSetVolume(int); method public void requestUpdateVolume(int); diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java index 52a946a0e627..8b99de488aac 100644 --- a/media/java/android/media/MediaRouter.java +++ b/media/java/android/media/MediaRouter.java @@ -1357,12 +1357,24 @@ public class MediaRouter { } /** - * @return true if this route is enabled and may be selected + * Returns true if this route is enabled and may be selected. + * + * @return True if this route is enabled. */ public boolean isEnabled() { return mEnabled; } + /** + * Returns true if the route is in the process of connecting and is not + * yet ready for use. + * + * @return True if this route is in the process of connecting. + */ + public boolean isConnecting() { + return mStatusCode == STATUS_CONNECTING; + } + void setStatusInt(CharSequence status) { if (!status.equals(mStatus)) { mStatus = status; |