mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
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:
parent
aef1dedb61
commit
9de8f5e1f0
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue