Catch SecurityException in more scenarios
@@ -508,7 +508,7 @@ public class U {
try {
launcherApps.startMainActivity(componentName, userManager.getUserForSerialNumber(userId), null, bundle);
- } catch (ActivityNotFoundException | NullPointerException e) { /* Gracefully fail */ }
+ } catch (ActivityNotFoundException | NullPointerException | SecurityException e) { /* Gracefully fail */ }
}
@TargetApi(Build.VERSION_CODES.N_MR1)
@@ -518,7 +518,7 @@ public class U {
if(launcherApps.hasShortcutHostPermission()) {
try {
launcherApps.startShortcut(shortcut, null, bundle);
- } catch (ActivityNotFoundException | NullPointerException e) { /* Gracefully fail */ }
+ } catch (ActivityNotFoundException | NullPointerException | SecurityException e) { /* Gracefully fail */ }
}
}
