public static synchronized void handleGlobalError(final Context context, final RRError error) { addGlobalError(error); AndroidApi.UI_THREAD_HANDLER.post( new Runnable() { @Override public void run() { final Intent intent = new Intent(context, BugReportActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } }); }
private void revertToWeb() { final Runnable r = new Runnable() { public void run() { if (!mHaveReverted) { mHaveReverted = true; LinkHandler.onLinkClicked(AlbumListingActivity.this, mUrl, true); finish(); } } }; if (General.isThisUIThread()) { r.run(); } else { AndroidApi.UI_THREAD_HANDLER.post(r); } }