From d6d32cc2038d1e6bc3a4baebf0e9e720c165454f Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 14 Apr 2016 22:21:41 +0200 Subject: [PATCH] Fix/Suppress Lint errors --- .../microg/gms/common/api/ResultCallbackHandler.java | 2 +- .../gms/location/NativeLocationClientImpl.java | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java b/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java index 071a6d74..61242930 100644 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java +++ b/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java @@ -25,7 +25,7 @@ import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.ResultCallback; class ResultCallbackHandler 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; diff --git a/play-services-location/src/main/java/org/microg/gms/location/NativeLocationClientImpl.java b/play-services-location/src/main/java/org/microg/gms/location/NativeLocationClientImpl.java index 500e5e05..7555b806 100644 --- a/play-services-location/src/main/java/org/microg/gms/location/NativeLocationClientImpl.java +++ b/play-services-location/src/main/java/org/microg/gms/location/NativeLocationClientImpl.java @@ -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));