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

Commit d4620f60 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "BRD: Correct @NonNull annotation"

parents ca0da957 f54df24a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14185,8 +14185,8 @@ package android.graphics {
    method @NonNull public static android.graphics.BitmapRegionDecoder newInstance(@NonNull byte[], int, int) throws java.io.IOException;
    method @Deprecated @NonNull public static android.graphics.BitmapRegionDecoder newInstance(@NonNull java.io.FileDescriptor, boolean) throws java.io.IOException;
    method @NonNull public static android.graphics.BitmapRegionDecoder newInstance(@NonNull android.os.ParcelFileDescriptor) throws java.io.IOException;
    method @Deprecated @NonNull public static android.graphics.BitmapRegionDecoder newInstance(@NonNull java.io.InputStream, boolean) throws java.io.IOException;
    method @NonNull public static android.graphics.BitmapRegionDecoder newInstance(@NonNull java.io.InputStream) throws java.io.IOException;
    method @Deprecated @Nullable public static android.graphics.BitmapRegionDecoder newInstance(@NonNull java.io.InputStream, boolean) throws java.io.IOException;
    method @Nullable public static android.graphics.BitmapRegionDecoder newInstance(@NonNull java.io.InputStream) throws java.io.IOException;
    method @Deprecated @NonNull public static android.graphics.BitmapRegionDecoder newInstance(@NonNull String, boolean) throws java.io.IOException;
    method @NonNull public static android.graphics.BitmapRegionDecoder newInstance(@NonNull String) throws java.io.IOException;
    method public void recycle();
+5 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package android.graphics;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.os.Build;
@@ -125,6 +126,7 @@ public final class BitmapRegionDecoder {
     * @param is The input stream that holds the raw data to be decoded into a
     *           BitmapRegionDecoder.
     * @param isShareable This field has always been ignored.
     * @return A new BitmapRegionDecoder, or {@code null} if {@code is} is {@code null}.
     * @throws IOException if the image format is not supported or can not be decoded.
     * @deprecated In favor of {@link #newInstance(InputStream)}
     *
@@ -134,7 +136,7 @@ public final class BitmapRegionDecoder {
     * {@link Build.VERSION_CODES#KITKAT}, this is no longer the case.</p>
     */
    @Deprecated
    @NonNull
    @Nullable
    public static BitmapRegionDecoder newInstance(@NonNull InputStream is,
            boolean isShareable) throws IOException {
        return newInstance(is);
@@ -148,9 +150,10 @@ public final class BitmapRegionDecoder {
     *
     * @param is The input stream that holds the raw data to be decoded into a
     *           BitmapRegionDecoder.
     * @return A new BitmapRegionDecoder, or {@code null} if {@code is} is {@code null}.
     * @throws IOException if the image format is not supported or can not be decoded.
     */
    @NonNull
    @Nullable
    public static BitmapRegionDecoder newInstance(@NonNull InputStream is) throws IOException {
        if (is instanceof AssetManager.AssetInputStream) {
            return nativeNewInstance(