Skip to content

Commit

Permalink
Android source:
Browse files Browse the repository at this point in the history
- fix to issue 208
- the PmdClient is converted to Kotlin code and new unit tests added
  • Loading branch information
JOikarinen committed Oct 26, 2021
1 parent ff8730c commit c492d74
Show file tree
Hide file tree
Showing 46 changed files with 4,190 additions and 2,707 deletions.
4 changes: 2 additions & 2 deletions sources/Android/android-communications/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.5.21'
ext.kotlin_version = '1.5.31'
ext.protobuf_version = '0.8.12'
ext.dokka_version = '1.4.32'

Expand All @@ -11,7 +11,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.protobuf:protobuf-gradle-plugin:$protobuf_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
Expand Down
15 changes: 9 additions & 6 deletions sources/Android/android-communications/library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ android {
}
}

flavorDimensions "CommunicationsLibrary"
flavorDimensions 'library'
productFlavors {
androidCommunications {
dimension "CommunicationsLibrary"
dimension "library"
}
sdk {
dimension "CommunicationsLibrary"
dimension "library"
}
sdkProprietary {
dimension "library"
}
}

Expand Down Expand Up @@ -157,13 +160,13 @@ dependencies {
implementation 'androidx.annotation:annotation:1.2.0'
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
sdkImplementation 'com.google.protobuf:protobuf-javalite:3.14.0'
sdkImplementation 'com.google.protobuf:protobuf-javalite:3.17.3'
sdkProprietaryImplementation 'com.google.protobuf:protobuf-javalite:3.17.3'
testImplementation 'junit:junit:4.13.2'
testImplementation "org.mockito:mockito-core:3.11.1"
testImplementation "io.mockk:mockk:1.10.4"
testImplementation "io.mockk:mockk:1.10.6"
testImplementation 'androidx.test:runner:1.4.0'
testImplementation 'androidx.test.espresso:espresso-core:3.4.0'
testImplementation 'org.robolectric:robolectric:4.0'
androidTestImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:core:1.4.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.polar.androidcommunications.api.ble.exceptions

import com.polar.androidcommunications.api.ble.model.gatt.client.BlePMDClient
import com.polar.androidcommunications.api.ble.model.gatt.client.pmd.PmdControlPointResponse

/**
* Error indicating that requested control point command operation failed with error code
*/
class BleControlPointCommandError(
message: String,
val error: BlePMDClient.PmdControlPointResponse.PmdControlPointResponseCode
val error: PmdControlPointResponse.PmdControlPointResponseCode
) :
Exception("$message failed with error: $error")
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import com.polar.androidcommunications.api.ble.model.gatt.client.BleDisClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.BleH7SettingsClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.BleHrClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.BlePMDClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.BlePfcClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.BlePsdClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.BleRscClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.pmd.BlePMDClient;
import com.polar.androidcommunications.api.ble.model.gatt.client.psftp.BlePsFtpClient;

import java.util.HashSet;
Expand Down
Loading

0 comments on commit c492d74

Please sign in to comment.