diff options
| author | 2013-05-10 16:13:44 -0700 | |
|---|---|---|
| committer | 2013-05-10 16:13:44 -0700 | |
| commit | f8e54846146c234aa9a201f54eea70df93ee56e2 (patch) | |
| tree | 95382cddb313e7932390ad066abe75894c5464e8 | |
| parent | dfbf21e5914b5f45627c4c6af0bad8c840c79f92 (diff) | |
| parent | 9766caedf0657615f739d4e441ab9f2fa71aa709 (diff) | |
am 9766caed: Merge "Add an API to determine if a route is connecting." into jb-mr2-dev
* commit '9766caedf0657615f739d4e441ab9f2fa71aa709':
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 b498e8e9fa45..1118a4b50180 100644 --- a/api/current.txt +++ b/api/current.txt @@ -12271,6 +12271,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 9168d4633b2f..990ce80a21b9 100644 --- a/media/java/android/media/MediaRouter.java +++ b/media/java/android/media/MediaRouter.java @@ -1354,12 +1354,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; |