Skip to content

Commit

Permalink
External activity failure - modify debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwork committed Sep 12, 2024
1 parent 1e93955 commit 590a415
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/com/samsung/microbit/ui/UIUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,21 @@ public static void safelyStartActivityToastOpenLink( Context context) {
safelyStartActivityToast( context, context.getString(R.string.unable_to_open_link));
}

// public static boolean safelyStartActivityDebugFail = false;

// Wrap startActivity and startActivityForResult
// Call resolveActivity and catch exception from startActivity
// Return non-zero error on fail
// When startActivityForResult fails, the caller likely
// needs to add code similar to the cancel case in onActivityResult
public static int safelyStartActivity( Context context, boolean report, Intent intent,
boolean forResult, int requestCode, Bundle options) {
// if ( report) {
// safelyStartActivityToastGeneric( context);
// if ( safelyStartActivityDebugFail) {
// if (report) {
// safelyStartActivityToastGeneric(context);
// }
// return 4;
// }
// return 4;

int error = 0;
ComponentName componentName = intent.resolveActivity( context.getPackageManager());
Expand Down

0 comments on commit 590a415

Please sign in to comment.