Skip to content

Commit c24ef34

Browse files
committed
External activity failure - tidy up
1 parent 8d9c464 commit c24ef34

File tree

4 files changed

+0
-55
lines changed

4 files changed

+0
-55
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ public void bluetoothEnableRestricted() {
6363
UIUtils.safelyStartActivityToast( mClient.fetchPopupsContext(),
6464
mClient.fetchPopupsContext().getString(R.string.unable_to_start_activity_to_enable_bluetooth));
6565
mClient.fetchPopupsCancelled();
66-
// PopUp.show( mClient.fetchPopupsContext().getString(R.string.this_device_may_have_restrictions_in_place), //message
67-
// mClient.fetchPopupsContext().getString(R.string.unable_to_start_activity_to_enable_bluetooth),
68-
// R.drawable.error_face, R.drawable.red_btn,
69-
// PopUp.GIFF_ANIMATION_ERROR,
70-
// PopUp.TYPE_ALERT,
71-
// popupClickActivityCancelled, popupClickActivityCancelled);
7266
}
7367

7468
public void bluetoothConnectPermissionError() {

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

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -279,28 +279,6 @@ public void gifAnimate( @IdRes int id) {
279279
}
280280
}
281281

282-
// public static void safelyStartActivityPopup( Context context, String message, String title) {
283-
// PopUp.show( message, title,
284-
// R.drawable.error_face,
285-
// R.drawable.red_btn,
286-
// PopUp.GIFF_ANIMATION_ERROR,
287-
// PopUp.TYPE_ALERT,
288-
// null,
289-
// null);
290-
// }
291-
//
292-
// public static void safelyStartActivityPopup( Context context, String title) {
293-
// safelyStartActivityPopup( context, context.getString(R.string.this_device_may_have_restrictions_in_place), title);
294-
// }
295-
//
296-
// public static void safelyStartActivityPopupGeneric( Context context) {
297-
// safelyStartActivityPopup( context, context.getString(R.string.unable_to_start_activity));
298-
// }
299-
//
300-
// public static void safelyStartActivityPopupOpenLink( Context context) {
301-
// safelyStartActivityPopup( context, context.getString(R.string.unable_to_open_link));
302-
// }
303-
304282
public static void safelyStartActivityToast( Context context, String message, String title) {
305283
Toast.makeText( context, title + ".\n" + message, Toast.LENGTH_LONG).show();
306284
}
@@ -320,7 +298,6 @@ public static void safelyStartActivityToastOpenLink( Context context) {
320298
// public static boolean safelyStartActivityDebugFail = false;
321299

322300
// Wrap startActivity and startActivityForResult
323-
// Call resolveActivity and catch exception from startActivity
324301
// Return non-zero error on fail
325302
// When startActivityForResult fails, the caller likely
326303
// needs to add code similar to the cancel case in onActivityResult
@@ -334,14 +311,6 @@ public static int safelyStartActivity( Context context, boolean report, Intent i
334311
// }
335312

336313
int error = 0;
337-
ComponentName componentName = intent.resolveActivity( context.getPackageManager());
338-
if ( componentName == null) {
339-
/* TODO: Why is componentName null for
340-
ACTION_CREATE_DOCUMENT (unless createChooser is used)
341-
ACTION_VIEW?
342-
*/
343-
Log.i(TAG,"startActivity - no component");
344-
}
345314

346315
try {
347316
if ( forResult) {

app/src/main/java/com/samsung/microbit/ui/activity/PairingActivity.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,12 +1207,6 @@ private void enableBluetooth() {
12071207
setActivityState(PairingActivityState.STATE_IDLE);
12081208
UIUtils.safelyStartActivityToast( this, getString(R.string.unable_to_start_activity_to_enable_bluetooth));
12091209
onFinish( RESULT_CANCELED);
1210-
// PopUp.show( getString(R.string.this_device_may_have_restrictions_in_place), //message
1211-
// getString(R.string.unable_to_start_activity_to_enable_bluetooth),
1212-
// R.drawable.error_face, R.drawable.red_btn,
1213-
// PopUp.GIFF_ANIMATION_ERROR,
1214-
// PopUp.TYPE_ALERT,
1215-
// failedPermissionHandler, failedPermissionHandler);
12161210
}
12171211
}
12181212

@@ -1260,12 +1254,6 @@ public void popupLocationRestricted() {
12601254
UIUtils.safelyStartActivityToast( this,
12611255
getString(R.string.unable_to_start_activity_to_enable_location_services));
12621256
onFinish( RESULT_CANCELED);
1263-
// PopUp.show( getString(R.string.this_device_may_have_restrictions_in_place), //message
1264-
// getString(R.string.unable_to_start_activity_to_enable_location_services),
1265-
// R.drawable.error_face, R.drawable.red_btn,
1266-
// PopUp.GIFF_ANIMATION_ERROR,
1267-
// PopUp.TYPE_ALERT,
1268-
// failedPermissionHandler, failedPermissionHandler);
12691257
}
12701258

12711259
@Override

app/src/main/java/com/samsung/microbit/ui/activity/ProjectActivity.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,12 +1090,6 @@ private void enableBluetooth() {
10901090
UIUtils.safelyStartActivityToast( this,
10911091
getString(R.string.unable_to_start_activity_to_enable_bluetooth));
10921092
onFlashComplete();
1093-
// PopUp.show( getString(R.string.this_device_may_have_restrictions_in_place), //message
1094-
// getString(R.string.unable_to_start_activity_to_enable_bluetooth),
1095-
// R.drawable.error_face, R.drawable.red_btn,
1096-
// PopUp.GIFF_ANIMATION_ERROR,
1097-
// TYPE_ALERT,
1098-
// popupClickFlashComplete, popupClickFlashComplete);
10991093
}
11001094
}
11011095

0 commit comments

Comments
 (0)