summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2016-02-12 10:37:35 -0800
committerBrandon Maxwell <maxwelb@google.com>2016-02-12 16:25:04 -0800
commit054559b6c279a0149ac6473d1897f6db817c5a57 (patch)
tree9e61a9bf511d4fe77355c515514fc564a6c1fe89 /InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
parent37274fedfe39d25ac91acb80c41d15aa78adc0f1 (diff)
Integrating DialerRingtoneManager and InCallTonePlayer
This change makes the Call Waiting tone actually play during the Call Waiting use case. + Plugging InCallTonePlayer into the DialerRingtoneManager in the StatusBarNotifier + Test fixes + Added tests for when Dialer ringing is disabled + Added tests for DialerRingtoneManager#playCallWaitingTone - Removed unneeded @NeededForTesting annotations from InCallTonePlayer since they won't be stipped out by proguard. Change-Id: I49a83d2a7fe6edf5f9ec88db973a5f37e307f23a
Diffstat (limited to 'InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java')
-rw-r--r--InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java b/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
index 2a94f226f..be7fffbcb 100644
--- a/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
+++ b/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
@@ -39,7 +39,6 @@ import javax.annotation.concurrent.NotThreadSafe;
* Class responsible for playing in-call related tones in a background thread. This class only
* allows one tone to be played at a time.
*/
-@NeededForTesting
public class InCallTonePlayer {
public static final int TONE_CALL_WAITING = 4;
@@ -62,7 +61,6 @@ public class InCallTonePlayer {
* @throws NullPointerException if audioModeProvider, toneGeneratorFactory, or executor are
* {@code null}.
*/
- @NeededForTesting
public InCallTonePlayer(AudioModeProvider audioModeProvider,
ToneGeneratorFactory toneGeneratorFactory, PausableExecutor executor) {
mAudioModeProvider = Preconditions.checkNotNull(audioModeProvider);
@@ -73,7 +71,6 @@ public class InCallTonePlayer {
/**
* @return {@code true} if a tone is currently playing, {@code false} otherwise
*/
- @NeededForTesting
public boolean isPlayingTone() {
return mNumPlayingTones != null && mNumPlayingTones.getCount() > 0;
}
@@ -85,7 +82,6 @@ public class InCallTonePlayer {
* @throws IllegalStateException if a tone is already playing
* @throws IllegalArgumentException if the tone is invalid
*/
- @NeededForTesting
public void play(int tone) {
if (isPlayingTone()) {
throw new IllegalStateException("Tone already playing");
@@ -155,7 +151,6 @@ public class InCallTonePlayer {
/**
* Stops playback of the current tone.
*/
- @NeededForTesting
public void stop() {
if (mNumPlayingTones != null) {
mNumPlayingTones.countDown();