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

Commit d608691c authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Update maxTargetSdk for createAshmemBitmap

Bug: 150395371
Test: make

Follow-on to I359187a5c70b5e241c7f5879d50fde2a7449c818. Apps built
against R should have @UnsupportedAppUsage access to createAshmemBitmap,
since asShared does not exist yet. But apps built against S should use
the new API.

Note that the R branches have *no* maxTargetSdk set for this method.
This was added in S before it was possible to set R as maxTargetSdk.

Change-Id: If2313809084bc70613214b562847ae3a792df259
parent 92d0655d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -684,15 +684,13 @@ public final class Bitmap implements Parcelable {
        return b;
    }

    // FIXME: The maxTargetSdk should be R, once R is no longer set to
    // CUR_DEVELOPMENT.
    /**
     * Creates a new immutable bitmap backed by ashmem which can efficiently
     * be passed between processes.
     *
     * @hide
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.Q,
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R,
            publicAlternatives = "Use {@link #asShared()} instead")
    public Bitmap createAshmemBitmap() {
        checkRecycled("Can't copy a recycled bitmap");