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

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

Address @hides in ImageDecoder

Bug: 152322291
Test: make

Once ImageDecoder is in a mainline module, the system can no longer
access @hidden methods (unless they're @SystemApi), so this
removes/documents some. The ones in Source are not used anywhere outside
ImageDecoder AFAICT, so they are unneeded. Document setOutPaddingRect,
which needs to be public/@hide so it can be accessed by the drawable
package, which will also be in the module.

Change-Id: I5cd9c0553e8d27d6679cbc431fcadc96d818687d
parent 02918dfa
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -195,14 +195,11 @@ public final class ImageDecoder implements AutoCloseable {
    public static abstract class Source {
        private Source() {}

        /* @hide */
        @Nullable
        Resources getResources() { return null; }

        /* @hide */
        int getDensity() { return Bitmap.DENSITY_NONE; }

        /* @hide */
        final int computeDstDensity() {
            Resources res = getResources();
            if (res == null) {
@@ -212,7 +209,6 @@ public final class ImageDecoder implements AutoCloseable {
            return res.getDisplayMetrics().densityDpi;
        }

        /* @hide */
        @NonNull
        abstract ImageDecoder createImageDecoder(boolean preferAnimation) throws IOException;
    };
@@ -1413,6 +1409,8 @@ public final class ImageDecoder implements AutoCloseable {
     *  {@link OnHeaderDecodedListener#onHeaderDecoded onHeaderDecoded}.</p>
     *
     *  @hide
     *  Must be public for access from android.graphics.drawable,
     *  but must not be called from outside the UI module.
     */
    public void setOutPaddingRect(@NonNull Rect outPadding) {
        mOutPaddingRect = outPadding;