GNSS Model Name constant string and comment updates

Addressing API review feedback
Removed string, returning Null instead
Updated comments

Bug: 73951626
Test: Runs on device w/GnssLogger
Change-Id: I54d05a7ae000e9ff52ec1f6646f83aed7de81b94
This commit is contained in:
Wyatt Riley
2018-03-15 09:14:43 -07:00
parent 8c55e8c306
commit 49097c0b99
4 changed files with 13 additions and 13 deletions

View File

@@ -23,6 +23,7 @@ import static android.Manifest.permission.WRITE_SECURE_SETTINGS;
import android.Manifest;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
@@ -233,12 +234,6 @@ public class LocationManager {
public static final String HIGH_POWER_REQUEST_CHANGE_ACTION =
"android.location.HIGH_POWER_REQUEST_CHANGE";
/**
* The value returned by {@link LocationManager#getGnssHardwareModelName()} when the hardware
* does not support providing the actual value.
*/
public static final String GNSS_HARDWARE_MODEL_NAME_UNKNOWN = "Model Name Unknown";
/**
* Broadcast intent action for Settings app to inject a footer at the bottom of location
* settings.
@@ -2176,7 +2171,9 @@ public class LocationManager {
/**
* Returns the model year of the GNSS hardware and software build.
*
* May return 0 if the model year is less than 2016.
* <p> More details, such as build date, may be available in {@link #getGnssHardwareModelName()}.
*
* <p> May return 0 if the model year is less than 2016.
*/
public int getGnssYearOfHardware() {
try {
@@ -2190,10 +2187,12 @@ public class LocationManager {
* Returns the Model Name (including Vendor and Hardware/Software Version) of the GNSS hardware
* driver.
*
* Will return {@link LocationManager#GNSS_HARDWARE_MODEL_NAME_UNKNOWN} when the GNSS hardware
* abstraction layer does not support providing this value.
* <p> No device-specific serial number or ID is returned from this API.
*
* <p> Will return null when the GNSS hardware abstraction layer does not support providing
* this value.
*/
@NonNull
@Nullable
public String getGnssHardwareModelName() {
try {
return mService.getGnssHardwareModelName();