package ඓ.㿎.K.ῲ.㗽;

import android.animation.ValueAnimator;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.view.animation.LinearInterpolator;
import com.facebook.AccessTokenManager;

/* renamed from: ඓ.㿎.K.ῲ.㗽.ῲ  reason: contains not printable characters */
/* compiled from: ProgressDrawable */
public class C1430 extends Drawable implements Animatable {

    /* renamed from: ʬ  reason: contains not printable characters */
    public ValueAnimator f5384;

    /* renamed from: ඓ  reason: contains not printable characters */
    public Paint f5385 = new Paint();

    /* renamed from: ῲ  reason: contains not printable characters */
    public int f5386 = 0;

    /* renamed from: 㸾  reason: contains not printable characters */
    public Path f5387 = new Path();

    public C1430() {
        this.f5385.setStyle(Paint.Style.FILL);
        this.f5385.setAntiAlias(true);
        this.f5385.setColor(-5592406);
        this.f5384 = ValueAnimator.ofInt(30, AccessTokenManager.TOKEN_EXTEND_RETRY_SECONDS);
        this.f5384.addUpdateListener(new C1431(this));
        this.f5384.setDuration(10000L);
        this.f5384.setInterpolator(new LinearInterpolator());
        this.f5384.setRepeatCount(-1);
        this.f5384.setRepeatMode(1);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static /* synthetic */ void m3647(C1430 r0, ValueAnimator valueAnimator) {
        r0.f5386 = (((Integer) valueAnimator.getAnimatedValue()).intValue() / 30) * 30;
        r0.invalidateSelf();
    }

    public void draw(Canvas canvas) {
        Rect bounds = getBounds();
        int width = bounds.width();
        int height = bounds.height();
        canvas.save();
        float f = (float) (width / 2);
        int i = height / 2;
        float f2 = (float) i;
        canvas.rotate((float) this.f5386, f, f2);
        int max = Math.max(1, width / 20);
        for (int i2 = 0; i2 < 12; i2++) {
            this.f5387.reset();
            float f3 = (float) (width - max);
            float f4 = (float) max;
            this.f5387.addCircle(f3, f2, f4, Path.Direction.CW);
            float f5 = (float) (width - (max * 5));
            this.f5387.addRect(f5, (float) (i - max), f3, (float) (i + max), Path.Direction.CW);
            this.f5387.addCircle(f5, f2, f4, Path.Direction.CW);
            this.f5385.setAlpha((i2 + 5) * 17);
            canvas.rotate(30.0f, f, f2);
            canvas.drawPath(this.f5387, this.f5385);
        }
        canvas.restore();
    }

    public int getOpacity() {
        return -3;
    }

    public boolean isRunning() {
        return this.f5384.isRunning();
    }

    public void setAlpha(int i) {
        this.f5385.setAlpha(i);
    }

    public void setColorFilter(ColorFilter colorFilter) {
        this.f5385.setColorFilter(colorFilter);
    }

    public void start() {
        if (!this.f5384.isRunning()) {
            this.f5384.start();
        }
    }

    public void stop() {
        if (this.f5384.isRunning()) {
            this.f5384.cancel();
        }
    }
}
