Catch possible SecurityException in startActivity

It may be thrown if a private component is called
This commit is contained in:
emanuele-f 2022-08-13 11:19:43 +02:00
parent 42c9ec389e
commit 7d794e2d65

View File

@ -1043,7 +1043,7 @@ public class Utils {
public static void startActivity(Context ctx, Intent intent) {
try {
ctx.startActivity(intent);
} catch (ActivityNotFoundException e) {
} catch (ActivityNotFoundException | SecurityException e) {
showToastLong(ctx, R.string.no_intent_handler_found);
}
}