Skip to content

Commit 297f73a

Browse files
committed
Aligning to V4.7.1
Signed-off-by: Luca Pezzoni <pezzoni.luca@gmail.com>
1 parent 607f000 commit 297f73a

44 files changed

Lines changed: 1071 additions & 1054 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BlueMS/build.gradle

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ android {
6464

6565
minSdkVersion rootProject.ext.minSdkVersion
6666
targetSdkVersion rootProject.ext.targetSdkVersion
67-
versionCode 46
68-
versionName '4.7.0'
67+
versionCode 47
68+
versionName '4.7.1'
6969
applicationId "com.st.bluems"
7070
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
7171
vectorDrawables.useSupportLibrary = true
@@ -79,6 +79,8 @@ android {
7979
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
8080
}
8181
debug {
82+
minifyEnabled true
83+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
8284
applicationIdSuffix ".debug"
8385
versionNameSuffix "-dev" + getDate()
8486
}
@@ -119,7 +121,10 @@ android {
119121

120122
packagingOptions {
121123
exclude "thirdpartynotice.txt"
124+
exclude 'maven.properties'
125+
exclude 'META-INF/DEPENDENCIES'
122126
}
127+
123128
}
124129

125130
ext {
@@ -136,21 +141,6 @@ dependencies {
136141
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutineVersion"
137142
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutineAndroidVersion"
138143

139-
components.all {
140-
allVariants {
141-
withDependencies { deps ->
142-
deps.each { dep ->
143-
if (dep.group == 'org.eclipse.paho' && dep.name =='org.eclipse.paho.client.mqttv3') {
144-
dep.version {
145-
require "1.2.0"
146-
}
147-
dep.because "require api 24: https://github.com/eclipse/paho.mqtt.java/issues/633"
148-
}
149-
}
150-
}
151-
}
152-
}
153-
154144
implementation project(':BlueSTSDK')
155145
implementation project(':BlueSTSDK_Gui_Android')
156146
implementation project(':BlueMSCloud')
@@ -204,6 +194,3 @@ dependencies {
204194

205195
}
206196

207-
apply plugin: 'kotlin-android'
208-
apply plugin: 'kotlin-android-extensions'
209-

BlueMS/proguard-rules.pro

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,30 @@
1616
# public *;
1717
#}
1818

19-
<<<<<<< HEAD
20-
-keep class com.androidplot.xy.** { *; }
21-
-keep class com.androidplot.ui.** { *; }
22-
23-
#retrofit proguard rules http://square.github.io/retrofit/
24-
# Platform calls Class.forName on types which do not exist on Android to determine platform.
25-
-dontnote retrofit2.Platform
26-
# Platform used when running on Java 8 VMs. Will not be used at runtime
27-
-dontwarn retrofit2.Platform$Java8
28-
# Retain generic type information for use by reflection by converters and adapters.
29-
-keepattributes Signature
30-
# Retain declared checked exceptions for use by a Proxy instance.
31-
-keepattributes Exceptions
32-
#retrofit 2.3 & co
33-
-dontwarn javax.annotation.**
34-
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
35-
=======
36-
>>>>>>> master
3719

3820
#ibm watson
3921
#keep the class member name to avoid problems with json to java objects
4022
-keepclassmembers class com.ibm.watson.speech_to_text.v1.** { <fields>; }
4123
#ingore warnings about class that do not exist in android
4224
-dontwarn javax.naming.InitialContext
4325
-dontwarn javax.naming.Context
26+
-dontwarn javax.mail.internet.MimeBodyPart
27+
-dontwarn java.lang.instrument.ClassFileTransformer
28+
-dontwarn javax.mail.internet.SharedInputStream
29+
-dontwarn java.lang.ClassValue
30+
-dontwarn javax.activation.DataContentHandler
31+
-dontwarn okhttp3.internal.http.UnrepeatableRequestBody
32+
33+
34+
#need for Crashlytics
35+
-keepattributes *Annotation* # Keep Crashlytics annotations
36+
-keepattributes SourceFile,LineNumberTable # Keep file names/line numbers
37+
-keep public class * extends java.lang.Exception
4438

4539
#need for okhttp (audio websocket)
4640
# https://github.com/square/okhttp/blob/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro
4741
# JSR 305 annotations are for embedding nullability information.
48-
<<<<<<< HEAD
49-
-dontwarn javax.annotation.**
50-
51-
=======
5242
#-dontwarn javax.annotation.**
53-
>>>>>>> master
5443
# A resource is loaded with a relative path so the package of this class must be preserved.
5544
#-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
5645
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.

BlueMS/src/main/AndroidManifest.xml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?><!--
2-
~ Copyright (c) 2017 STMicroelectronics – All rights reserved
3-
~ The STMicroelectronics corporate logo is a trademark of STMicroelectronics
4-
~
5-
~ Redistribution and use in source and binary forms, with or without modification,
6-
~ are permitted provided that the following conditions are met:
7-
~
8-
~ - Redistributions of source code must retain the above copyright notice, this list of conditions
9-
~ and the following disclaimer.
10-
~
11-
~ - Redistributions in binary form must reproduce the above copyright notice, this list of
12-
~ conditions and the following disclaimer in the documentation and/or other materials provided
13-
~ with the distribution.
14-
~
15-
~ - Neither the name nor trademarks of STMicroelectronics International N.V. nor any other
16-
~ STMicroelectronics company nor the names of its contributors may be used to endorse or
17-
~ promote products derived from this software without specific prior written permission.
18-
~
19-
~ - All of the icons, pictures, logos and other images that are provided with the source code
20-
~ in a directory whose title begins with st_images may only be used for internal purposes and
21-
~ shall not be redistributed to any third party or modified in any way.
22-
~
23-
~ - Any redistributions in binary form shall not include the capability to display any of the
24-
~ icons, pictures, logos and other images that are provided with the source code in a directory
25-
~ whose title begins with st_images.
26-
~
27-
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
28-
~ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
29-
~ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
30-
~ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31-
~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32-
~ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33-
~ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34-
~ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
35-
~ OF SUCH DAMAGE.
36-
-->
1+
<?xml version="1.0" encoding="utf-8"?>
372
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
383
package="com.st.BlueMS">
394

@@ -153,7 +118,6 @@
153118
android:name="android.support.PARENT_ACTIVITY"
154119
android:value="com.st.BlueMS.MainActivity" />
155120
</activity>
156-
<!-- End: integrate the BlueSTSDK.gui activity in the app, setting the parent activity -->
157121
<activity android:name="com.st.BlueSTSDK.gui.fwUpgrade.FwUpgradeActivity">
158122
<meta-data
159123
android:name="android.support.PARENT_ACTIVITY"

BlueMS/src/main/java/com/st/BlueMS/DemosActivity.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,10 @@
8686
import com.st.BlueSTSDK.Utils.ConnectionOption;
8787
import com.st.BlueSTSDK.gui.demos.DemoDescriptionAnnotation;
8888
import com.st.BlueSTSDK.gui.demos.DemoFragment;
89-
import com.st.BlueSTSDK.gui.fwUpgrade.download.DownloadFwFileCompletedReceiver;
9089
import com.st.STM32WB.fwUpgrade.feature.RebootOTAModeFeature;
9190
import com.st.STM32WB.p2pDemo.feature.FeatureControlLed;
9291
import com.st.STM32WB.p2pDemo.feature.FeatureSwitchStatus;
9392

94-
import java.util.ArrayList;
95-
import java.util.Arrays;
96-
9793
import java.util.ArrayList;
9894
import java.util.Arrays;
9995
import java.util.Collections;
@@ -179,7 +175,6 @@ public static class LedButtonControlFragment extends com.st.STM32WB.p2pDemo.LedB
179175
//FeatureDebugFragment.class
180176
};
181177

182-
@SuppressWarnings("unchecked")
183178
@Override
184179
protected Class<? extends DemoFragment>[] getAllDemos() {
185180
ArrayList<Class<? extends DemoFragment>> demoList = new ArrayList<>(Arrays.asList(ALL_DEMOS));

BlueMS/src/main/java/com/st/BlueMS/MainActivity.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,12 @@
3838
package com.st.BlueMS;
3939

4040
import android.content.Intent;
41-
import android.content.SharedPreferences;
42-
import android.content.pm.PackageInfo;
43-
import android.content.pm.PackageManager;
44-
import android.preference.PreferenceManager;
45-
import androidx.annotation.NonNull;
46-
import androidx.appcompat.app.AlertDialog;
47-
48-
import android.view.LayoutInflater;
4941
import android.view.View;
50-
import android.view.ViewGroup;
51-
import android.widget.TextView;
5242

5343
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity;
5444
import com.st.BlueSTSDK.gui.AboutActivity;
55-
import com.st.BlueSTSDK.gui.thirdPartyLibLicense.LibLicense;
5645

5746
import java.net.URL;
58-
import java.util.ArrayList;
5947

6048
/**
6149
* Entry point activity, it show a full screen image for 2s and than the button for start the

BlueMS/src/main/java/com/st/BlueMS/demos/AccEvent/AccEventFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public class AccEventFragment extends BaseDemoFragment implements AdapterView.On
119119
* @param type type of node that we are using
120120
* @return supported events
121121
*/
122-
private static DetectableEvent[] getDetectableEvent(Node.Type type){
122+
public static DetectableEvent[] getDetectableEvent(Node.Type type){
123123
switch (type){
124124
case STEVAL_WESU1:
125125
return WESU_SUPPORTED_EVENT;
@@ -139,7 +139,7 @@ private static DetectableEvent[] getDetectableEvent(Node.Type type){
139139
}
140140

141141
/**
142-
* default event to show for a specific not type
142+
* default event to show for a specific node type
143143
* @param type type of board
144144
* @return default event for the board
145145
*/

BlueMS/src/main/java/com/st/BlueMS/demos/Audio/SpeechToText/ASRServices/IBMWatson/WatsonARSEngine.java

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
1-
/*
2-
* Copyright (c) 2019 STMicroelectronics – All rights reserved
3-
* The STMicroelectronics corporate logo is a trademark of STMicroelectronics
4-
*
5-
* Redistribution and use in source and binary forms, with or without modification,
6-
* are permitted provided that the following conditions are met:
7-
*
8-
* - Redistributions of source code must retain the above copyright notice, this list of conditions
9-
* and the following disclaimer.
10-
*
11-
* - Redistributions in binary form must reproduce the above copyright notice, this list of
12-
* conditions and the following disclaimer in the documentation and/or other materials provided
13-
* with the distribution.
14-
*
15-
* - Neither the name nor trademarks of STMicroelectronics International N.V. nor any other
16-
* STMicroelectronics company nor the names of its contributors may be used to endorse or
17-
* promote products derived from this software without specific prior written permission.
18-
*
19-
* - All of the icons, pictures, logos and other images that are provided with the source code
20-
* in a directory whose title begins with st_images may only be used for internal purposes and
21-
* shall not be redistributed to any third party or modified in any way.
22-
*
23-
* - Any redistributions in binary form shall not include the capability to display any of the
24-
* icons, pictures, logos and other images that are provided with the source code in a directory
25-
* whose title begins with st_images.
26-
*
27-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
28-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
29-
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
30-
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31-
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34-
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
35-
* OF SUCH DAMAGE.
36-
*/
371
package com.st.BlueMS.demos.Audio.SpeechToText.ASRServices.IBMWatson;
382

393
import android.content.Context;

BlueMS/src/main/java/com/st/BlueMS/demos/Audio/SpeechToText/ASRServices/IBMWatson/WatsonARSKey.java

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,6 @@
1-
/*
2-
* Copyright (c) 2019 STMicroelectronics – All rights reserved
3-
* The STMicroelectronics corporate logo is a trademark of STMicroelectronics
4-
*
5-
* Redistribution and use in source and binary forms, with or without modification,
6-
* are permitted provided that the following conditions are met:
7-
*
8-
* - Redistributions of source code must retain the above copyright notice, this list of conditions
9-
* and the following disclaimer.
10-
*
11-
* - Redistributions in binary form must reproduce the above copyright notice, this list of
12-
* conditions and the following disclaimer in the documentation and/or other materials provided
13-
* with the distribution.
14-
*
15-
* - Neither the name nor trademarks of STMicroelectronics International N.V. nor any other
16-
* STMicroelectronics company nor the names of its contributors may be used to endorse or
17-
* promote products derived from this software without specific prior written permission.
18-
*
19-
* - All of the icons, pictures, logos and other images that are provided with the source code
20-
* in a directory whose title begins with st_images may only be used for internal purposes and
21-
* shall not be redistributed to any third party or modified in any way.
22-
*
23-
* - Any redistributions in binary form shall not include the capability to display any of the
24-
* icons, pictures, logos and other images that are provided with the source code in a directory
25-
* whose title begins with st_images.
26-
*
27-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
28-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
29-
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
30-
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31-
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34-
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
35-
* OF SUCH DAMAGE.
36-
*/
371
package com.st.BlueMS.demos.Audio.SpeechToText.ASRServices.IBMWatson;
382

3+
394
import android.content.Context;
405
import android.content.SharedPreferences;
416

BlueMS/src/main/java/com/st/BlueMS/demos/Audio/Utils/AudioConverter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
*/
3737
package com.st.BlueMS.demos.Audio.Utils;
3838

39+
3940
import java.io.IOException;
4041
import java.io.OutputStream;
4142

0 commit comments

Comments
 (0)