mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Minor revision to last change to Google Glass Intents
This commit is contained in:
parent
aedd6262e6
commit
f302d02ea1
1
AUTHORS
1
AUTHORS
|
@ -50,6 +50,7 @@ hosigumayuugi
|
|||
hypest (Barcorama project)
|
||||
Ian W. Davis
|
||||
Isaac Potoczny-Jones
|
||||
Ivan Poliakov
|
||||
Jacob Haynes (Google)
|
||||
Jeff Breidenbach (Google)
|
||||
Joan Montané (Softcatalà.cat)
|
||||
|
|
|
@ -60,14 +60,8 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
|
||||
// returnResult should be true if activity was started using
|
||||
// startActivityForResult() with SCAN_ACTION intent
|
||||
returnResult = false;
|
||||
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
String action = intent.getAction();
|
||||
if (action != null)
|
||||
returnResult = action.equals(SCAN_ACTION);
|
||||
}
|
||||
returnResult = intent != null && SCAN_ACTION.equals(intent.getAction());
|
||||
|
||||
Window window = getWindow();
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
@ -171,7 +165,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
|
||||
void setResult(Result result) {
|
||||
if (returnResult) {
|
||||
Intent scanResult = new Intent();
|
||||
Intent scanResult = new Intent("com.google.zxing.client.android.SCAN");
|
||||
scanResult.putExtra("SCAN_RESULT", result.getText());
|
||||
setResult(RESULT_OK, scanResult);
|
||||
finish();
|
||||
|
|
Loading…
Reference in a new issue