Loading location/java/android/location/GpsStatus.java +9 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,15 @@ public final class GpsStatus { return status; } /** * Builds an empty GpsStatus. * * @hide */ static GpsStatus createEmpty() { return new GpsStatus(); } private GpsStatus() { } Loading location/java/android/location/LocationManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -1922,12 +1922,17 @@ public class LocationManager { GnssStatus gnssStatus = mGnssStatusListenerManager.getGnssStatus(); int ttff = mGnssStatusListenerManager.getTtff(); // even though this method is marked nullable, there are legacy applications that expect // this to never return null, so avoid breaking those apps if (gnssStatus != null) { if (status == null) { status = GpsStatus.create(gnssStatus, ttff); } else { status.setStatus(gnssStatus, ttff); } } else if (status == null) { status = GpsStatus.createEmpty(); } return status; } Loading Loading
location/java/android/location/GpsStatus.java +9 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,15 @@ public final class GpsStatus { return status; } /** * Builds an empty GpsStatus. * * @hide */ static GpsStatus createEmpty() { return new GpsStatus(); } private GpsStatus() { } Loading
location/java/android/location/LocationManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -1922,12 +1922,17 @@ public class LocationManager { GnssStatus gnssStatus = mGnssStatusListenerManager.getGnssStatus(); int ttff = mGnssStatusListenerManager.getTtff(); // even though this method is marked nullable, there are legacy applications that expect // this to never return null, so avoid breaking those apps if (gnssStatus != null) { if (status == null) { status = GpsStatus.create(gnssStatus, ttff); } else { status.setStatus(gnssStatus, ttff); } } else if (status == null) { status = GpsStatus.createEmpty(); } return status; } Loading