mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
Issue 1392 log and warn about bad return URLs
git-svn-id: https://zxing.googlecode.com/svn/trunk@2448 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
09e0fb3af3
commit
51c1ce93e6
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.google.zxing.client.android;
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.Result;
|
||||
import com.google.zxing.client.android.camera.CameraManager;
|
||||
|
@ -97,7 +98,11 @@ public final class CaptureActivityHandler extends Handler {
|
|||
String url = (String) message.obj;
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
|
||||
activity.startActivity(intent);
|
||||
try {
|
||||
activity.startActivity(intent);
|
||||
} catch (ActivityNotFoundException anfe) {
|
||||
Log.w(TAG, "Can't find anything to handle VIEW of URI " + url);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue