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

Commit 4d8f57c6 authored by Grace Cheng's avatar Grace Cheng Committed by Presubmit Automerger Backend
Browse files

[automerge] Adds RequiresFeature annotation to ADAS APIs 2p: 6f99e1a3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17395086

Bug: 215299508
Change-Id: If564a8a2a8bd8136c3638fcee360201b66a8ac94
parents 135d7da8 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;