package com.bytedance.sdk.openadsdk.maa;

import android.content.Context;
import android.hardware.SensorEventListener;
import android.os.Vibrator;
import java.lang.ref.WeakReference;

/* JADX INFO: loaded from: classes2.dex */
public class vt {
    public static WeakReference<fm> fm;
    protected static final float[] ro = new float[3];

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    protected static final float[] f7487lb = new float[3];
    protected static final float[] yz = new float[9];
    protected static final float[] jnr = new float[3];

    public static void fm(Context context, SensorEventListener sensorEventListener) {
    }

    public static void lb(Context context, SensorEventListener sensorEventListener, int i10) {
        if (sensorEventListener == null || context == null) {
            return;
        }
        try {
            WeakReference<fm> weakReference = fm;
            if (weakReference != null) {
                weakReference.get();
            }
        } catch (Throwable th) {
            wsy.fm("SensorHub", "startListenLinearAcceleration error", th);
        }
    }

    public static void ro(Context context, SensorEventListener sensorEventListener, int i10) {
        if (sensorEventListener == null || context == null) {
            return;
        }
        try {
            WeakReference<fm> weakReference = fm;
            if (weakReference != null) {
                weakReference.get();
            }
        } catch (Throwable th) {
            wsy.fm("SensorHub", "startListenGyroscope error", th);
        }
    }

    public static void yz(Context context, SensorEventListener sensorEventListener, int i10) {
        if (sensorEventListener == null || context == null) {
            return;
        }
        try {
            WeakReference<fm> weakReference = fm;
            if (weakReference != null) {
                weakReference.get();
            }
        } catch (Throwable th) {
            wsy.fm("SensorHub", "startListenRotationVector err", th);
        }
    }

    public static void fm(fm fmVar) {
        fm = new WeakReference<>(fmVar);
    }

    public static void fm(Context context, SensorEventListener sensorEventListener, int i10) {
        if (sensorEventListener == null || context == null) {
            return;
        }
        try {
            WeakReference<fm> weakReference = fm;
            if (weakReference != null) {
                weakReference.get();
            }
        } catch (Throwable th) {
            wsy.fm("SensorHub", "startListenAccelerometer error", th);
        }
    }

    public static void fm(Context context, long j10) {
        if (context == null) {
            return;
        }
        ((Vibrator) context.getSystemService("vibrator")).vibrate(j10);
    }
}
