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

Commit 60f3d5ce authored by Adrian Roos's avatar Adrian Roos Committed by Gerrit Code Review
Browse files

Merge changes from topic "nullablecollection"

* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints
parents 5f36d6f7 f3d73871
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package android.content;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.TestApi;
import android.app.ActivityThread;
import android.os.Parcel;
@@ -62,6 +63,7 @@ public final class AutofillOptions implements Parcelable {
     * List of allowlisted activities.
     */
    @Nullable
    @SuppressLint("NullableCollection")
    public ArraySet<ComponentName> whitelistedActivitiesForAugmentedAutofill;

    /**
@@ -73,6 +75,7 @@ public final class AutofillOptions implements Parcelable {
     * The disabled Activities of the package. key is component name string, value is when they
     * will be enabled.
     */
    @SuppressLint("NullableCollection")
    @Nullable
    public ArrayMap<String, Long> disabledActivities;

+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package android.content;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.TestApi;
import android.app.ActivityThread;
import android.os.Parcel;
@@ -73,6 +74,7 @@ public final class ContentCaptureOptions implements Parcelable {
     * for all acitivites in the package).
     */
    @Nullable
    @SuppressLint("NullableCollection")
    public final ArraySet<ComponentName> whitelistedComponents;

    /**
@@ -96,6 +98,7 @@ public final class ContentCaptureOptions implements Parcelable {
     */
    public ContentCaptureOptions(int loggingLevel, int maxBufferSize, int idleFlushingFrequencyMs,
            int textChangeFlushingFrequencyMs, int logHistorySize,
            @SuppressLint("NullableCollection")
            @Nullable ArraySet<ComponentName> whitelistedComponents) {
        this(/* lite= */ false, loggingLevel, maxBufferSize, idleFlushingFrequencyMs,
                textChangeFlushingFrequencyMs, logHistorySize, whitelistedComponents);
+1 −1
Original line number Diff line number Diff line
@@ -5001,7 +5001,7 @@ public abstract class PackageManager {
     *
     * @hide
     */
    @SuppressWarnings("HiddenAbstractMethod")
    @SuppressWarnings({"HiddenAbstractMethod", "NullableCollection"})
    @TestApi
    public abstract @Nullable String[] getNamesForUids(int[] uids);

+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ public final class InlineSuggestionInfo implements Parcelable {
    public static InlineSuggestionInfo newInlineSuggestionInfo(
            @NonNull InlinePresentationSpec presentationSpec,
            @NonNull @Source String source,
            @SuppressLint("NullableCollection")
            @Nullable String[] autofillHints, @NonNull @Type String type, boolean isPinned) {
        return new InlineSuggestionInfo(presentationSpec, source, autofillHints, type, isPinned);
    }
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.BinderThread;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.TestApi;
import android.app.ActivityManager;
import android.os.RemoteException;
@@ -101,6 +102,7 @@ public class TaskOrganizer extends WindowOrganizer {
    /** Gets direct child tasks (ordered from top-to-bottom) */
    @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
    @Nullable
    @SuppressLint("NullableCollection")
    public static List<ActivityManager.RunningTaskInfo> getChildTasks(
            @NonNull WindowContainerToken parent, @NonNull int[] activityTypes) {
        try {
@@ -113,6 +115,7 @@ public class TaskOrganizer extends WindowOrganizer {
    /** Gets all root tasks on a display (ordered from top-to-bottom) */
    @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
    @Nullable
    @SuppressLint("NullableCollection")
    public static List<ActivityManager.RunningTaskInfo> getRootTasks(
            int displayId, @NonNull int[] activityTypes) {
        try {
Loading