Added an API to query GPS hardware version info
Change-Id: Ic45357d30da350759f56c9d061e60196acb3255b
This commit is contained in:
@@ -20,6 +20,7 @@ import com.android.internal.location.ProviderProperties;
|
||||
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -1907,6 +1908,21 @@ public class LocationManager {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the system information of the GPS hardware.
|
||||
* May return 0 if GPS hardware is earlier than 2016.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public int getGpsYearOfHardware() {
|
||||
try {
|
||||
return mService.getGpsYearOfHardware();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "RemoteException in getGpsSystemInfo: ", e);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends additional commands to a location provider.
|
||||
* Can be used to support provider specific extensions to the Location Manager API
|
||||
|
||||
Reference in New Issue
Block a user