Skip to content

Commit 590a415

Browse files
committed
External activity failure - modify debug code
1 parent 1e93955 commit 590a415

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/src/main/java/com/samsung/microbit/ui/UIUtils.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,17 +317,21 @@ public static void safelyStartActivityToastOpenLink( Context context) {
317317
safelyStartActivityToast( context, context.getString(R.string.unable_to_open_link));
318318
}
319319

320+
// public static boolean safelyStartActivityDebugFail = false;
321+
320322
// Wrap startActivity and startActivityForResult
321323
// Call resolveActivity and catch exception from startActivity
322324
// Return non-zero error on fail
323325
// When startActivityForResult fails, the caller likely
324326
// needs to add code similar to the cancel case in onActivityResult
325327
public static int safelyStartActivity( Context context, boolean report, Intent intent,
326328
boolean forResult, int requestCode, Bundle options) {
327-
// if ( report) {
328-
// safelyStartActivityToastGeneric( context);
329+
// if ( safelyStartActivityDebugFail) {
330+
// if (report) {
331+
// safelyStartActivityToastGeneric(context);
332+
// }
333+
// return 4;
329334
// }
330-
// return 4;
331335

332336
int error = 0;
333337
ComponentName componentName = intent.resolveActivity( context.getPackageManager());

0 commit comments

Comments
 (0)