diff options
author | troub1emaker-sys <51954037+troub1emaker-sys@users.noreply.github.com> | 2021-07-30 08:07:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-30 08:07:47 -0700 |
commit | 1ff2867fb8645c5792656bd4b822d70bbce44ec2 (patch) | |
tree | 4a98057d682d2f0afe1bb263c4acddc73d19f3e7 | |
parent | 9d70d22c8bc1db1771777e979c5f95a773ab18ef (diff) | |
download | mobly-bundled-snippets-1ff2867fb8645c5792656bd4b822d70bbce44ec2.tar.gz |
Add the Rpc for `AudioManager#isMusicActive` (#144)
-rw-r--r-- | src/main/java/com/google/android/mobly/snippet/bundled/AudioSnippet.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/google/android/mobly/snippet/bundled/AudioSnippet.java b/src/main/java/com/google/android/mobly/snippet/bundled/AudioSnippet.java index fbdb5d0..9b4874f 100644 --- a/src/main/java/com/google/android/mobly/snippet/bundled/AudioSnippet.java +++ b/src/main/java/com/google/android/mobly/snippet/bundled/AudioSnippet.java @@ -43,6 +43,11 @@ public class AudioSnippet implements Snippet { return mAudioManager.isMicrophoneMute(); } + @Rpc(description = "Returns whether or not any music is active.") + public boolean isMusicActive() { + return mAudioManager.isMusicActive(); + } + @Rpc(description = "Gets the music stream volume.") public Integer getMusicVolume() { return mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); |