Loading api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -21818,7 +21818,6 @@ package android.location { method public void unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback); method public void unregisterGnssNavigationMessageCallback(android.location.GnssNavigationMessage.Callback); method public void unregisterGnssStatusCallback(android.location.GnssStatus.Callback); field public static final java.lang.String GNSS_HARDWARE_MODEL_NAME_UNKNOWN = "Model Name Unknown"; field public static final java.lang.String GPS_PROVIDER = "gps"; field public static final java.lang.String KEY_LOCATION_CHANGED = "location"; field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled"; location/java/android/location/LocationManager.java +9 −10 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -235,12 +236,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. Loading Loading @@ -2206,7 +2201,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 { Loading @@ -2220,10 +2217,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(); Loading services/core/java/com/android/server/LocationManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.AppOpsManager; import android.app.PendingIntent; Loading Loading @@ -1131,11 +1132,12 @@ public class LocationManagerService extends ILocationManager.Stub { * Returns the model name of the GNSS hardware. */ @Override @Nullable public String getGnssHardwareModelName() { if (mGnssSystemInfoProvider != null) { return mGnssSystemInfoProvider.getGnssHardwareModelName(); } else { return LocationManager.GNSS_HARDWARE_MODEL_NAME_UNKNOWN; return null; } } Loading services/core/java/com/android/server/location/GnssLocationProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -470,7 +470,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // Volatile for simple inter-thread sync on these values. private volatile int mHardwareYear = 0; private volatile String mHardwareModelName = LocationManager.GNSS_HARDWARE_MODEL_NAME_UNKNOWN; private volatile String mHardwareModelName; // Set lower than the current ITAR limit of 600m/s to allow this to trigger even if GPS HAL // stops output right at 600m/s, depriving this of the information of a device that reaches Loading Loading
api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -21818,7 +21818,6 @@ package android.location { method public void unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback); method public void unregisterGnssNavigationMessageCallback(android.location.GnssNavigationMessage.Callback); method public void unregisterGnssStatusCallback(android.location.GnssStatus.Callback); field public static final java.lang.String GNSS_HARDWARE_MODEL_NAME_UNKNOWN = "Model Name Unknown"; field public static final java.lang.String GPS_PROVIDER = "gps"; field public static final java.lang.String KEY_LOCATION_CHANGED = "location"; field public static final java.lang.String KEY_PROVIDER_ENABLED = "providerEnabled";
location/java/android/location/LocationManager.java +9 −10 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -235,12 +236,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. Loading Loading @@ -2206,7 +2201,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 { Loading @@ -2220,10 +2217,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(); Loading
services/core/java/com/android/server/LocationManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.AppOpsManager; import android.app.PendingIntent; Loading Loading @@ -1131,11 +1132,12 @@ public class LocationManagerService extends ILocationManager.Stub { * Returns the model name of the GNSS hardware. */ @Override @Nullable public String getGnssHardwareModelName() { if (mGnssSystemInfoProvider != null) { return mGnssSystemInfoProvider.getGnssHardwareModelName(); } else { return LocationManager.GNSS_HARDWARE_MODEL_NAME_UNKNOWN; return null; } } Loading
services/core/java/com/android/server/location/GnssLocationProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -470,7 +470,7 @@ public class GnssLocationProvider implements LocationProviderInterface { // Volatile for simple inter-thread sync on these values. private volatile int mHardwareYear = 0; private volatile String mHardwareModelName = LocationManager.GNSS_HARDWARE_MODEL_NAME_UNKNOWN; private volatile String mHardwareModelName; // Set lower than the current ITAR limit of 600m/s to allow this to trigger even if GPS HAL // stops output right at 600m/s, depriving this of the information of a device that reaches Loading