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

Commit 09426de6 authored by Andrei-Valentin Onea's avatar Andrei-Valentin Onea Committed by Gerrit Code Review
Browse files

Merge "Add @UnsupportedAppUsage annotations"

parents 3923ce61 dcb67738
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1063,6 +1063,7 @@ java_library {
        "core/java/android/annotation/Nullable.java",
        "core/java/android/annotation/SystemApi.java",
        "core/java/android/annotation/TestApi.java",
        "core/java/android/annotation/UnsupportedAppUsage.java",
        "core/java/android/os/HwBinder.java",
        "core/java/android/os/HwBlob.java",
        "core/java/android/os/HwParcel.java",
+0 −507

File changed.

Preview size limit exceeded, changes collapsed.

+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.os;

import android.annotation.UnsupportedAppUsage;
import android.os.Message;

/** @hide */
@@ -25,13 +26,17 @@ public class AsyncResult
    /*************************** Instance Variables **************************/

    // Expect either exception or result to be null
    @UnsupportedAppUsage
    public Object userObj;
    @UnsupportedAppUsage
    public Throwable exception;
    @UnsupportedAppUsage
    public Object result;

    /***************************** Class Methods *****************************/

    /** Saves and sets m.obj */
    @UnsupportedAppUsage
    public static AsyncResult 
    forMessage(Message m, Object r, Throwable ex)
    {
@@ -45,6 +50,7 @@ public class AsyncResult
    }

    /** Saves and sets m.obj */
    @UnsupportedAppUsage
    public static AsyncResult 
    forMessage(Message m)
    {
@@ -58,6 +64,7 @@ public class AsyncResult
    }

    /** please note, this sets m.obj to be this */
    @UnsupportedAppUsage
    public 
    AsyncResult (Object uo, Object r, Throwable ex)
    {
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.os;

import android.annotation.MainThread;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.annotation.WorkerThread;

import java.util.ArrayDeque;
@@ -259,15 +260,20 @@ public abstract class AsyncTask<Params, Progress, Result> {
    private static final int MESSAGE_POST_RESULT = 0x1;
    private static final int MESSAGE_POST_PROGRESS = 0x2;

    @UnsupportedAppUsage
    private static volatile Executor sDefaultExecutor = SERIAL_EXECUTOR;
    private static InternalHandler sHandler;

    @UnsupportedAppUsage
    private final WorkerRunnable<Params, Result> mWorker;
    @UnsupportedAppUsage
    private final FutureTask<Result> mFuture;

    @UnsupportedAppUsage
    private volatile Status mStatus = Status.PENDING;
    
    private final AtomicBoolean mCancelled = new AtomicBoolean();
    @UnsupportedAppUsage
    private final AtomicBoolean mTaskInvoked = new AtomicBoolean();

    private final Handler mHandler;
@@ -331,6 +337,7 @@ public abstract class AsyncTask<Params, Progress, Result> {
    }

    /** @hide */
    @UnsupportedAppUsage
    public static void setDefaultExecutor(Executor exec) {
        sDefaultExecutor = exec;
    }
+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.os;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.util.ArrayMap;
import android.util.Log;
import android.util.MathUtils;
@@ -82,6 +83,7 @@ public class BaseBundle {
    // Invariant - exactly one of mMap / mParcelledData will be null
    // (except inside a call to unparcel)

    @UnsupportedAppUsage
    ArrayMap<String, Object> mMap = null;

    /*
@@ -89,6 +91,7 @@ public class BaseBundle {
     * data are stored as a Parcel containing a Bundle.  When the data
     * are unparcelled, mParcelledData willbe set to null.
     */
    @UnsupportedAppUsage
    Parcel mParcelledData = null;

    /**
@@ -225,6 +228,7 @@ public class BaseBundle {
     * If the underlying data are stored as a Parcel, unparcel them
     * using the currently assigned class loader.
     */
    @UnsupportedAppUsage
    /* package */ void unparcel() {
        synchronized (this) {
            final Parcel source = mParcelledData;
@@ -311,6 +315,7 @@ public class BaseBundle {
    /**
     * @hide
     */
    @UnsupportedAppUsage
    public boolean isParcelled() {
        return mParcelledData != null;
    }
Loading