Skip to content
Snippets Groups Projects
Commit e1a4ab0c authored by Mingbo Zhang's avatar Mingbo Zhang Committed by Gerrit - the friendly Code Review server
Browse files

Fix null pointer exception in FMRadioService

CRs-Fixed: 992487
Change-Id: Iba131108d2b358678e4894dfedfbbf9d784c8217
parent 38993a97
No related branches found
No related tags found
No related merge requests found
......@@ -967,7 +967,8 @@ public class FMRadioService extends Service
if (isFmOn() && getResources()
.getBoolean(R.bool.def_headset_next_enabled)) {
try {
mCallbacks.onSeekNextStation();
if ((mServiceInUse) && (mCallbacks != null))
mCallbacks.onSeekNextStation();
}catch (RemoteException e) {
}
}
......@@ -1066,7 +1067,8 @@ public class FMRadioService extends Service
mPlaybackInProgress = true;
configureAudioDataPath(true);
try {
mCallbacks.onFmAudioPathStarted();
if ((mServiceInUse) && (mCallbacks != null))
mCallbacks.onFmAudioPathStarted();
} catch(RemoteException e) {
e.printStackTrace();
}
......@@ -1077,7 +1079,8 @@ public class FMRadioService extends Service
configureAudioDataPath(false);
mPlaybackInProgress = false;
try {
mCallbacks.onFmAudioPathStopped();
if ((mServiceInUse) && (mCallbacks != null))
mCallbacks.onFmAudioPathStopped();
} catch(RemoteException e) {
e.printStackTrace();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment