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
This commit is contained in:
committed by
Leon Scroggins
parent
02918dfab0
commit
35f16e81dd
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user