Check API version
Этот коммит содержится в:
@@ -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,8 +38,10 @@ public class Position {
|
|||||||
accuracy = location.getAccuracy();
|
accuracy = location.getAccuracy();
|
||||||
}
|
}
|
||||||
this.battery = battery;
|
this.battery = battery;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||||
this.mock = location.isFromMockProvider();
|
this.mock = location.isFromMockProvider();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user