Loading api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -4104,7 +4104,6 @@ package android.location { public class Location implements android.os.Parcelable { method public boolean isComplete(); method public void makeComplete(); method public void setExtraLocation(@Nullable String, @Nullable android.location.Location); method public void setIsFromMockProvider(boolean); field public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation"; } Loading api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -1271,7 +1271,6 @@ package android.location { public class Location implements android.os.Parcelable { method public void makeComplete(); method public void setExtraLocation(@Nullable String, @Nullable android.location.Location); field public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation"; } Loading location/java/android/location/Location.java +0 −18 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.location; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; import android.compat.annotation.UnsupportedAppUsage; Loading Loading @@ -1213,23 +1212,6 @@ public class Location implements Parcelable { return null; } /** * Attaches an extra {@link Location} to this Location. This is useful for location providers * to set the {@link #EXTRA_NO_GPS_LOCATION} extra to provide coarse locations for clients. * * @param key the key associated with the Location extra * @param value the Location to attach * @hide */ @TestApi @SystemApi public void setExtraLocation(@Nullable String key, @Nullable Location value) { if (mExtras == null) { mExtras = new Bundle(); } mExtras.putParcelable(key, value); } /** * Returns true if the Location came from a mock provider. * Loading services/core/java/com/android/server/LocationManagerService.java +6 −1 Original line number Diff line number Diff line Loading @@ -2644,7 +2644,12 @@ public class LocationManagerService extends ILocationManager.Stub { if (noGPSLocation == null && lastNoGPSLocation != null) { // New location has no no-GPS location: adopt last no-GPS location. This is set // directly into location because we do not want to notify COARSE clients. location.setExtraLocation(Location.EXTRA_NO_GPS_LOCATION, lastNoGPSLocation); Bundle extras = location.getExtras(); if (extras == null) { extras = new Bundle(); } extras.putParcelable(Location.EXTRA_NO_GPS_LOCATION, lastNoGPSLocation); location.setExtras(extras); } } lastLocation.set(location); Loading services/core/java/com/android/server/location/LocationFudger.java +11 −4 Original line number Diff line number Diff line Loading @@ -16,17 +16,19 @@ package com.android.server.location; import java.io.FileDescriptor; import java.io.PrintWriter; import java.security.SecureRandom; import android.content.Context; import android.database.ContentObserver; import android.location.Location; import android.os.Bundle; import android.os.Handler; import android.os.SystemClock; import android.provider.Settings; import android.util.Log; import java.io.FileDescriptor; import java.io.PrintWriter; import java.security.SecureRandom; /** * Contains the logic to obfuscate (fudge) locations for coarse applications. Loading Loading @@ -177,7 +179,12 @@ public class LocationFudger { private Location addCoarseLocationExtraLocked(Location location) { Location coarse = createCoarseLocked(location); location.setExtraLocation(Location.EXTRA_COARSE_LOCATION, coarse); Bundle extras = location.getExtras(); if (extras == null) { extras = new Bundle(); } extras.putParcelable(Location.EXTRA_COARSE_LOCATION, coarse); location.setExtras(extras); return coarse; } Loading Loading
api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -4104,7 +4104,6 @@ package android.location { public class Location implements android.os.Parcelable { method public boolean isComplete(); method public void makeComplete(); method public void setExtraLocation(@Nullable String, @Nullable android.location.Location); method public void setIsFromMockProvider(boolean); field public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation"; } Loading
api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -1271,7 +1271,6 @@ package android.location { public class Location implements android.os.Parcelable { method public void makeComplete(); method public void setExtraLocation(@Nullable String, @Nullable android.location.Location); field public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation"; } Loading
location/java/android/location/Location.java +0 −18 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.location; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; import android.compat.annotation.UnsupportedAppUsage; Loading Loading @@ -1213,23 +1212,6 @@ public class Location implements Parcelable { return null; } /** * Attaches an extra {@link Location} to this Location. This is useful for location providers * to set the {@link #EXTRA_NO_GPS_LOCATION} extra to provide coarse locations for clients. * * @param key the key associated with the Location extra * @param value the Location to attach * @hide */ @TestApi @SystemApi public void setExtraLocation(@Nullable String key, @Nullable Location value) { if (mExtras == null) { mExtras = new Bundle(); } mExtras.putParcelable(key, value); } /** * Returns true if the Location came from a mock provider. * Loading
services/core/java/com/android/server/LocationManagerService.java +6 −1 Original line number Diff line number Diff line Loading @@ -2644,7 +2644,12 @@ public class LocationManagerService extends ILocationManager.Stub { if (noGPSLocation == null && lastNoGPSLocation != null) { // New location has no no-GPS location: adopt last no-GPS location. This is set // directly into location because we do not want to notify COARSE clients. location.setExtraLocation(Location.EXTRA_NO_GPS_LOCATION, lastNoGPSLocation); Bundle extras = location.getExtras(); if (extras == null) { extras = new Bundle(); } extras.putParcelable(Location.EXTRA_NO_GPS_LOCATION, lastNoGPSLocation); location.setExtras(extras); } } lastLocation.set(location); Loading
services/core/java/com/android/server/location/LocationFudger.java +11 −4 Original line number Diff line number Diff line Loading @@ -16,17 +16,19 @@ package com.android.server.location; import java.io.FileDescriptor; import java.io.PrintWriter; import java.security.SecureRandom; import android.content.Context; import android.database.ContentObserver; import android.location.Location; import android.os.Bundle; import android.os.Handler; import android.os.SystemClock; import android.provider.Settings; import android.util.Log; import java.io.FileDescriptor; import java.io.PrintWriter; import java.security.SecureRandom; /** * Contains the logic to obfuscate (fudge) locations for coarse applications. Loading Loading @@ -177,7 +179,12 @@ public class LocationFudger { private Location addCoarseLocationExtraLocked(Location location) { Location coarse = createCoarseLocked(location); location.setExtraLocation(Location.EXTRA_COARSE_LOCATION, coarse); Bundle extras = location.getExtras(); if (extras == null) { extras = new Bundle(); } extras.putParcelable(Location.EXTRA_COARSE_LOCATION, coarse); location.setExtras(extras); return coarse; } Loading