MCPcopy Create free account
hub / github.com/M66B/FairEmail / animate

Method animate

app/src/main/java/eu/faircode/email/ImageHelper.java:939–954  ·  view source on GitHub ↗
(Context context, Drawable drawable)

Source from the content-addressed store, hash-verified

937 }
938
939 static Drawable animate(Context context, Drawable drawable) {
940 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P)
941 return drawable;
942
943 if (drawable instanceof AnimatedImageDrawable)
944 try {
945 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
946 boolean animate_images = prefs.getBoolean("animate_images", true);
947 if (animate_images)
948 ((AnimatedImageDrawable) drawable).start();
949 } catch (Throwable ex) {
950 Log.e(ex);
951 }
952
953 return drawable;
954 }
955
956 static Matrix getImageRotation(String mimeType, File file) {
957 try {

Callers 3

decodeImageMethod · 0.95
runMethod · 0.95
onExecutedMethod · 0.95

Calls 3

eMethod · 0.95
getBooleanMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected