Этот коммит содержится в:
Anton Tananaev
2015-02-06 10:01:13 +13:00
родитель 4f94c51e11
Коммит 82ce44b64d
2 изменённых файлов: 6 добавлений и 5 удалений
+5 -5
Просмотреть файл
@@ -1,5 +1,5 @@
/* /*
* Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com) * Copyright 2013 - 2015 Anton Tananaev (anton.tananaev@gmail.com)
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -67,15 +67,15 @@ public class PositionProvider {
if (useFine) { if (useFine) {
try { try {
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, period, 0, fineLocationListener); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, period, 0, fineLocationListener);
} catch (Exception ex) { } catch (Exception e) {
StatusActivity.addMessage(context.getString(R.string.status_provider_missing));
} }
} }
if (useCoarse) { if (useCoarse) {
try { try {
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, period, 0, coarseLocationListener); locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, period, 0, coarseLocationListener);
} catch (Exception ex) { } catch (Exception e) {
StatusActivity.addMessage(context.getString(R.string.status_provider_missing));
} }
} }
handler.postDelayed(updateTask, period); handler.postDelayed(updateTask, period);
+1
Просмотреть файл
@@ -43,5 +43,6 @@
<string name="status_location_update">Location update</string> <string name="status_location_update">Location update</string>
<string name="status_preference_update">Preference update</string> <string name="status_preference_update">Preference update</string>
<string name="status_connectivity_change">Connectivity change</string> <string name="status_connectivity_change">Connectivity change</string>
<string name="status_provider_missing">Missing location provider</string>
</resources> </resources>