Skip to content

Commit

Permalink
increased version
Browse files Browse the repository at this point in the history
  • Loading branch information
neoBortx committed Apr 21, 2024
1 parent a7610e2 commit d0b7c7b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
VERSION_LIB=0.0.18
VERSION_LIB=0.0.19
11 changes: 11 additions & 0 deletions simpleBleClient/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
# This is generated automatically by the Android Gradle plugin.
-dontwarn java.lang.invoke.StringConcatFactory

-keepclassmembers class ** {
public void enableLogging();
}
-keep class android.util.Log {
public static *** e(...);
public static *** d(...);
public static *** v(...);
public static *** i(...);
public static *** w(...);
}

-keep public interface com.bortxapps.simplebleclient.api.contracts.BleNetworkMessageProcessor { public *; }
-keep public interface com.bortxapps.simplebleclient.api.contracts.SimpleBleClient { public *; }
-keep class com.bortxapps.simplebleclient.api.contracts.SimpleBleClient$DefaultImpls { *; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public enum class BleError {
MISSING_BLE_PERMISSIONS,
BLE_NOT_ENABLED,
BLE_NOT_SUPPORTED,
INTERNAL_ERROR_COMMUNICATION_CANCELLED_DUE_COROUTINE,
COMMUNICATION_FAILED,
SEND_COMMAND_FAILED_NO_DATA_RECEIVED_IN_RESPONSE,
SEND_COMMAND_FAILED_NO_CHARACTERISTIC_FOUND_TO_SEND,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ internal class BleManagerGattCallBacks(bleConfiguration: BleConfiguration, bleMe
}

BluetoothProfile.STATE_DISCONNECTED -> {
Log.e("BleManagerGattCallBacks", "onConnectionStateChange: STATE_DISCONNECTED")
Log.d("BleManagerGattCallBacks", "onConnectionStateChange: STATE_DISCONNECTED")
onDisconnectedDeferred?.complete(true)
}

BluetoothProfile.STATE_CONNECTING -> {
Log.e("BleManagerGattCallBacks", "onConnectionStateChange: STATE_CONNECTING")
Log.d("BleManagerGattCallBacks", "onConnectionStateChange: STATE_CONNECTING")
}

BluetoothProfile.STATE_DISCONNECTING -> {
Log.e("BleManagerGattCallBacks", "onConnectionStateChange: STATE_DISCONNECTING")
Log.d("BleManagerGattCallBacks", "onConnectionStateChange: STATE_DISCONNECTING")
}

else -> {
Log.e("BleManagerGattCallBacks", "onConnectionStateChange: UNKNOWN")
Log.d("BleManagerGattCallBacks", "onConnectionStateChange: UNKNOWN")
}
}
connectionStatus.tryEmit(newState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal abstract class BleManagerGattOperationBase(
try {
return operation()
} catch (e: CancellationException) {
handleException(e, BleError.COMMUNICATION_FAILED)
handleException(e, BleError.INTERNAL_ERROR_COMMUNICATION_CANCELLED_DUE_COROUTINE)
} catch (e: UninitializedPropertyAccessException) {
handleException(e, BleError.INTERNAL_ERROR)
} catch (e: SimpleBleClientException) {
Expand Down

0 comments on commit d0b7c7b

Please sign in to comment.