jimu-decompiled/sources/com/afunx/ble/blelitelib/operation/BleWriteCharacteristicOperation.java
2025-05-13 19:24:51 +02:00

37 lines
1.4 KiB
Java

package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
/* loaded from: classes.dex */
public class BleWriteCharacteristicOperation extends BleOperationAbs {
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mCharacteristic;
private final byte[] mMsg;
private BleWriteCharacteristicOperation(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
this.mBluetoothGatt = bluetoothGatt;
this.mCharacteristic = bluetoothGattCharacteristic;
this.mMsg = bArr;
}
public static BleWriteCharacteristicOperation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return new BleWriteCharacteristicOperation(bluetoothGatt, bluetoothGattCharacteristic, bArr);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 6;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mCharacteristic.setValue(this.mMsg);
this.mBluetoothGatt.writeCharacteristic(this.mCharacteristic);
}
}