Этот коммит содержится в:
Anton Tananaev
2018-05-06 16:44:56 -07:00
родитель bcde8388d6
Коммит 3c11216334
+5 -2
Просмотреть файл
@@ -1,5 +1,5 @@
/* /*
* Copyright 2015 - 2017 Anton Tananaev (anton.tananaev@gmail.com) * Copyright 2015 - 2018 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.
@@ -17,6 +17,7 @@ package org.traccar.client;
import android.location.Location; import android.location.Location;
import android.location.LocationManager; import android.location.LocationManager;
import android.os.Build;
import java.util.Date; import java.util.Date;
@@ -37,7 +38,9 @@ public class Position {
accuracy = location.getAccuracy(); accuracy = location.getAccuracy();
} }
this.battery = battery; this.battery = battery;
this.mock = location.isFromMockProvider(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
this.mock = location.isFromMockProvider();
}
} }
private long id; private long id;