Catch missing permissions exception

Этот коммит содержится в:
Anton Tananaev
2016-01-29 22:05:47 +13:00
родитель 821f24ce2b
Коммит c60f749a67
+10 -2
Просмотреть файл
@@ -82,13 +82,21 @@ public class TrackingController implements PositionProvider.PositionListener, Ne
if (isOnline) { if (isOnline) {
read(); read();
} }
positionProvider.startUpdates(); try {
positionProvider.startUpdates();
} catch (SecurityException e) {
Log.w(TAG, e);
}
networkManager.start(); networkManager.start();
} }
public void stop() { public void stop() {
networkManager.stop(); networkManager.stop();
positionProvider.stopUpdates(); try {
positionProvider.stopUpdates();
} catch (SecurityException e) {
Log.w(TAG, e);
}
handler.removeCallbacksAndMessages(null); handler.removeCallbacksAndMessages(null);
} }