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

42 lines
1.2 KiB
Java

package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import com.afunx.ble.blelitelib.log.BleLiteLog;
/* loaded from: classes.dex */
public class BleCloseOperation extends BleOperationAbs {
private static final String TAG = "BleCloseOperation";
private final BluetoothGatt mBluetoothGatt;
private boolean mIsClosed = false;
private BleCloseOperation(BluetoothGatt bluetoothGatt) {
this.mBluetoothGatt = bluetoothGatt;
}
public static BleCloseOperation createInstance(BluetoothGatt bluetoothGatt) {
return new BleCloseOperation(bluetoothGatt);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 2;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
if (this.mIsClosed) {
BleLiteLog.w(TAG, "it is closed already");
return;
}
this.mIsClosed = true;
BluetoothGatt bluetoothGatt = this.mBluetoothGatt;
if (bluetoothGatt != null) {
bluetoothGatt.close();
}
}
}