Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1acd29dc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Deprecate ProviderRequest APIs" into main

parents fa6dbc29 d1e55517
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -437,7 +437,7 @@ package android.location {
  }

  public class LocationManager {
    method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.INTERACT_ACROSS_USERS}) public void addProviderRequestChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.location.provider.ProviderRequest.ChangedListener);
    method @Deprecated @FlaggedApi("android.location.flags.deprecate_provider_request_apis") @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.INTERACT_ACROSS_USERS}) public void addProviderRequestChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.location.provider.ProviderRequest.ChangedListener);
    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void flushGnssBatch();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void getCurrentLocation(@NonNull android.location.LocationRequest, @Nullable android.os.CancellationSignal, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.location.Location>);
    method @Nullable public String getExtraLocationControllerPackage();
@@ -452,7 +452,7 @@ package android.location {
    method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public boolean isProviderPackage(@Nullable String, @NonNull String, @Nullable String);
    method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.UPDATE_APP_OPS_STATS}) public boolean registerGnssBatchedLocationCallback(long, boolean, @NonNull android.location.BatchedLocationCallback, @Nullable android.os.Handler);
    method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public boolean registerGnssMeasurementsCallback(@NonNull android.location.GnssRequest, @NonNull java.util.concurrent.Executor, @NonNull android.location.GnssMeasurementsEvent.Callback);
    method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void removeProviderRequestChangedListener(@NonNull android.location.provider.ProviderRequest.ChangedListener);
    method @Deprecated @FlaggedApi("android.location.flags.deprecate_provider_request_apis") @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void removeProviderRequestChangedListener(@NonNull android.location.provider.ProviderRequest.ChangedListener);
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@Nullable android.location.LocationRequest, @NonNull android.location.LocationListener, @Nullable android.os.Looper);
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@Nullable android.location.LocationRequest, @NonNull java.util.concurrent.Executor, @NonNull android.location.LocationListener);
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@Nullable android.location.LocationRequest, @NonNull android.app.PendingIntent);
+12 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import static com.android.internal.util.ConcurrentUtils.DIRECT_EXECUTOR;

import android.Manifest;
import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
@@ -47,6 +48,7 @@ import android.compat.annotation.EnabledAfter;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.flags.Flags;
import android.location.provider.IProviderRequestListener;
import android.location.provider.ProviderProperties;
import android.location.provider.ProviderRequest;
@@ -2957,8 +2959,13 @@ public class LocationManager {
     *
     * @param executor the executor that the callback runs on
     * @param listener the listener to register
     *
     * @deprecated Do not use - this API was intended for testing only, and may not return any
     * results in the future.
     * @hide
     */
    @FlaggedApi(Flags.FLAG_DEPRECATE_PROVIDER_REQUEST_APIS)
    @Deprecated
    @SystemApi
    @RequiresPermission(allOf = {Manifest.permission.LOCATION_HARDWARE,
            Manifest.permission.INTERACT_ACROSS_USERS})
@@ -2973,8 +2980,13 @@ public class LocationManager {
     * Removes a {@link ProviderRequest.ChangedListener} that has been added.
     *
     * @param listener the listener to remove.
     *
     * @deprecated Do not use - this API was intended for testing only, and may not return any
     * results in the future.
     * @hide
     */
    @FlaggedApi(Flags.FLAG_DEPRECATE_PROVIDER_REQUEST_APIS)
    @Deprecated
    @SystemApi
    @RequiresPermission(Manifest.permission.LOCATION_HARDWARE)
    public void removeProviderRequestChangedListener(
+7 −0
Original line number Diff line number Diff line
package: "android.location.flags"
container: "system"

flag {
    name: "deprecate_provider_request_apis"
    namespace: "location"
    description: "Deprecates LocationManager ProviderChanged APIs"
    bug: "361811782"
}

flag {
    name: "keep_gnss_stationary_throttling"
    namespace: "location"