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

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

Merge "Add backward-compatible method containsAll and includes" into main

parents fe0924fd 0cd4ebed
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2583,6 +2583,11 @@ package android.os {
    ctor public NewUserResponse(@Nullable android.os.UserHandle, int);
  }

  @FlaggedApi("android.location.flags.change_get_adas_allowlist_from_hidden_to_system") public final class PackageTagsList implements android.os.Parcelable {
    method @Deprecated public boolean containsAll(@NonNull String);
    method @Deprecated public boolean includes(@NonNull String);
  }

  public final class Parcel {
    method public boolean allowSquashing();
    method public int getFlags();
+27 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.location.flags.Flags;
import android.util.ArrayMap;
@@ -73,6 +74,19 @@ public final class PackageTagsList implements Parcelable {
        return mPackageTags.containsKey(packageName);
    }

    /**
     * This is the same as {@link #containsPackage(String)}. The function name is kept in baklava_1
     * for backward compatibility with baklava CTS.
     *
     * @deprecated to be removed in 26Q2 release.
     * @hide
     */
    @Deprecated
    @TestApi
    public boolean includes(@NonNull String packageName) {
        return containsPackage(packageName);
    }

    /**
     * Returns true if the given attribution tag is found within this instance under any package.
     * Only returns true if the attribution tag literal is found, not if any package contains the
@@ -103,6 +117,19 @@ public final class PackageTagsList implements Parcelable {
        return tags != null && tags.isEmpty();
    }

    /**
     * This is the same as {@link #containsPackageWithAllTags(String)}. The function name is kept in
     * baklava_1 for backward compatibility with baklava CTS.
     *
     * @deprecated to be removed in 26Q2 release.
     * @hide
     */
    @Deprecated
    @TestApi
    public boolean containsAll(@NonNull String packageName) {
        return containsPackageWithAllTags(packageName);
    }

    /**
     * Returns true if the given package and attribution tag are contained within this instance.
     */