forked from organicmaps/organicmaps
[android] fix: Code review fixes №3.
This commit is contained in:
parent
eef36d0e43
commit
5352aad4a0
1 changed files with 2 additions and 7 deletions
|
@ -34,11 +34,6 @@ public class TrackRecorderWakeService extends IntentService
|
|||
super("TrackRecorderWakeService");
|
||||
}
|
||||
|
||||
protected void cancel()
|
||||
{
|
||||
mWaitMonitor.countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void onHandleIntent(Intent intent)
|
||||
{
|
||||
|
@ -58,7 +53,7 @@ public class TrackRecorderWakeService extends IntentService
|
|||
mWaitMonitor.await(TIMEOUT_MS, TimeUnit.MILLISECONDS);
|
||||
} catch (InterruptedException ignored) {}
|
||||
|
||||
synchronized (getClass())
|
||||
synchronized (TrackRecorderWakeService.class)
|
||||
{
|
||||
sServiceRef = null;
|
||||
}
|
||||
|
@ -77,6 +72,6 @@ public class TrackRecorderWakeService extends IntentService
|
|||
{
|
||||
TrackRecorderWakeService svc = getService();
|
||||
if (svc != null)
|
||||
svc.cancel();
|
||||
svc.mWaitMonitor.countDown();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue