提交 ead25618 编写于 作者: R Robert Papp 提交者: Sam Judd

Missing keywords.

上级 c62ca65d
......@@ -21,8 +21,8 @@ class EngineKey implements Key {
private final ResourceDecoder decoder;
private final Transformation transformation;
private final ResourceEncoder encoder;
private ResourceTranscoder transcoder;
private Encoder sourceEncoder;
private final ResourceTranscoder transcoder;
private final Encoder sourceEncoder;
private String stringKey;
private int hashCode;
private OriginalEngineKey originalKey;
......
......@@ -37,7 +37,7 @@ public abstract class UriLoader<T> implements ModelLoader<Uri, T> {
protected abstract DataFetcher<T> getLocalUriFetcher(Context context, Uri uri);
private boolean isLocalUri(String scheme) {
private static boolean isLocalUri(String scheme) {
return ContentResolver.SCHEME_FILE.equals(scheme)
|| ContentResolver.SCHEME_CONTENT.equals(scheme)
|| ContentResolver.SCHEME_ANDROID_RESOURCE.equals(scheme);
......
......@@ -197,7 +197,7 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
return decodeStream(bis, options);
}
private boolean shouldUsePool(RecyclableBufferedInputStream bis) {
private static boolean shouldUsePool(RecyclableBufferedInputStream bis) {
// On KitKat+, any bitmap can be used to decode any other bitmap.
if (Build.VERSION_CODES.KITKAT <= Build.VERSION.SDK_INT) {
return true;
......@@ -221,7 +221,7 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
return false;
}
private Bitmap.Config getConfig(RecyclableBufferedInputStream bis, DecodeFormat format) {
private static Bitmap.Config getConfig(RecyclableBufferedInputStream bis, DecodeFormat format) {
if (format == DecodeFormat.ALWAYS_ARGB_8888) {
return Bitmap.Config.ARGB_8888;
}
......@@ -276,7 +276,7 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
}
private Bitmap decodeStream(RecyclableBufferedInputStream bis, BitmapFactory.Options options) {
private static Bitmap decodeStream(RecyclableBufferedInputStream bis, BitmapFactory.Options options) {
if (options.inJustDecodeBounds) {
// This is large, but jpeg headers are not size bounded so we need something large enough to minimize
// the possibility of not being able to fit enough of the header in the buffer to get the image size so
......
......@@ -175,8 +175,7 @@ public class ImageHeaderParser {
}
}
private int parseExifSegment(RandomAccessReader segmentData) {
private static int parseExifSegment(RandomAccessReader segmentData) {
final int headerOffsetSize = JPEG_EXIF_SEGMENT_PREAMBLE.length();
short byteOrderIdentifier = segmentData.getInt16(headerOffsetSize);
......@@ -268,7 +267,7 @@ public class ImageHeaderParser {
return ifdOffset + 2 + (12 * tagIndex);
}
private boolean handles(int imageMagicNumber) {
private static boolean handles(int imageMagicNumber) {
return (imageMagicNumber & EXIF_MAGIC_NUMBER) == EXIF_MAGIC_NUMBER
|| imageMagicNumber == MOTOROLA_TIFF_MAGIC_NUMBER
|| imageMagicNumber == INTEL_TIFF_MAGIC_NUMBER;
......
......@@ -43,6 +43,8 @@ public class RecyclableBufferedInputStream extends FilterInputStream {
* amount of data read after the mark position.
*/
public static class InvalidMarkException extends RuntimeException {
private static final long serialVersionUID = -4338378848813561757L;
public InvalidMarkException(String detailMessage) {
super(detailMessage);
}
......@@ -101,7 +103,7 @@ public class RecyclableBufferedInputStream extends FilterInputStream {
return count - pos + localIn.available();
}
private IOException streamClosed() throws IOException {
private static IOException streamClosed() throws IOException {
throw new IOException("BufferedInputStream is closed");
}
......
......@@ -80,7 +80,7 @@ public class GifResourceDecoder implements ResourceDecoder<InputStream, GifDrawa
}
// A best effort attempt to get a unique id that can be used as a cache key for frames of the decoded GIF.
private String getGifId(byte[] data) {
private static String getGifId(byte[] data) {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-1");
digest.update(data);
......@@ -93,7 +93,7 @@ public class GifResourceDecoder implements ResourceDecoder<InputStream, GifDrawa
return UUID.randomUUID().toString();
}
private byte[] inputStreamToBytes(InputStream is) {
private static byte[] inputStreamToBytes(InputStream is) {
int capacity = 16384;
ByteArrayOutputStream buffer = new ByteArrayOutputStream(capacity);
try {
......
......@@ -19,7 +19,7 @@ import java.io.File;
*/
public class FixedLoadProvider<A, T, Z, R> implements LoadProvider<A, T, Z, R> {
private final ModelLoader<A, T> modelLoader;
private ResourceTranscoder<Z, R> transcoder;
private final ResourceTranscoder<Z, R> transcoder;
private final DataLoadProvider<T, Z> dataLoadProvider;
public FixedLoadProvider(ModelLoader<A, T> modelLoader, ResourceTranscoder<Z, R> transcoder,
......@@ -28,10 +28,12 @@ public class FixedLoadProvider<A, T, Z, R> implements LoadProvider<A, T, Z, R>
throw new NullPointerException("ModelLoader must not be null");
}
this.modelLoader = modelLoader;
if (transcoder == null) {
throw new NullPointerException("Transcoder must not be null");
}
this.transcoder = transcoder;
if (dataLoadProvider == null) {
throw new NullPointerException("DataLoadProvider must not be null");
}
......
......@@ -36,6 +36,8 @@ public class SquaringDrawable extends GlideDrawable {
super.setBounds(bounds);
wrapped.setBounds(bounds);
}
@Override
public void setChangingConfigurations(int configs) {
wrapped.setChangingConfigurations(configs);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册