package a.c.d.k;

import a.a.a.b;
import com.ucar.vehiclesdk.UCarAdapter;
import com.ucar.vehiclesdk.UCarCommon;
import java.util.Random;

public class a extends Thread {
    private static final String j = "TestCilckActionThread";
    private static final int k = 100;
    private static final int l = 1000;
    private static final int m = 100;

    /* renamed from: a  reason: collision with root package name */
    private boolean f161a = false;
    private int b;
    private int c;
    private Random d = new Random();
    private int e = 1;
    private int[] f;
    private int[] g;
    private int[] h;
    private long i;

    public a(int i2, int i3) {
        this.c = i3;
        this.b = i2;
    }

    public void interrupt() {
        this.f161a = false;
        super.interrupt();
    }

    public void run() {
        super.run();
        while (this.f161a && !Thread.interrupted()) {
            int i2 = this.e;
            this.f = new int[i2];
            this.g = new int[i2];
            this.h = new int[i2];
            for (int i3 = 0; i3 < this.e; i3++) {
                this.f[i3] = 0;
                this.g[i3] = this.d.nextInt(this.b);
                this.h[i3] = this.d.nextInt(this.c);
            }
            UCarAdapter.getInstance().sendTouchEvent(UCarCommon.KeyEventActionType.KEY_EVENT_ACTION_DOWN.getValue(), this.e, this.f, this.g, this.h);
            try {
                Thread.sleep(100);
            } catch (Exception e2) {
                b.b(j, "sleep duration 1 error.", e2);
            }
            UCarAdapter.getInstance().sendTouchEvent(UCarCommon.KeyEventActionType.KEY_EVENT_ACTION_UP.getValue(), this.e, this.f, this.g, this.h);
            long nextInt = (long) (this.d.nextInt(901) + 100);
            this.i = nextInt;
            try {
                Thread.sleep(nextInt);
            } catch (Exception e3) {
                b.b(j, "sleep duration 2 error.", e3);
            }
        }
    }

    public synchronized void start() {
        this.f161a = true;
        super.start();
    }
}
