Hid the Share menu if the results screen was showing, since it didn't make sense. Also change the autofocus delay to 1.5 seconds, to make it hunt a little less, and give the autoexposure system more time to run.

git-svn-id: https://zxing.googlecode.com/svn/trunk@683 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2008-11-10 22:47:09 +00:00
parent aef1dedb61
commit 9de8f5e1f0
2 changed files with 10 additions and 2 deletions

View file

@ -187,8 +187,8 @@ final class CameraManager {
public void onAutoFocus(boolean success, Camera camera) {
if (mAutoFocusHandler != null) {
Message message = mAutoFocusHandler.obtainMessage(mAutoFocusMessage, success);
// Simulate continuous autofocus by sending a focus request every second.
mAutoFocusHandler.sendMessageDelayed(message, 1000);
// Simulate continuous autofocus by sending a focus request every 1.5 seconds.
mAutoFocusHandler.sendMessageDelayed(message, 1500);
mAutoFocusHandler = null;
}
}

View file

@ -178,6 +178,14 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
return true;
}
// Don't display the share menu item if the result overlay is showing.
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
menu.findItem(SHARE_ID).setVisible(mLastResult == null);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {