Loading location/java/android/location/LocationRequest.java +1 −5 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import android.annotation.SystemApi; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.content.pm.PackageManager; import android.location.flags.Flags; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -555,10 +554,7 @@ public final class LocationRequest implements Parcelable { */ public @IntRange(from = 0) long getMinUpdateIntervalMillis() { if (mMinUpdateIntervalMillis == IMPLICIT_MIN_UPDATE_INTERVAL) { if (Flags.updateMinLocationRequestInterval()) { return (long) (mIntervalMillis * IMPLICIT_MIN_UPDATE_INTERVAL_FACTOR); } return (long) (mIntervalMillis * LEGACY_IMPLICIT_MIN_UPDATE_INTERVAL_FACTOR); } else { // the min is only necessary in case someone use a deprecated function to mess with the // interval or min update interval Loading location/java/android/location/flags/location.aconfig +0 −47 Original line number Diff line number Diff line Loading @@ -129,46 +129,6 @@ flag { is_fixed_read_only: true } flag { name: "limit_fused_gps" namespace: "location" description: "Limits when GPS can be used for fused location requests" bug: "401885179" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "fix_no_set_position_mode_when_hal_restarts" namespace: "location" description: "Fix setPostionMode() is not called when HAL restarts" bug: "419597768" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "fix_is_in_emergency_anr" namespace: "location" description: "Avoid calling IPC with a lock to avoid deadlock" bug: "355384257" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "update_is_in_emergency_before_on_register" namespace: "location" description: "Update isInEmergency before onRegister() without holding a lock" bug: "355384257" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "gnss_assistance_interface_jni" namespace: "location" Loading @@ -184,13 +144,6 @@ flag { is_fixed_read_only: true } flag { name: "missing_attribution_tags_in_overlay" namespace: "location" description: "Adds missing attribution tags in the Fused and Gnss overlay" bug: "403337028" } flag { name: "location_indicators_enabled" namespace: "location" Loading packages/FusedLocation/src/com/android/location/fused/FusedLocationProvider.java +3 −12 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.content.Intent.ACTION_USER_SWITCHED; import static android.location.LocationManager.GPS_PROVIDER; import static android.location.LocationManager.NETWORK_PROVIDER; import static android.location.LocationRequest.QUALITY_HIGH_ACCURACY; import static android.location.LocationRequest.QUALITY_LOW_POWER; import static android.location.provider.ProviderProperties.ACCURACY_FINE; import static android.location.provider.ProviderProperties.POWER_USAGE_LOW; Loading @@ -35,7 +34,6 @@ import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.location.LocationRequest; import android.location.flags.Flags; import android.location.provider.LocationProviderBase; import android.location.provider.ProviderProperties; import android.location.provider.ProviderRequest; Loading Loading @@ -90,11 +88,7 @@ public class FusedLocationProvider extends LocationProviderBase { public FusedLocationProvider(Context context) { super(context, TAG, PROPERTIES); if (Flags.missingAttributionTagsInOverlay()) { mContext = context.createAttributionContext(ATTRIBUTION_TAG); } else { mContext = context; } mLocationManager = Objects.requireNonNull(mContext.getSystemService(LocationManager.class)); mGpsListener = new ChildLocationListener(GPS_PROVIDER); Loading Loading @@ -175,11 +169,8 @@ public class FusedLocationProvider extends LocationProviderBase { mNlpPresent = mLocationManager.hasProvider(NETWORK_PROVIDER); } boolean requestAllowsGps = Flags.limitFusedGps() ? mRequest.getQuality() == QUALITY_HIGH_ACCURACY && mRequest.getIntervalMillis() <= MAX_GPS_INTERVAL_MS : !mNlpPresent || mRequest.getQuality() < QUALITY_LOW_POWER; boolean requestAllowsGps = mRequest.getQuality() == QUALITY_HIGH_ACCURACY && mRequest.getIntervalMillis() <= MAX_GPS_INTERVAL_MS; long gpsInterval = mGpsPresent && requestAllowsGps ? mRequest.getIntervalMillis() : INTERVAL_DISABLED; Loading packages/FusedLocation/src/com/android/location/gnss/GnssOverlayLocationProvider.java +2 −7 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.location.provider.ProviderProperties.POWER_USAGE_HIGH; import android.annotation.Nullable; import android.content.Context; import android.location.flags.Flags; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; Loading Loading @@ -90,12 +89,8 @@ public class GnssOverlayLocationProvider extends LocationProviderBase { public GnssOverlayLocationProvider(Context context) { super(context, TAG, PROPERTIES); if (Flags.missingAttributionTagsInOverlay()) { Context contextWithAttribution = context.createAttributionContext(ATTRIBUTION_TAG); mLocationManager = contextWithAttribution.getSystemService(LocationManager.class); } else { mLocationManager = context.getSystemService(LocationManager.class); } } void start() { Loading services/core/java/com/android/server/location/gnss/GnssLocationProvider.java +1 −5 Original line number Diff line number Diff line Loading @@ -1485,11 +1485,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements private void restartLocationRequest() { if (DEBUG) Log.d(TAG, "restartLocationRequest"); if (Flags.fixNoSetPositionModeWhenHalRestarts()) { stopNavigating(); } else { setStarted(false); } updateRequirements(); } Loading Loading
location/java/android/location/LocationRequest.java +1 −5 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import android.annotation.SystemApi; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.content.pm.PackageManager; import android.location.flags.Flags; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -555,10 +554,7 @@ public final class LocationRequest implements Parcelable { */ public @IntRange(from = 0) long getMinUpdateIntervalMillis() { if (mMinUpdateIntervalMillis == IMPLICIT_MIN_UPDATE_INTERVAL) { if (Flags.updateMinLocationRequestInterval()) { return (long) (mIntervalMillis * IMPLICIT_MIN_UPDATE_INTERVAL_FACTOR); } return (long) (mIntervalMillis * LEGACY_IMPLICIT_MIN_UPDATE_INTERVAL_FACTOR); } else { // the min is only necessary in case someone use a deprecated function to mess with the // interval or min update interval Loading
location/java/android/location/flags/location.aconfig +0 −47 Original line number Diff line number Diff line Loading @@ -129,46 +129,6 @@ flag { is_fixed_read_only: true } flag { name: "limit_fused_gps" namespace: "location" description: "Limits when GPS can be used for fused location requests" bug: "401885179" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "fix_no_set_position_mode_when_hal_restarts" namespace: "location" description: "Fix setPostionMode() is not called when HAL restarts" bug: "419597768" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "fix_is_in_emergency_anr" namespace: "location" description: "Avoid calling IPC with a lock to avoid deadlock" bug: "355384257" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "update_is_in_emergency_before_on_register" namespace: "location" description: "Update isInEmergency before onRegister() without holding a lock" bug: "355384257" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "gnss_assistance_interface_jni" namespace: "location" Loading @@ -184,13 +144,6 @@ flag { is_fixed_read_only: true } flag { name: "missing_attribution_tags_in_overlay" namespace: "location" description: "Adds missing attribution tags in the Fused and Gnss overlay" bug: "403337028" } flag { name: "location_indicators_enabled" namespace: "location" Loading
packages/FusedLocation/src/com/android/location/fused/FusedLocationProvider.java +3 −12 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import static android.content.Intent.ACTION_USER_SWITCHED; import static android.location.LocationManager.GPS_PROVIDER; import static android.location.LocationManager.NETWORK_PROVIDER; import static android.location.LocationRequest.QUALITY_HIGH_ACCURACY; import static android.location.LocationRequest.QUALITY_LOW_POWER; import static android.location.provider.ProviderProperties.ACCURACY_FINE; import static android.location.provider.ProviderProperties.POWER_USAGE_LOW; Loading @@ -35,7 +34,6 @@ import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.location.LocationRequest; import android.location.flags.Flags; import android.location.provider.LocationProviderBase; import android.location.provider.ProviderProperties; import android.location.provider.ProviderRequest; Loading Loading @@ -90,11 +88,7 @@ public class FusedLocationProvider extends LocationProviderBase { public FusedLocationProvider(Context context) { super(context, TAG, PROPERTIES); if (Flags.missingAttributionTagsInOverlay()) { mContext = context.createAttributionContext(ATTRIBUTION_TAG); } else { mContext = context; } mLocationManager = Objects.requireNonNull(mContext.getSystemService(LocationManager.class)); mGpsListener = new ChildLocationListener(GPS_PROVIDER); Loading Loading @@ -175,11 +169,8 @@ public class FusedLocationProvider extends LocationProviderBase { mNlpPresent = mLocationManager.hasProvider(NETWORK_PROVIDER); } boolean requestAllowsGps = Flags.limitFusedGps() ? mRequest.getQuality() == QUALITY_HIGH_ACCURACY && mRequest.getIntervalMillis() <= MAX_GPS_INTERVAL_MS : !mNlpPresent || mRequest.getQuality() < QUALITY_LOW_POWER; boolean requestAllowsGps = mRequest.getQuality() == QUALITY_HIGH_ACCURACY && mRequest.getIntervalMillis() <= MAX_GPS_INTERVAL_MS; long gpsInterval = mGpsPresent && requestAllowsGps ? mRequest.getIntervalMillis() : INTERVAL_DISABLED; Loading
packages/FusedLocation/src/com/android/location/gnss/GnssOverlayLocationProvider.java +2 −7 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.location.provider.ProviderProperties.POWER_USAGE_HIGH; import android.annotation.Nullable; import android.content.Context; import android.location.flags.Flags; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; Loading Loading @@ -90,12 +89,8 @@ public class GnssOverlayLocationProvider extends LocationProviderBase { public GnssOverlayLocationProvider(Context context) { super(context, TAG, PROPERTIES); if (Flags.missingAttributionTagsInOverlay()) { Context contextWithAttribution = context.createAttributionContext(ATTRIBUTION_TAG); mLocationManager = contextWithAttribution.getSystemService(LocationManager.class); } else { mLocationManager = context.getSystemService(LocationManager.class); } } void start() { Loading
services/core/java/com/android/server/location/gnss/GnssLocationProvider.java +1 −5 Original line number Diff line number Diff line Loading @@ -1485,11 +1485,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements private void restartLocationRequest() { if (DEBUG) Log.d(TAG, "restartLocationRequest"); if (Flags.fixNoSetPositionModeWhenHalRestarts()) { stopNavigating(); } else { setStarted(false); } updateRequirements(); } Loading