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

Commit d5d9b386 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adds RequiresFeature annotation to ADAS APIs" into tm-dev

parents 7af8e713 6f99e1a3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@ import static android.Manifest.permission.LOCATION_BYPASS;

import android.Manifest;
import android.annotation.NonNull;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.content.pm.PackageManager;
import android.os.Parcel;
import android.os.Parcelable;

@@ -224,6 +226,7 @@ public final class LastLocationRequest implements Parcelable {
         */
        @SystemApi
        @RequiresPermission(LOCATION_BYPASS)
        @RequiresFeature(PackageManager.FEATURE_AUTOMOTIVE)
        public @NonNull LastLocationRequest.Builder setAdasGnssBypass(boolean adasGnssBypass) {
            mAdasGnssBypass = adasGnssBypass;
            return this;
+1 −0
Original line number Diff line number Diff line
@@ -681,6 +681,7 @@ public class LocationManager {
     */
    @SystemApi
    @RequiresPermission(LOCATION_BYPASS)
    @RequiresFeature(PackageManager.FEATURE_AUTOMOTIVE)
    public void setAdasGnssLocationEnabled(boolean enabled) {
        try {
            mService.setAdasGnssLocationEnabledForUser(enabled, mContext.getUser().getIdentifier());
+3 −0
Original line number Diff line number Diff line
@@ -27,10 +27,12 @@ import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledAfter;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@@ -1136,6 +1138,7 @@ public final class LocationRequest implements Parcelable {
         */
        @SystemApi
        @RequiresPermission(LOCATION_BYPASS)
        @RequiresFeature(PackageManager.FEATURE_AUTOMOTIVE)
        public @NonNull Builder setAdasGnssBypass(boolean adasGnssBypass) {
            mAdasGnssBypass = adasGnssBypass;
            return this;