Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/mumla.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lublin <daniel@lublin.se>2020-04-20 16:40:01 +0300
committerDaniel Lublin <daniel@lublin.se>2020-04-20 22:44:48 +0300
commit6339a0ff34920242584871c7a8a707fdd6571772 (patch)
treed33eda139d19871a1767b266263ce37669cab3e1
parent5ac8b69518bd6f158c69f8686a59513396294b35 (diff)
Change alert for pref change requiring reconnect into a toast
This avoids the issue with that alert which seems to have to be of the system type (to appear properly, somehow?) and thus requires the draw-over-apps permission. A permission we might not yet have been granted.
-rw-r--r--app/src/main/java/se/lublin/mumla/service/MumlaService.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/app/src/main/java/se/lublin/mumla/service/MumlaService.java b/app/src/main/java/se/lublin/mumla/service/MumlaService.java
index e9c927b..273ff5d 100644
--- a/app/src/main/java/se/lublin/mumla/service/MumlaService.java
+++ b/app/src/main/java/se/lublin/mumla/service/MumlaService.java
@@ -30,11 +30,8 @@ import android.os.IBinder;
import android.os.PowerManager;
import android.preference.PreferenceManager;
import android.speech.tts.TextToSpeech;
-import android.view.WindowManager;
import android.widget.Toast;
-import androidx.appcompat.app.AlertDialog;
-
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
@@ -451,13 +448,7 @@ public class MumlaService extends HumlaService implements
}
if (requiresReconnect && isConnectionEstablished()) {
- AlertDialog ad = new AlertDialog.Builder(this)
- .setTitle(R.string.information)
- .setMessage(R.string.change_requires_reconnect)
- .setPositiveButton(android.R.string.ok, null)
- .create();
- ad.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
- ad.show();
+ Toast.makeText(this, R.string.change_requires_reconnect, Toast.LENGTH_LONG).show();
}
}