forked from upstream-mirrors/OpenTracks
Fixed ServiceBinder for TrackRecordingService.
This commit is contained in:
@@ -99,8 +99,7 @@ public class TrackListActivity extends AbstractTrackActivity implements FileType
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
trackController.update(recordingTrackId != PreferencesUtils.RECORDING_TRACK_ID_DEFAULT,
|
||||
recordingTrackPaused);
|
||||
trackController.update(recordingTrackId != PreferencesUtils.RECORDING_TRACK_ID_DEFAULT, recordingTrackPaused);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+2
-2
@@ -304,7 +304,7 @@ public class TrackRecordingService extends Service {
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
return binder;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1059,7 +1059,7 @@ public class TrackRecordingService extends Service {
|
||||
* each service instance. For more details, see the following bug:
|
||||
* http://code.google.com/p/android/issues/detail?id=6426.
|
||||
*/
|
||||
private static class ServiceBinder implements ITrackRecordingService {
|
||||
private static class ServiceBinder extends android.os.Binder implements ITrackRecordingService {
|
||||
private TrackRecordingService trackRecordingService;
|
||||
|
||||
public ServiceBinder(TrackRecordingService trackRecordingService) {
|
||||
|
||||
-4
@@ -119,10 +119,6 @@ public class TrackRecordingServiceConnection {
|
||||
* Gets the track recording service if bound. Returns null otherwise
|
||||
*/
|
||||
public ITrackRecordingService getServiceIfBound() {
|
||||
if (trackRecordingService != null) {
|
||||
setTrackRecordingService(null);
|
||||
return null;
|
||||
}
|
||||
return trackRecordingService;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user