mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-10-31 16:32:39 +00:00
Fix/Suppress Lint errors
This commit is contained in:
parent
f8210c6edc
commit
d6d32cc203
2 changed files with 6 additions and 8 deletions
|
@ -25,7 +25,7 @@ import com.google.android.gms.common.api.Result;
|
|||
import com.google.android.gms.common.api.ResultCallback;
|
||||
|
||||
class ResultCallbackHandler<R extends Result> extends Handler {
|
||||
private static final String TAG = "GmsResultCallbackHandler";
|
||||
private static final String TAG = "GmsResultCbackHandler";
|
||||
public static final int CALLBACK_ON_COMPLETE = 1;
|
||||
public static final int CALLBACK_ON_TIMEOUT = 2;
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import com.google.android.gms.location.LocationRequest;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("MissingPermission")
|
||||
public class NativeLocationClientImpl {
|
||||
private final static String TAG = "GmsToNativeLocClient";
|
||||
private final static Criteria DEFAULT_CRITERIA = new Criteria();
|
||||
|
@ -72,8 +73,7 @@ public class NativeLocationClientImpl {
|
|||
|
||||
public Location getLastLocation() {
|
||||
Log.d(TAG, "getLastLocation()");
|
||||
return locationManager.getLastKnownLocation(
|
||||
locationManager.getBestProvider(DEFAULT_CRITERIA, true));
|
||||
return locationManager.getLastKnownLocation(locationManager.getBestProvider(DEFAULT_CRITERIA, true));
|
||||
}
|
||||
|
||||
public void requestLocationUpdates(LocationRequest request, LocationListener listener) {
|
||||
|
@ -88,9 +88,8 @@ public class NativeLocationClientImpl {
|
|||
i.putExtras(bundle);
|
||||
pendingCount.put(pendingIntent, request.getNumUpdates());
|
||||
nativePendingMap.put(pendingIntent, PendingIntent.getActivity(context, 0, i, 0));
|
||||
locationManager.requestLocationUpdates(request.getInterval(),
|
||||
request.getSmallestDesplacement(), makeNativeCriteria(request),
|
||||
nativePendingMap.get(pendingIntent));
|
||||
locationManager.requestLocationUpdates(request.getInterval(), request.getSmallestDesplacement(),
|
||||
makeNativeCriteria(request), nativePendingMap.get(pendingIntent));
|
||||
}
|
||||
|
||||
public void requestLocationUpdates(LocationRequest request, LocationListener listener, Looper
|
||||
|
@ -133,8 +132,7 @@ public class NativeLocationClientImpl {
|
|||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent.hasExtra(LocationManager.KEY_LOCATION_CHANGED)) {
|
||||
PendingIntent pendingIntent = intent.getExtras().getParcelable
|
||||
(EXTRA_PENDING_INTENT);
|
||||
PendingIntent pendingIntent = intent.getExtras().getParcelable(EXTRA_PENDING_INTENT);
|
||||
try {
|
||||
intent.putExtra(FusedLocationProviderApi.KEY_LOCATION_CHANGED,
|
||||
intent.getParcelableExtra(LocationManager.KEY_LOCATION_CHANGED));
|
||||
|
|
Loading…
Reference in a new issue