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() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
trackController.update(recordingTrackId != PreferencesUtils.RECORDING_TRACK_ID_DEFAULT,
|
trackController.update(recordingTrackId != PreferencesUtils.RECORDING_TRACK_ID_DEFAULT, recordingTrackPaused);
|
||||||
recordingTrackPaused);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -304,7 +304,7 @@ public class TrackRecordingService extends Service {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBinder onBind(Intent intent) {
|
public IBinder onBind(Intent intent) {
|
||||||
return null;
|
return binder;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1059,7 +1059,7 @@ public class TrackRecordingService extends Service {
|
|||||||
* each service instance. For more details, see the following bug:
|
* each service instance. For more details, see the following bug:
|
||||||
* http://code.google.com/p/android/issues/detail?id=6426.
|
* 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;
|
private TrackRecordingService trackRecordingService;
|
||||||
|
|
||||||
public ServiceBinder(TrackRecordingService trackRecordingService) {
|
public ServiceBinder(TrackRecordingService trackRecordingService) {
|
||||||
|
|||||||
-4
@@ -119,10 +119,6 @@ public class TrackRecordingServiceConnection {
|
|||||||
* Gets the track recording service if bound. Returns null otherwise
|
* Gets the track recording service if bound. Returns null otherwise
|
||||||
*/
|
*/
|
||||||
public ITrackRecordingService getServiceIfBound() {
|
public ITrackRecordingService getServiceIfBound() {
|
||||||
if (trackRecordingService != null) {
|
|
||||||
setTrackRecordingService(null);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return trackRecordingService;
|
return trackRecordingService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user