summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-02Import translations. DO NOT MERGEGeoff Mendal
Change-Id: I40043ca19c291e4dd396b7f8f2eeabeeab4223c6 Auto-generated-cl: translation import
2016-03-02Merge "Added public notification for calls" into nyc-devBrandon Maxwell
2016-03-01Added public notification for callsBrandon Maxwell
+ Previously we didn't have a notification for ongoing/incoming calls to show users when they're on the lock screen and have their notification settings set to 'hide sensitive notification content'. This change adds that notification, to disambiguate between notifications for calls and other notifications such as those for missed calls. + This notification matches the version shown when the device is unlocked except that we choose to not show work call information as that is related to contact info. See http://screen/zYZseSS1d54 Bug: 13387034 Change-Id: I02290e585a9b46eb9207adf8258a67d29882518b
2016-03-02Merge "Provide better talkback for buttons in calling." into nyc-devQi Wang
2016-03-01Provide better talkback for buttons in calling.Qi Wang
1. Announce "unmute" if the mute button is checked 2. Annouce "hide dialpad" if the show dialpad button is checked. Bug: 24296610 Change-Id: Idc3b78e49ca5ef2c01b2ab671b5e34ba54cc4f4e
2016-03-01Merge changes from topic 'mockDelete' into nyc-devBrandon Maxwell
* changes: Using FilteredNumCompat for unblock Updating AsyncQueryHandler with FilteredNumCompat Implementing Compat class for Filtering
2016-03-01Merge "Fix bug of secondary call info disappear after switching calls." into ↵Qi Wang
nyc-dev
2016-03-01Merge "Accessibility: announce the active call after switching calls." into ↵Qi Wang
nyc-dev
2016-03-01Using FilteredNumCompat for unblockBrandon Maxwell
+ This CL updates the FilteredNumberAsyncQueryHandler#unblock methods to use the FilteredNumberCompat class to properly choose between the original Dialer blocking implementation and new blocking. Bug=26664600 Change-Id: I528604eeafa4f7fa131cb1898d57a87708ba58b5
2016-03-01Updating AsyncQueryHandler with FilteredNumCompatBrandon Maxwell
+ FilteredNumberAsyncQueryHandler needs to make use of the FilteredNumberCompat class to unsure that it is blocking/unblocking/checking the proper solution, based on which is enabled. + This CL updates the queryHandler to the FilteredNumberCompat class for the hasBlockedNumbers, isBlockedNumber, and blockNumber operations. Bug=26664600 Change-Id: I5ecf6e340a97e94bf696a0e6c4a7e922b791a6f5
2016-03-01Implementing Compat class for FilteringBrandon Maxwell
+ FilteredNumberCompat contains the logic needed to switch between the Dialer implemented number filtering and the new number filtering. + Direct uses of the Dialer Filtering code should be replaced to use the fields in this class Bug=26664600 Change-Id: I42db3da4b5ed124a88488713f56ccab7b2290309
2016-03-01Merge "Fix issue where video does not un-pause after call waiting ↵Tyler Gunn
dismissed." into nyc-dev
2016-03-01Fix issue where video does not un-pause after call waiting dismissed.Tyler Gunn
When an incoming call waiting call is received, the VideoPauseController sends a "pause" command to the video provider. However, upon dismissing the call waiting call, the foreground call was not being unpaused. Bug: 21815566 Change-Id: I637ab70d1b2adf4510dd87e5d56e233b1a3e065d
2016-02-29Accessibility: announce the active call after switching calls.Qi Wang
Bug: 24200862 Change-Id: I102a9c8406984a9dd4cfd8b91ec77254aa984dd5
2016-02-29Allowing FilteredNumberAQHelper to be stubbedGilles Franck Mevaa
Just by making its apis not 'final'. Change-Id: Ia05b8562fc983da0fdd76b83b5240f30eb2faf7b
2016-02-29Import translations. DO NOT MERGEGeoff Mendal
Change-Id: I45682d6276baa030162b08194a1557f675207ea0 Auto-generated-cl: translation import
2016-02-27Merge "Add back button to dialpad in callui" into nyc-devQi Wang
2016-02-26Add back button to dialpad in calluiQi Wang
Bug: 27231038 Change-Id: I721de663ae09489dd51cea0a70c5bca2d272fbf7
2016-02-26Merge "Disabling Dialer ringing feature" into nyc-devBrandon Maxwell
2016-02-25Disabling Dialer ringing featureBrandon Maxwell
+ Need to remove for DP1 Bug=27367182 Bug=27353237 Change-Id: If370c942534bba3fd98c11447e1a83a2bf0cdfe1
2016-02-26Merge "Respect setting for incoming call to vibrate" into nyc-devBrandon Maxwell
2016-02-25Respect setting for incoming call to vibrateBrandon Maxwell
+ Previously the Dialer would always play a vibration pattern for incoming calls, regardless of whether the user toggled the vibrate setting off. This change causes the Dialer to respect that setting. Bug=27353237 Change-Id: I65987cea0c13dd50fba5e0edacfba88b3e3ecbd7
2016-02-25Add resource files for voicemail archive.Sarmad Hashmi
+ Added strings + Added voicemail button + Added voicemail archive in overflow menu + Added archive button icon from https://icons.googleplex.com/#icon=ic_archive&search=archive BUG=22797391 Change-Id: I926604592b43b2c67a57c137ef7ef7bb5c4cc4bf
2016-02-25Merge "Remove duplicated accessibility focus in favorite contacts." into nyc-devQi Wang
2016-02-24Mark missed calls as read on swipe.Sarmad Hashmi
When swiping to a new tab, if the previous tab that the user was in was the call history tab, all missed calls are marked as read and the tab count is updated. Also fixes b/27153608 and clearing of missed calls on orientation change. BUG=27136093 BUG=27153608 BUG=27154514 Change-Id: I5be31b1a3978784b941fb8e1af22f93fb6ca944a
2016-02-24Remove duplicated accessibility focus in favorite contacts.Qi Wang
Bug: 24062579 Change-Id: I1cc84175776b0b3e5a81e0aad3c47e26b10cf849
2016-02-24Fix bug of secondary call info disappear after switching calls.Qi Wang
Bug: 27323979 Change-Id: I6f66052dee5ef3be32df4008835d0918bba54e50
2016-02-24[DO NOT MERGE] Display missed call count for call log.Sarmad Hashmi
The number of unread missed calls are displayed beside the Call Log as a badge. All unread missed calls are bolded under the call log tab. When exiting the call log tab, all unread calls are marked as read. When interacting with an unread missed call card while in the call log tab, it will subtract 1 from the badge. Cherry-picked from d118a8e0d8a68499398504f350f81175118e2ecf BUG=24953555 Change-Id: If91a3bc89197465934cb773955e4bec005d6d14e
2016-02-24Fix bug where 00:00 duration is shown for voicemails without a duration.Sarmad Hashmi
Instead of showing a 00:00 duration, nothing is displayed. When the content is loaded, the duration field for the call log entry associated with the voicemail is updated with the duration fetched from the mediaplayer. The proper duration is then displayed in MM:SS format. BUG=24175525 Change-Id: I1cafebae4fcbc749f573accfcf8833b598675f0b (cherry picked from commit 6f3016d9065564bf09a5759f16563a05abbe105d)
2016-02-24Collapsed and expanded voicemail cards show duration.Sarmad Hashmi
The duration of the voicemail is appended to the date in a MM:SS format. BUG=25728257 Change-Id: I9c3e392336877c2ca69707e14c6ab2eed6f2e7c6 (cherry picked from commit 3f70c27d80b2e3176159f561248f95612d66afe2)
2016-02-24Add voicemail_archive_table to dialer database.Sarmad Hashmi
Stores the voicemail content and call log information for all the voicemails that have been archived. BUG=22797391 Change-Id: I1b5d98ab17d3d6f32d6797c2c51b50bcd29cd5fa (cherry picked from commit ca67dbe4b04a6eaaa106d40c199bc86d64d94e40)
2016-02-24Merge "Fix FAB position after hang up with secondary call." into nyc-devQi Wang
2016-02-24Merge "Bumping Dialer version for weekly build" into nyc-devBrandon Maxwell
2016-02-24Bumping Dialer version for weekly buildBrandon Maxwell
Change-Id: I862c3122a4b98d190e9d8c9e70e05af1fff60715
2016-02-24Import translations. DO NOT MERGEGeoff Mendal
Change-Id: Id406e6ee0cd7028b446108487b39dfda82d23e7d Auto-generated-cl: translation import
2016-02-23Fix FAB position after hang up with secondary call.Qi Wang
Bug: 27294280 Change-Id: Ia5d6580ef77078b3d489efc0b73c2bbd2b4d2b77
2016-02-23Adding tests for blockNumberBrandon Maxwell
+ The ContactsCommon MockContentProvider now supports mocking the insert method, added necessary tests. + Updating tests with changes to MockContentProvider + No longer need to call attachInfo on provider + Need to explicitly pass null for vararg query parameters when a null values are expected. Bug=26664600 Change-Id: I5316f8ee8bb442aa36d807781124a936f09e0a9c
2016-02-24Merge "Added tests for FilteredNumAsyncQueryHandler" into nyc-devBrandon Maxwell
2016-02-24Merge "Let InCallActivity handle resize config change." into nyc-devQi Wang
2016-02-23Let InCallActivity handle resize config change.Qi Wang
Bug: 26862821,27250655 Change-Id: I1b5c35846f1a2d2dedaf2df9abf1f522270b1638
2016-02-23Added tests for FilteredNumAsyncQueryHandlerBrandon Maxwell
+ MockContentProvider currently only supports mocking queries, so the tests added are specifically for methods that perform queries. + Previously wasn't tested, added some tests since I'll be making more changes to this class. Bug=26664600 Change-Id: I901fbaa7f753cb3004102e5e912aa0481f03ccb0
2016-02-23Merge "Apply lower case project name convention" into nyc-devTa-wei Yen
2016-02-23Apply lower case project name conventionTa-wei Yen
gradle project name for PhoneCommon, ContactsCommon and InCallUI changed to all lower case. Removed googledialer project, no long needed. Bug:26676586 Change-Id: Ice2496321d7a23ddb93e9a7363b8150a1bf43d4c
2016-02-23Merge "Display manage conference button." into nyc-devQi Wang
2016-02-23Merge "settings.gradle for Dialer" into nyc-devTa-wei Yen
2016-02-23Change position of "answer as video" to swipe right.Tyler Gunn
In b/21124069, a change was made to make swipe-right default to answer as audio, and swipe down be answer as video for a video call. UX expressed that it makes more sense to use the previous swipe-right to answer as video and swipe down to answer as audio. Bug: 27097678 Change-Id: Id495d985dfb5c6dafdf45493ce37ad8b47dd5f7e
2016-02-23Merge "Use dimen value for bottom space height under dialpad in landscape ↵Qi Wang
mode." into nyc-dev
2016-02-23Merge "Use 60/40 layout with two column view for dialerpad in landscape ↵Qi Wang
mode." into nyc-dev
2016-02-22settings.gradle for DialerTa-wei Yen
+ settings.gradile + android.properties + repositories.properties These files will be symlinked to the root by the manifest. repositories.properties is left empty for now. This file is used to reference external repositories, and we don't need any right now. + gradlew Script for gradle wrapper. Recommended to copy into project instead of referencing. Bug:26676586 Change-Id: I2a18a94dd47def97ea89407b52d6f4434dd7e665
2016-02-22Remove CallAudioStateCompatSailesh Nepal
Now that we're no longer backwards compatible with Lollipop we don't need CallAudioStateCompat. See ag/870962 for more info. Bug: 26676586 Change-Id: I7c754d89a6c9e13bf5a004b7c5b15b88b9aff9ad
2016-02-22[Gradle] Allow dialer to be compiled as a librarySailesh Nepal
This CL adds a new build-library.gradle file for AOSP dialer. This allows the dialer to be built as a library that can be included from GoogleDialer. Switching to a library project meant making two other changes: - changed all switch statements that used resources to if statements. This was required because resource IDs are not final in library projects. - changed InCalUI code to import com.android.dialer.R instead of com.android.incallui.R. See http://b.android.com/82743 for more info on why this is required. src-N isn't supported yet. Also, this isn't the ideal project layout. In the future we should consider switching to the following layout: - dialer/incallui/ <- incall UI as an independent library project - dialer/dialerlib/ <- dialer code as an independent library project - dialer/app <- skelent app that builds a standalone dialer AOSP app Bug: 26676586 Change-Id: I07fbee4d33cc683539e4f8b3953c93f1427af9d7
2016-02-22Add gradle build file for DialerSailesh Nepal
This CL adds gradle build files for Dialer. Currently the build file in the InCallUI code only builds resources. Eventually we'll want to make that a standalone library project. Things missing from this CL: - support for src-N - build target for dialer-library to be included by GoogleDialer Bug: 26676586 Change-Id: Ie91cb720cf17fd8579b04a01287e140b39d0c42f
2016-02-22Merge "Remove Lollipop support for InCallUI" into nyc-devSailesh Nepal
2016-02-22Remove Lollipop support for InCallUISailesh Nepal
This CL removes support for running dialer on Android L MR1. The change allows us to switch from the system SDK to the public SDK. This is useful for the following reasons: - makes it easier to switch to gradle - makes it easier to migrate GoogleDialer to google3 - reduces maintenance overhead for unused code Currently there's no plan to release Dialer on Lollipop. If or when we decide to support Lollipop we can consider switching back to the system SDK and restoring the comapatiblity code. Bug: 26676586 Change-Id: Idac9e6e19f1d21c9261c1b0d0ff3e3ca4aab980b
2016-02-22Merge "Show Briefcase icon not displayed in in-call UI for work SIP calls" ↵Tony Mak
into nyc-dev
2016-02-22Show Briefcase icon not displayed in in-call UI for work SIP callsTony Mak
Current dialer always queries PhoneLookup._ID and uses this as a contact ID. In pre-N, contact id of non-sip query is stored in PhoneLookup._ID and it is actually a mistake. This problem does not exist in sip query, and contact id of sip query is stored in Data.CONTACT_ID. So it is a "bug" in dialer that we use PhoneLooup._ID for sip query as it is not really a contacat id. The bug of missing work badge may not be the only issue introduced by this. In N, the issue is get fixed in framework, PhoneLookup.CONTACT_ID is introduced. We should access PhoneLookup.CONTACT_ID no matter what phone lookup query we are having. The ideal case is we always use PhoneLookup.CONTACT_ID for retrieving contact id, but given that we need to support in pre-N, we need to query PhoneLookup._ID for contact id in non-sip query in pre-N. BUG:27242975 Change-Id: Id14378e3dce5b07629ffe0c6e83c3d107fbb468e
2016-02-22Merge "Update AOSP dialer icon to match GoogleDialer's" into nyc-devSailesh Nepal
2016-02-22Import translations. DO NOT MERGEGeoff Mendal
Change-Id: Icd9d6198f9c34ed4c3ffc367481d678b3f3a2b7d Auto-generated-cl: translation import
2016-02-22Merge "Fix crash when rotating in multi-window mode." into nyc-devQi Wang
2016-02-21Update AOSP dialer icon to match GoogleDialer'sSailesh Nepal
Change-Id: Iae6e362f0a5492ad3488093ffd0c7d5ae718cc38
2016-02-21Revert "Move AppCompatPreferenceActivity to ContactsCommon"Wenyi Wang
This reverts commit 16be8a259c6d4c0484160d900f411b436ba10ef5. Change-Id: Iaf0ea70a40198c483f33894cfc0b75a4cd916afb (cherry picked from commit 0fba743c4eb9ff0832e03156c6a09fa7a15a8a40)
2016-02-20Merge "Bumping Dialer version for dp1 drop" into nyc-devBrandon Maxwell
2016-02-20Merge "Null check for accountComponentName and Id" into nyc-devBrandon Maxwell
2016-02-20Merge "Make voicemail playback seek control visible in RTL." into nyc-devNancy Chen
2016-02-19Null check for accountComponentName and IdBrandon Maxwell
+ Voicemails were coming in with a null accountComponent name causing crashes. It's unknown why this is the case. This change checks for null prior to attempting to use these fields. Bug=27202534 Change-Id: I48f4f188bd75aca7204d74aecfe76f2c75b730d8
2016-02-20Merge "Add activity, file paths and fileProvider to manifest (AOSP)" into ↵Wenyi Wang
nyc-dev
2016-02-20Merge "Reduce cutoff size for multi-window layouts to 500dp." into nyc-devNancy Chen
2016-02-19Bumping Dialer version for dp1 dropBrandon Maxwell
Change-Id: Ife8d46be20fd9bbc0e4f6b8f600dda5c6f41d3ab
2016-02-19Add activity, file paths and fileProvider to manifest (AOSP)Wenyi Wang
This is similar to ag/862828 to enable sharing contacts using background service. Bug 26918008 Bug 26906732 Bug 22083005 Change-Id: I63e4e77d35d0584de6df9803c268abef45ef9e73
2016-02-19Merge "Checking for READ_CONTACTS permission" into nyc-devBrandon Maxwell
2016-02-18Checking for READ_CONTACTS permissionBrandon Maxwell
+ When starting a call, we attempt to look up the ContactInfo. This lookup needs to be guarded by a check to ensure we have permission to read the contacts. Bug=27078247 Change-Id: Id68de80d3acd721642b79ff81fda5d9decd67e7b
2016-02-18Fix crash when rotating in multi-window mode.Qi Wang
Bug: 26863771 Change-Id: I048fae6cf36115f14d1b5a91e6c0c20e4130a2ae
2016-02-18Use 60/40 layout with two column view for dialerpad in landscape mode.Qi Wang
Bug: 26861613 Change-Id: Id0eee2c75f89625ee83ce19e5b57822bf0784a68
2016-02-18Make voicemail playback seek control visible in RTL.Nancy Chen
Since the seek control is a circle, we don't need to make it automirror in RTL mode. Once that attribute is removed, the color returns. Bug: 26641930 Change-Id: Ia789a07110a420cbb8e5d24fa062bcaa6c9c0975
2016-02-18Use dimen value for bottom space height under dialpad in landscape mode.Qi Wang
Bug: 26861613 Change-Id: I14340ab7f0d0a8ed2880e59a716d9ee63c39d28a
2016-02-18Merge "IMS-VT: Do not create new surface when setting surface dimensions" ↵Tyler Gunn
into nyc-dev
2016-02-18IMS-VT: Do not create new surface when setting surface dimensionsOmkar Kolangade
Do not create a new surface when setting surface dimensions. Bug: 27246093 Change-Id: I3f66594141d548680427a7579169647018ca7eb7
2016-02-18Merge "Fix end-call FAB position when dial pad is shown on device rotate." ↵Tyler Gunn
into nyc-dev
2016-02-18Fix end-call FAB position when dial pad is shown on device rotate.Tyler Gunn
Move the "onDialpadVisibilityChange()" listener call so that it takes place regardless if the dialpad is animated on show-hide. That listener triggers "updateFabPosition()" in callCardFragment, which repositions the fab. Bug: 27170964 Change-Id: I56588695c633205f4ebaac6d9685f543b9e09293
2016-02-18Reduce cutoff size for multi-window layouts to 500dp.Nancy Chen
Hammerhead devices have a height of 544dp, which currently means they will be adopting the layout of the multi-window UI. Change the threshold so that Hammerhead uses the full-screen layout. Note that this does not affect NYC because Hammerhead is not supported, but will be necessary for unbundled dialer. Bug: 27173087 Change-Id: I6250de91b6e0c5c197d599422ae7a74c27ed9628
2016-02-18Merge "IMS-VT: Moving upgradeVideoRequest handling to InCallPresenter" into ↵Tyler Gunn
nyc-dev
2016-02-18IMS-VT: Moving upgradeVideoRequest handling to InCallPresenterTyler Gunn
When user pressed back key InCallActviity will be destroyed and corresponding listeners in VideoCallPresenter will be removed. Due to this we are unable to process the upgrade request. Moving handling of upgrade Video Call request handling from VideoCallPresenter to InCallPresenter as InCallPresenter will be available even InCallActivity is destroyed. Bug: 27130345 Change-Id: Idbd3348cea9d712c8391319d091642d1fd60964f
2016-02-18Merge "IMS-VT: Use original dialed string instead of normalized dial string" ↵Tyler Gunn
into nyc-dev
2016-02-17Display manage conference button.Nancy Chen
The manage conference button allows the user to unmerge or hangup one of the calls in the conference for GMS and IMS devices. + Move the original manage_conference_call_button layout file to layout-h600dp and layout-w600dp-land directories. + Fix the button to the bottom of the call card fragment. + Split the "manage conference call" text into two pieces and put "conference call" on one side and "manage" with the icon on the other. Bug: 26253432 Change-Id: I9853f479d4e45591026fe7a753eca1ef69b00e42
2016-02-17Display video call fragment for multi-window mode.Nancy Chen
Resizing for fitting video call fragment in multi-window mode. Bug: 26253432 Change-Id: Ie1adc15314cff80d7c2f8f27a19a770e3608d280
2016-02-17Merge "Make secondary info visible for multi-window InCallUI." into nyc-devNancy Chen
2016-02-17Bumping Dialer versionBrandon Maxwell
+ Dropping this build into prebuilts and we'll need a new version for it. Change-Id: I52f877b49e3c8be51f69f60efadabef18f6fbfb4 (cherry picked from commit abfb4b010d4613e6a057c39a288bb8d1f0c1d8e6)
2016-02-17IMS-VT: Use original dialed string instead of normalized dial stringOmkar Kolangade
- The smart dial search normalizes the dial string, and removes anything other than digits. - Original dial string contains the number which is actully entered by user. Pass this number as it is as dialed number validation is already taken care by APIs defined in PhoneNumberUtils. Bug=27074055 Change-Id: Ib85750abef765ace127ebde3a13397b4dfad48fa
2016-02-17Import translations. DO NOT MERGEGeoff Mendal
Change-Id: I2605b8ef19815d0fe91978a4d1348c4056e2478d Auto-generated-cl: translation import
2016-02-17DO NOT MERGE: Listener of spam eventsGilles Franck Mevaa
Getting rid of the Manager to have the ButtonRenderer directly communicate changes to an event listener. Implementation changes in ag/863096. Cherry picking to nyc-dev to fix build. Change-Id: I8061116f0b91e3f5a6a3a6eac09fe2171ebcbd5c
2016-02-16Enabling Dialer to play ringtonesBrandon Maxwell
+ The code to make the Dialer play was disabled behind flags, this change flips the flags so the Dialer is responsible for playing the ringtone. + The in-code flag will be removed later after a QA pass of the feature. - Removed TODO to respect Do Not Disturb, see b/26936902 Bug=18702990 Change-Id: I773c1c614beb61a6763daccd2903d9d341cf4dc0
2016-02-15Import translations. DO NOT MERGEGeoff Mendal
Change-Id: I3e1611ee27e39f9f081ad208dc2fada056d3b7e1 Auto-generated-cl: translation import
2016-02-12Added ackAllMilestones api to PausableExecutorBrandon Maxwell
+ This API simplifies tests, specifically their tearDown methods. Rather than needing to call ackMilestone numerous times to clean up at the end of the test, this method can be called to ensure that the thread running the production code isn't blocked on the tests. Change-Id: I60730c52491b315aee571f4ae158f62d34b0dbc2
2016-02-12Integrating DialerRingtoneManager and InCallTonePlayerBrandon Maxwell
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
2016-02-12Merge "Renaming DialerRingtoneManager Test file" into nyc-devBrandon Maxwell
2016-02-12Merge "Implementing class to play tones" into nyc-devBrandon Maxwell
2016-02-12Merge "Added factory to create ToneGenerators" into nyc-devBrandon Maxwell
2016-02-12Renaming DialerRingtoneManager Test fileBrandon Maxwell
+ Renamed the DialerRingtoneManager, but forgot to rename the test file. Change-Id: I3de6223e023787657d2573ba3f620fc9bc013181
2016-02-12Implementing class to play tonesBrandon Maxwell
+ This class will be used by the DialerRingtoneManager to play the call waiting tone. It exists to encapsulate the logic to play a tone in a background thread. + The TonePlayer includes some thread safety measures, but is not meant to be shared between multiple threads Bug=26936401 Change-Id: I630959177fcd8a4fc8ba7d3153f036746ad8a4cf
2016-02-12Added factory to create ToneGeneratorsBrandon Maxwell
+ This class was needed to abstract out the logic to determine which stream to play tones though. It is also easily mockable for use. Change-Id: I382239483871b9aa1ef6fece7e66ea95f3fba4e0