diff --git a/.idea/libraries/animated_vector_drawable_24_2_0.xml b/.idea/libraries/animated_vector_drawable_24_2_0.xml
deleted file mode 100644
index 0a374b7..0000000
--- a/.idea/libraries/animated_vector_drawable_24_2_0.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/appcompat_v7_24_2_0.xml b/.idea/libraries/appcompat_v7_24_2_0.xml
deleted file mode 100644
index f11eefb..0000000
--- a/.idea/libraries/appcompat_v7_24_2_0.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/design_24_2_0.xml b/.idea/libraries/design_24_2_0.xml
deleted file mode 100644
index 79d967c..0000000
--- a/.idea/libraries/design_24_2_0.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/firebase_analytics_10_0_1.xml b/.idea/libraries/firebase_analytics_10_0_1.xml
deleted file mode 100644
index 4cf6b2b..0000000
--- a/.idea/libraries/firebase_analytics_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/firebase_analytics_impl_10_0_1.xml b/.idea/libraries/firebase_analytics_impl_10_0_1.xml
deleted file mode 100644
index f01eed7..0000000
--- a/.idea/libraries/firebase_analytics_impl_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/firebase_common_10_0_1.xml b/.idea/libraries/firebase_common_10_0_1.xml
deleted file mode 100644
index 5e58fd2..0000000
--- a/.idea/libraries/firebase_common_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/firebase_core_10_0_1.xml b/.idea/libraries/firebase_core_10_0_1.xml
deleted file mode 100644
index 7eac249..0000000
--- a/.idea/libraries/firebase_core_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/firebase_iid_10_0_1.xml b/.idea/libraries/firebase_iid_10_0_1.xml
deleted file mode 100644
index 8b20884..0000000
--- a/.idea/libraries/firebase_iid_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/firebase_messaging_10_0_1.xml b/.idea/libraries/firebase_messaging_10_0_1.xml
deleted file mode 100644
index 9274a51..0000000
--- a/.idea/libraries/firebase_messaging_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/hamcrest_core_1_3.xml b/.idea/libraries/hamcrest_core_1_3.xml
deleted file mode 100644
index 157e3f3..0000000
--- a/.idea/libraries/hamcrest_core_1_3.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/junit_4_12.xml b/.idea/libraries/junit_4_12.xml
deleted file mode 100644
index 305df30..0000000
--- a/.idea/libraries/junit_4_12.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/mobmetricalib_2_51.xml b/.idea/libraries/mobmetricalib_2_51.xml
deleted file mode 100644
index a617f70..0000000
--- a/.idea/libraries/mobmetricalib_2_51.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/play_services_basement_10_0_1.xml b/.idea/libraries/play_services_basement_10_0_1.xml
deleted file mode 100644
index b4d86ac..0000000
--- a/.idea/libraries/play_services_basement_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/play_services_tasks_10_0_1.xml b/.idea/libraries/play_services_tasks_10_0_1.xml
deleted file mode 100644
index b9e9877..0000000
--- a/.idea/libraries/play_services_tasks_10_0_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/recyclerview_v7_24_2_0.xml b/.idea/libraries/recyclerview_v7_24_2_0.xml
deleted file mode 100644
index 7685fa4..0000000
--- a/.idea/libraries/recyclerview_v7_24_2_0.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_annotations_24_2_0.xml b/.idea/libraries/support_annotations_24_2_0.xml
deleted file mode 100644
index b01b9db..0000000
--- a/.idea/libraries/support_annotations_24_2_0.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_compat_24_2_0.xml b/.idea/libraries/support_compat_24_2_0.xml
deleted file mode 100644
index 47523fc..0000000
--- a/.idea/libraries/support_compat_24_2_0.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_core_ui_24_2_0.xml b/.idea/libraries/support_core_ui_24_2_0.xml
deleted file mode 100644
index d556aee..0000000
--- a/.idea/libraries/support_core_ui_24_2_0.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_core_utils_24_2_0.xml b/.idea/libraries/support_core_utils_24_2_0.xml
deleted file mode 100644
index d25d4e2..0000000
--- a/.idea/libraries/support_core_utils_24_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_fragment_24_2_0.xml b/.idea/libraries/support_fragment_24_2_0.xml
deleted file mode 100644
index 0454e30..0000000
--- a/.idea/libraries/support_fragment_24_2_0.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_media_compat_24_2_0.xml b/.idea/libraries/support_media_compat_24_2_0.xml
deleted file mode 100644
index a384736..0000000
--- a/.idea/libraries/support_media_compat_24_2_0.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_v4_24_2_0.xml b/.idea/libraries/support_v4_24_2_0.xml
deleted file mode 100644
index c8f65e5..0000000
--- a/.idea/libraries/support_v4_24_2_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/support_vector_drawable_24_2_0.xml b/.idea/libraries/support_vector_drawable_24_2_0.xml
deleted file mode 100644
index f11f5ef..0000000
--- a/.idea/libraries/support_vector_drawable_24_2_0.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/volley_1_0_0.xml b/.idea/libraries/volley_1_0_0.xml
deleted file mode 100644
index 319ac37..0000000
--- a/.idea/libraries/volley_1_0_0.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 211abac..8740b82 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/app/src/main/java/ru/aacidov/distalkpro/TTS.java b/app/src/main/java/ru/aacidov/distalkpro/TTS.java
index 87542d6..114376c 100755
--- a/app/src/main/java/ru/aacidov/distalkpro/TTS.java
+++ b/app/src/main/java/ru/aacidov/distalkpro/TTS.java
@@ -2,6 +2,7 @@
import android.content.Context;
import android.speech.tts.TextToSpeech;
+import android.widget.Toast;
import java.util.Locale;
@@ -16,10 +17,16 @@ public TTS() {
tts = new TextToSpeech(MainActivity.context, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int i) {
- tts.setLanguage(Locale.getDefault());
+ if(i == TextToSpeech.SUCCESS) {
+ tts.setLanguage(Locale.getDefault());
+ }
+ else if (i == TextToSpeech.LANG_MISSING_DATA ||
+ i == TextToSpeech.LANG_NOT_SUPPORTED) {
+ Toast.makeText(MainActivity.context, "Error initializing text to speech!", Toast.LENGTH_LONG).show();
+ return;
+ }
}
});
-
}
public static TTS getInstance() {
diff --git a/build.gradle b/build.gradle
index 363efae..17e953a 100755
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.3.3'
+ classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.yandex.android:mobmetricalib:2.51'
// NOTE: Do not place your application dependencies here; they belong
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 297777f..fe07b48 100755
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon Dec 18 22:13:25 MSK 2017
+#Tue Dec 19 14:46:08 MSK 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip