mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Simplifications
This commit is contained in:
@@ -24,7 +24,6 @@ import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -49,8 +48,8 @@ public class FixedImageView extends androidx.appcompat.widget.AppCompatImageView
|
||||
super.onDraw(canvas);
|
||||
} catch (RuntimeException ex) {
|
||||
Log.e(new Throwable(Helper.getViewName(this), ex));
|
||||
Context context = getContext();
|
||||
Drawable d = context.getDrawable(R.drawable.twotone_broken_image_24);
|
||||
|
||||
Drawable d = getContext().getDrawable(R.drawable.twotone_broken_image_24);
|
||||
Rect b = getDrawable().getBounds();
|
||||
int px = Math.min(b.width(), b.height());
|
||||
d.setBounds(0, 0, px, px);
|
||||
|
||||
Reference in New Issue
Block a user