catch exception on starting orbot if not installed (Christian Schneppe)

This commit is contained in:
12aw 2022-05-23 19:03:58 +02:00
parent 4a52eb89a9
commit e2d7d88550
3 changed files with 7 additions and 2 deletions

View file

@ -41,6 +41,10 @@ public class TorServiceUtils {
}
public static void startOrbot(Activity activity, int requestCode) {
activity.startActivityForResult(LAUNCH_INTENT, requestCode);
try {
activity.startActivityForResult(LAUNCH_INTENT, requestCode);
} catch (ActivityNotFoundException e) {
ToastCompat.makeText(activity, R.string.orbot_not_found, ToastCompat.LENGTH_SHORT).show();
}
}
}

View file

@ -1173,5 +1173,5 @@
<string name="pref_showtextformatting_sum">Zeige Leiste zur Textformatierung im Chat wenn die Bildschirmtastatur angezeigt wird.</string>
<string name="pref_showtextformatting">Zeige Leiste zur Textformatierung</string>
<string name="pref_enable_otr_summary">Aktiviere OTR Verschlüsselung für Nachrichten. Achtung: Die OTR Verschlüsseliung ist noch instabil. Bitte nutze sie nur, wenn Du genau weißt was Du machst.</string>
<string name="orbot_not_found">Orbot nicht gefunden</string>
</resources>

View file

@ -1202,4 +1202,5 @@
<string name="continue_btn">Continue</string>
<string name="participants">Participants</string>
<string name="download_failed_invalid_file">Download failed: Invalid file</string>
<string name="orbot_not_found">Orbot not found</string>
</resources>