Этот коммит содержится в:
Anton Tananaev
2019-01-06 14:48:47 -08:00
родитель 556856ab5c
Коммит f42ecf9f09
3 изменённых файлов: 101 добавлений и 3 удалений
+16 -2
Просмотреть файл
@@ -1,3 +1,18 @@
/*
* Copyright 2019 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.traccar.client;
import android.annotation.SuppressLint;
@@ -7,7 +22,6 @@ import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.Looper;
import android.widget.Toast;
public class AndroidPositionProvider extends PositionProvider implements LocationListener {
@@ -26,7 +40,7 @@ public class AndroidPositionProvider extends PositionProvider implements Locatio
locationManager.requestLocationUpdates(
provider, distance > 0 || angle > 0 ? MINIMUM_INTERVAL : interval, 0, this);
} catch (RuntimeException e) {
Toast.makeText(context, e.getMessage(), Toast.LENGTH_LONG).show();
listener.onPositionError(e);
}
}