on develop help sign in
Catch only ActivityNotFoundException.
9e0fc93Robert Klotzner
reflex-dom/java/org/reflexfrp/reflexdom/MainWidget.java+2−1
@@ -21,6 +21,7 @@ import android.graphics.Bitmap;
21import java.io.IOException;
21import java.io.IOException;
22import java.io.InputStream;
22import java.io.InputStream;
23import android.content.Intent;
23import android.content.Intent;
24+import android.content.ActivityNotFoundException;
24
25
25import java.nio.charset.StandardCharsets;
26import java.nio.charset.StandardCharsets;
26
27
@@ -82,7 +83,7 @@ public class MainWidget {
82 try {
83 try {
83 view.getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
84 view.getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
84 }
85 }
85− catch(Exception e) {
86+ catch(ActivityNotFoundException e) {
86 Log.e("reflex", "Starting activity for intent '" + url + "' failed!");
87 Log.e("reflex", "Starting activity for intent '" + url + "' failed!");
87 }
88 }
88 return true;
89 return true;