Skip to content
Snippets Groups Projects
Commit 0b7b7fed authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of fm.lnx.1.0-00017.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
981111   I940706d3f587b38449a5f07dadbec04f68f5c9c0   Add two new callbacks for FM start/stop.

Change-Id: I970dc70e41fe76eab42ebf18e69a53e88cf84e8a
CRs-Fixed: 981111
parents ae4a636c 2178470f
Branches
No related tags found
No related merge requests found
...@@ -3197,6 +3197,16 @@ public class FMRadio extends Activity ...@@ -3197,6 +3197,16 @@ public class FMRadio extends Activity
Log.d(LOGTAG, "mServiceCallbacks.onA2DPConnectionstateChanged :"); Log.d(LOGTAG, "mServiceCallbacks.onA2DPConnectionstateChanged :");
A2DPConnectionState(state); A2DPConnectionState(state);
} }
public void onFmAudioPathStarted() {
Log.d(LOGTAG, "mServiceCallbacks.onFmAudioPathStarted:");
mSpeakerButton.setClickable(true);
mMuteButton.setClickable(true);
}
public void onFmAudioPathStopped() {
Log.d(LOGTAG, "mServiceCallbacks.onFmAudioPathStopped:");
mSpeakerButton.setClickable(false);
mMuteButton.setClickable(false);
}
}; };
private void registerFMSettingListner() { private void registerFMSettingListner() {
......
...@@ -1065,12 +1065,22 @@ public class FMRadioService extends Service ...@@ -1065,12 +1065,22 @@ public class FMRadioService extends Service
} }
mPlaybackInProgress = true; mPlaybackInProgress = true;
configureAudioDataPath(true); configureAudioDataPath(true);
try {
mCallbacks.onFmAudioPathStarted();
} catch(RemoteException e) {
e.printStackTrace();
}
} }
private void stopFM() { private void stopFM() {
Log.d(LOGTAG, "In stopFM"); Log.d(LOGTAG, "In stopFM");
configureAudioDataPath(false); configureAudioDataPath(false);
mPlaybackInProgress = false; mPlaybackInProgress = false;
try {
mCallbacks.onFmAudioPathStopped();
} catch(RemoteException e) {
e.printStackTrace();
}
} }
private void resetFM(){ private void resetFM(){
......
...@@ -2719,6 +2719,12 @@ public class FMStats extends Activity { ...@@ -2719,6 +2719,12 @@ public class FMStats extends Activity {
public void onA2DPConnectionstateChanged(boolean state){ public void onA2DPConnectionstateChanged(boolean state){
Log.d(LOGTAG, "mServiceCallbacks.onA2DPConnectionstateChanged :"); Log.d(LOGTAG, "mServiceCallbacks.onA2DPConnectionstateChanged :");
} }
public void onFmAudioPathStarted() {
Log.d(LOGTAG, "mServiceCallbacks.onFmAudioPathStarted:");
}
public void onFmAudioPathStopped() {
Log.d(LOGTAG, "mServiceCallbacks.onFmAudioPathStopped:");
}
}; };
/* Radio Vars */ /* Radio Vars */
private Handler mHandler = new Handler(); private Handler mHandler = new Handler();
......
...@@ -48,4 +48,6 @@ interface IFMRadioServiceCallbacks ...@@ -48,4 +48,6 @@ interface IFMRadioServiceCallbacks
void onRecordingStarted(); void onRecordingStarted();
void onSeekNextStation(); void onSeekNextStation();
void onA2DPConnectionstateChanged(boolean state); void onA2DPConnectionstateChanged(boolean state);
void onFmAudioPathStarted();
void onFmAudioPathStopped();
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment