summaryrefslogtreecommitdiffstats
path: root/fmapp2/src
Commit message (Collapse)AuthorAgeFilesLines
* fm: Remove unwanted media button key event listenersstable/cm-13.0-ZNH5YKamal Negi2016-07-143-36/+1
| | | | | | | | | | When FM is turned off, fm app is still listening to media key events (play, pause etc.) which results in other media consuming apps to be starved of Media Key events. Remove unwanted media button listeners so that other media resources can receive key events. Change-Id: Ib43f8b89e07928326c2af771a7465981e1690470
* fmapp2: Allow value for the default fm recording duration to be overlayed.Ankit Gupta2016-04-212-2/+11
| | | | | | Issue-id: YAM-144 Change-Id: Iea23ae9842012aab35d2291c75edf406af921bbd (cherry picked from commit 0ac486a41abf2eca3cd0412465dc6273bcdb7872)
* Route audio to connected A2DP headset on turn on.Rupesh Tatiya2016-04-192-1/+6
| | | | | | | | | | If BT is connected after FM app launch and then FM is turned off and then turned on, audio gets routed to wired headset. Check if A2DP device is connected every time FM is turned on. Also set the UI icon to correct image. CRs-Fixed: 996689 Change-Id: I7314075f1652a1b99b906b674a98dfc12179e9cf
* Handle orientation change in FM appKamal Negi2016-04-191-0/+7
| | | | | | | | | | | | | | A configuration change (such as a change in screen orientation, language, input devices, etc) causes current activity to be destroyed, going through the activity lifecycle process of onPause(), onStop(), and onDestroy() as appropriate. If the activity had been in the foreground or visible to the user, once onDestroy() is called in that instance then a new instance of the activity will be created. Change will ensure that activity doesn't get restarted on orientation configuration changes. Change-Id: Ie991c90528834dd6106a586dccdd20a11a701fab
* Fix null pointer exception in FMRadioServiceMingbo Zhang2016-04-191-3/+6
| | | | | CRs-Fixed: 992487 Change-Id: Iba131108d2b358678e4894dfedfbbf9d784c8217
* Reset FM audio settings on off.Rupesh Tatiya2016-03-232-7/+7
| | | | | | | | When FM is either turned off or factory reset is done or headset is pulled out, unmute the audio and restore audio path to system default. CRs-Fixed: 981687 Change-Id: Ibb9f18e49fdcd9f07cea4006748bab48bd87216c
* Add two new callbacks for FM start/stop.Rupesh Tatiya2016-03-224-2/+30
| | | | | | | When FM is stopped, UI elements like speaker button and mute button should be disabled and they should be enabled when FM is started. Change-Id: I940706d3f587b38449a5f07dadbec04f68f5c9c0
* Restore default wired headset on FM power offRupesh Tatiya2016-03-221-2/+11
| | | | | | | | During factory reset, repeated FM on/off during a session were resulting in selection of previous audio route. This restores the route to default. CRs-Fixed: 972818 Change-Id: Ie2d3759363151bf991f890cd58155e184ad3331e
* Update mute API usage to fix pops and consistencyDhananjay Kumar2016-03-221-9/+8
| | | | | | | | | Remove deprecated setStreamMute API and instead control volume of audio track. Since we are controlling mute/unmute state of FM audio track, we don't have to save/restore it for other audio applications. CRs-Fixed: 966690 Change-Id: I242c63c3edd988ed4b85e631b857d0696935cb76
* Need to update UI in onResume though fmservice not boundMingbo Zhang2016-03-221-8/+8
| | | | | CRs-Fixed: 972557 Change-Id: I7a87f897c29b033c46e9dc3b4d9d99a0eb46e7e4
* Do not disable FM receiver on Music Service commandsRupesh Tatiya2016-03-221-12/+3
| | | | | | | | | Music service command pause should be handled in similar way to audio focus loss. If not done so, FM playback will be stopped and won't be restarted when music service stops. CRs-Fixed: 967670 Change-Id: Ied04bd305fee393668c72b4f46f6bfaf0be49088
* Disable/enable radio on factory resetRupesh Tatiya2016-03-221-2/+3
| | | | | | | | Recording was failing to stop on factory reset. Also mute button status was not being reset. Also, FM Radio should also be restarted. CRs-Fixed: 968376 Change-Id: If9966a887a09a5fd6813637b61b075616362ff39
* Request for audio focus on activity resumeRupesh Tatiya2016-03-221-17/+30
| | | | | | | | | FM might lose audio focus and go in the pause state. Hence request audio focus during resume. Otherwise, activity displayed might be FM but audio source might be something else like music. CRs-Fixed: 966644 Change-Id: I681b51f3a54abbc04223c60496aa3049b6769a1f
* Check for audio focus before enabling audio pathRupesh Tatiya2016-03-221-0/+6
| | | | | | | | | | In scenarios where FM has lost audio focus and FM service is running, we end up enabling FM audio path when A2DP is disconnected. This results in more than one audio source being played simultaneously. Enable FM audio path only when FM has audio focus. CRs-Fixed: 967753 Change-Id: I8d5f28cb9ce3545908362e83e787fcc43394a0ac
* Stop recording only if its storage is unmountedRupesh Tatiya2016-03-221-12/+18
| | | | | | | | | Stop FM recording only if the storage where it was saving file is unmounted and not on unmounting of any other storage as done before. CRs-Fixed: 964047 Change-Id: Ic9dc2ca3ef2c9c91400156be47da4a6c8620ce8c Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
* Change value of mSpeakerPhoneOn when BT becomes on or offjuncao2016-03-221-0/+5
| | | | | | | Signed-off-by: juncao <juncao@codeaurora.org> Change-Id: I1dcd614614326bc6fc5da15f8f64ca5312b79da3 CRs-Fixed: 963817
* Reset notch filter only if it is set.Rupesh Tatiya2016-03-221-11/+16
| | | | | | | | | | | | | | | Everytime there is data activity, notch filter settings need to be updated. This request gets queued and executed after a delay of 10 seconds. The update request might take 2 seconds in the worst case. Data activity might change very rapidly resulting in large number of RESET_NOTCH_FILTER messages being put queue before the first request itself is processed. In such scenario, multiple requests are processed together and they will take time to execute greater than ANR threashold time. CRs-Fixed: 958512 Change-Id: I78521f425d7419f3a3d577cc573560d3601b1b1e
* FM: Fix ANR due to incorrect error handling in stopRecordingDibyendu Roy2016-03-221-11/+9
| | | | | | | | | | | | stopRecording() API gets called from onRecordingStopped() callback function. As a result, when recording can't be stopped successfully in error scenarios, stopRecording() gets called in loop. This fix removes the call stopRecording() from callback function and does the required UI update. CRs-Fixed: 943288 Change-Id: I0e2ea2adeb0c603f16541d04a5a244bc1fcd51d7
* FM: stop AudioTrack before switching output devicekexiao2016-03-222-8/+5
| | | | | | | | | | When FM sound comes out from speaker, turn off FM then the sound come out from headset for 0.5s. Make sure the AudioTrack is stopped before switching output device. CRs-Fixed: 940232 Change-Id: I55da27408371cad4af90a7ec3dc7e8a52736096c
* Change FM off button to release media and audio resources.Rupesh Tatiya2016-03-222-71/+23
| | | | | | | | | | | | | | | | | | | | When FM application is launched, no other Media consuming application can receive key events (play, pause etc.) because FM service is the owner of MediaSession and AudioFocus. This does not bode well for user experience. Change the behaviour of FM off button so that we release MediaSession and AudioFocus so that other applications can work. The same behaviour is enabled when antenna is pulled out. We differentiate FM off from remote bluetooth headset start/stop i.e. when remote headset does start/stop, it starts/stops FM. This means that if user presses FM off button, user has to explicitly turn it on again. Also remove old FM Media Button Intent receiver as it is deprecated. CRs-Fixed: 936190 Change-Id: I32fef8e43b226a260d5483b40f5825926c023e62
* fmapp2: de-select A2DP audio route on A2DP disconnection.Rupesh Tatiya2016-03-221-0/+1
| | | | | | | | | When audio is routed from wired headset to Bluetooth headset and Bluetooth is disconnected, Audio goes to speaker instead of wired headset. De-select Bluetooth and let audio routing policy select correct device. CRs-Fixed: 943979 Change-Id: I4f9a446bc0dd7749e62a79c8b8531094572045f6
* fmapp2: Allow switching between wired and Bluetooth headsetRupesh Tatiya2016-03-222-18/+59
| | | | | | | | Remove previous restriction that audio can not be switched between wired and Bluetooth headset as Android Audio framework puts no such restriction. CRs-Fixed: 945076 Change-Id: I1cd683c5cdc584a799749e3b147a6e8b4be45248
* FM: Regional requirement for FMXuebo Li2016-03-221-3/+44
| | | | | | | | | - Add resource to customize FM-recorder files name format. - Add resource to customize the save path of FM-recorder files. - Add resource to customize media type. Change-Id: I5d547ec691d44621b19b2c8435c290b8eafeabc5 CRs-Fixed: 933506
* Revert "FMRecorder : Save to a private temporary file while recording"Xuebo Li2016-03-221-15/+5
| | | | | | This reverts commit 92871d4e2a9fb803a046d5fc3109ca5b5e8aeddb. Change-Id: Iff2ffa10e00b05cdcc9ca3a1f59b5525247f4b03
* FM: update fm app to use device loopbackDhananjay Kumar2016-03-221-4/+59
| | | | | | | Update fm app to use device loopback for playback on headset, headphone or speaker. Change-Id: I44642858cc9a42fad0fad2ad3f8487aaa624d35e
* FMRecorder : Save to a private temporary file while recordingstaging/for-cm13.0Danesh M2016-02-191-5/+15
| | | | | | | While recording save to a temporary private file and once finished, move to external storage Change-Id: If82a84beeffe2ea8e5ba4bf7e93e4f3d6203e10f
* Fm : Update India bandsDanesh M2016-02-191-12/+3
| | | | Change-Id: I1727b585865b422ef5124a3da2d2be384f9fdfa1
* FMRadio : Fix headphone iconEd Falk2016-02-191-4/+1
| | | | | | | | Original headphones were mis-matched w.r.t. default/selected. This change normalizes the icon. Also fixes a couple compiler warnings in FMRadio.java Change-Id: Iee383bc23455562f21c3c431d5b291506e0e3e13
* FMRadio : Fix settings UI bugsEd Falk2016-02-191-12/+6
| | | | | | | | | Setting any user-defined parameter caused the band to switch from user-defined to Indonesia. Fixed. Also removed some bogus localization while I was there. Issue-Id: CYNGNOS-778 Change-Id: I256f04eab39b820b33676bf598322d480d6dfa44
* FMRadio : Localization of band typesEd Falk2016-02-191-616/+44
| | | | | | | | | | | | | Previously, FmRadio could only display the type names for English and two dialects of Chinese, despite already having a full set of localized names in the resources. This change moves the names from <array>s to <string>s and then uses them in PresetStation.java This looks like a massive change, but it's mostly moving strings to different resource files. Change-Id: I6be12d05f9efdec7ec189d30f625d7f82746b5a6 Issue-id: CYNGNOS-995
* FMRadio : improved band selectionEd Falk2016-02-192-1/+29
| | | | | | | | | | | Now tries to obtain the location from the telephone network instead of locale. This will select the band based on where the user actually *is*, rather than based on their language selection. If the telephone network fails, falls back and uses the locale. Change-Id: Id05f399d9f14911004fd3bca98230deb31ae768d Issue-id: CYNGNOS-738
* FMRadio : cleaned up band selection codeEd Falk2016-02-191-59/+60
| | | | | | | | | Based on the code reviews on my previous commit, my earlier code (which was admittedly slapped together in a hurry) was too sloppy. this is a more elegant solution. Change-Id: I08fc64ad628a3c8cb9e634310b89ac8abae2d7c8 Issue-id: CYNGNOS-738
* FMRadio : Select band based on countryEd Falk2016-02-191-1/+72
| | | | | | | | | Checks the locale country code, and if found in the lists of known codes, returns the appropriate regional band. If not, accepts the default from resources as before. Change-Id: Icaa98ded11e548afc8be446e7bc80a1066bee873 Issue-id: CYNGNOS-738
* FMRadio : Keep track of scanned frequencies in serviceDanesh M2016-02-193-17/+31
| | | | | | | | By keeping track of scanned frequencies in the service, this allows us to fetch it when the activity is resumed and not rely on having active callbacks. Change-Id: Idea9cab3e5fd2a789333c3f126416e0102613aa8
* FMRadio : Ensure scan state is kept in syncDanesh M2016-02-193-0/+24
| | | | | | | | | | | In the middle of a scan, the user could navigate away from the activity, during which the scan could've finished. The activity is no longer synchronized with the service and causes issues where the dialog for scan keeps showing...etc Fix this by syncing state in onResume issue-id: CRACKLING-529 Change-Id: Ief3138e4d6e157ad0b060dc3aced18668959f4e1
* FM: The collect channel disappear when quit FMlijun.xie2016-02-191-0/+1
| | | | | | | | | | | | | | | [Procedures]: 1.FM->collect one channel 2.Quit FM and enter FM 3.Check the collect channel [Expect results]: The collect channel exist [Actual results]: The collect channel disappear Change-Id: I50f9f8d849d7d1bfab1159be51e9ad0ef2bac0a9
* Fix status text to reflect when FM is enabled.Martin Brabham2016-02-191-1/+5
| | | | Change-Id: Idbb39cdd8c6eb016d4644d9e31290507d17ce820
* FM: fix mRadioTextScroller usage in transmitter activityHamster Tian2016-02-191-2/+25
| | | | | | | | | | | | | | | | | | | | | | | Reproduction of NPE: 1. Add "ro.fm.transmitter=true" to build.prop 2. Reboot the device 3. FM Transmitter app appears 4. Remove headphones (if plugged in) and open the app Reason: mRadioTextScroller is not initialized when activity is being created. When transmission starts (which will happen automatically on app start if antenna is available) enableRadioOnOffUI will be called, and calls to mRadioTextScroller in enableRadioOnOffUI will fail. Fix: Add initialization for mRadioTextScroller. Also added some mRadioTextScroller.mOriginalString operations just like FMRadio.java Change-Id: I81d0c924801446258e3a62f479f0f9b31b7f15a8
* FM: respect hw.fm.internal_antennaDhruv Paranjape2016-02-191-5/+3
| | | | | | PS2: Patch from here: http://forum.xda-developers.com/showpost.php?p=60580714&postcount=86 Change-Id: Ic3104de252bac108c925e7cd5f50d9e89ca63779
* FMRadio : Launch station list automatically after scanDanesh M2016-02-191-1/+23
| | | | | | | Give status update post scaning for categories Fix %s showing in stationList Change-Id: I1845f0cdeb0051bcfb951e2fef791a016fa81ef4
* FM: reenable radio text visibility after station info updatedEdward Wang2016-02-191-1/+2
| | | | | | | | After radio station info updated, radio text view is set to GONE. We need turn it back on if FM is still enabled. Change-Id: I7acea564a352693e19d9e6d934d641327b90be7e (cherry picked from commit 086a510710b073b4b5c5cd4a0f72341dc6690b84)
* FM: always use overlay default countryEdward Wang2016-02-192-7/+7
| | | | | Change-Id: I2acbbde684e7581124577f6e929397279d97cb41 (cherry picked from commit 087fb5a9128f8a9d96289815b1ae4be2ea98981a)
* FM: retune last frequency when resume after callEdward Wang2016-02-191-0/+4
| | | | | | | | FM Activity may not available to send down frequency again after phone call. Then FM service need retune saved frequency. Change-Id: I26f0921bd8878331c3dedc6e8ff96873dd5a84a6 (cherry picked from commit 4b86c869026d6ef7504d2cecca4c3db9fa9d8c4b)
* FM2: missing materialization changeslinuxxxxx2016-02-193-58/+6
| | | | | Change-Id: I7d80a889cfecda0deb2916cb0d514dac3d92dc9d Signed-off-by: linuxxxxx <joey@cyanogenmoditalia.it>
* fmapp2: materializelinuxx2016-02-192-20/+12
| | | | | | | | | * Update colors * Vectors * Off state messages Change-Id: I0186edda6c408fcde3dd98cd886ced775adbd938 Signed-off-by: linuxx <joey@cyanogenmoditalia.it>
* New Material iconMichael Bestas2016-02-191-1/+1
| | | | | | * Created by Jovie Brett Bardoles Change-Id: I84945542cc60aa7fc0b28c720282a0b38c732604
* FMRadio: add IndonesiaRaj Yengisetty2016-02-192-2/+11
| | | | | | | | Use a new id so that old values aren't changed Looked into reordering the list but the index is used in a few places - going to skip on that change for now Change-Id: Ib70634d28588ce23a37fcc7b760019c07af3412f
* FM: Cleanup resourcesMichael Bestas2016-02-196-24/+20
| | | | | | | | | | | * Remove unused layouts/drawables * Remove unused strings * Remove CAF chinese translations * Improve strings * Move debug strings/arrays to debug_strings.xml/debug_arrays.xml * Move transmitter strings to transmit_strings.xml Change-Id: I5b391b459aefa75a6c3edbc525d471a3bcefb2be
* FMRadio : Switch file extension to aacDanesh M2016-02-191-1/+1
| | | | Change-Id: I7e44a8835c450697765c41fafdf325c1e2043b49
* FMRadio : Call unregister in onPauseDanesh M2016-02-191-0/+7
| | | | Change-Id: I3f063967c06d43e0fe99d08dea5e3e65a3943e8b