mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Made some changes for Ice Cream Sandwich and bumped the version
to 3.7 beta 1. git-svn-id: https://zxing.googlecode.com/svn/trunk@1978 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
bfbcf2b796
commit
4dfe5d7828
|
@ -20,8 +20,8 @@ version to be published. The next versionCode will be 7, regardless of whether t
|
|||
versionName is 2.31, 2.4, or 3.0. -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.google.zxing.client.android"
|
||||
android:versionName="3.61 beta 1"
|
||||
android:versionCode="71"
|
||||
android:versionName="3.7 beta 1"
|
||||
android:versionCode="72"
|
||||
android:installLocation="auto">
|
||||
<!-- We require Cupcake (Android 1.5) or later, but are really targeting Donut. -->
|
||||
<uses-sdk android:minSdkVersion="3"
|
||||
|
|
|
@ -4,23 +4,18 @@
|
|||
<link rel="stylesheet" href="../style.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<p><b>New in version 3.61:</b></p>
|
||||
<p><b>New in version 3.7:</b></p>
|
||||
<ul>
|
||||
<li>Fixed a couple of crashes.</li>
|
||||
<li>Added support for Android 4.0, a.k.a. Ice Cream Sandwich.</li>
|
||||
<li>Fixed several crashes.</li>
|
||||
<li>Made items in the History easier to read.</li>
|
||||
<li>New Indonesian and Greek translations.</li>
|
||||
<li>Fixes for Slovakian, Hebrew, and Danish translations.</li>
|
||||
<li>Prevented secure URIs from being added to History or copied to the clipboard.</li>
|
||||
</ul>
|
||||
<p><b>New in version 3.6:</b></p>
|
||||
<ul>
|
||||
<li>Added support for the Motorola Xoom and other tablets.</li>
|
||||
<li>Added the ability to type in text and encode it as a QR Code.</li>
|
||||
<li>Added support for many more locales for web search and product search.</li>
|
||||
<li>Provided a choice of creating a new contact or merging with an existing one.</li>
|
||||
<li>Allowed third party apps to specify the size of the scanning rectangle.</li>
|
||||
<li>Added Hebrew translation and improved others.</li>
|
||||
<li>Fixed a crash with WiFi codes.</li>
|
||||
<li>Removed some unnecessary permissions.</li>
|
||||
<li>Improved support for WiFi and contacts in QR Codes.</li>
|
||||
<li>Made sharing of applications via Market work better.</li>
|
||||
<li>Fixed loading the right Google sites based on locale.</li>
|
||||
<li>New Indonesian and Greek translations.</li>
|
||||
<li>Fixes for Chinese, Slovakian, Hebrew, and Danish translations.</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -70,8 +70,9 @@ import java.util.Set;
|
|||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
* The barcode reader activity itself. This is loosely based on the CameraPreview
|
||||
* example included in the Android SDK.
|
||||
* This activity opens the camera and does the actual scanning on a background thread. It draws a
|
||||
* viewfinder to help the user place the barcode correctly, shows feedback as the image processing
|
||||
* is happening, and then overlays the results when a scan is successful.
|
||||
*
|
||||
* @author dswitkin@google.com (Daniel Switkin)
|
||||
* @author Sean Owen
|
||||
|
@ -154,7 +155,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
setContentView(R.layout.capture);
|
||||
|
||||
CameraManager.init(getApplication());
|
||||
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
|
||||
resultView = findViewById(R.id.result_view);
|
||||
statusView = (TextView) findViewById(R.id.status_view);
|
||||
|
@ -172,6 +172,13 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
// CameraManager must be initialized here, not in onCreate(). This is necessary because we don't
|
||||
// want to open the camera driver and measure the screen size if we're going to show the help on
|
||||
// first launch. That led to bugs where the scanning rectangle was the wrong size and partially
|
||||
// off screen.
|
||||
CameraManager.init(getApplication());
|
||||
|
||||
resetStatusView();
|
||||
|
||||
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
|
||||
|
@ -247,6 +254,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
CameraManager.get().closeDriver();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
CameraManager.destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
inactivityTimer.shutdown();
|
||||
|
@ -341,6 +354,9 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
}
|
||||
|
||||
public void surfaceCreated(SurfaceHolder holder) {
|
||||
if (holder == null) {
|
||||
Log.e(TAG, "*** WARNING *** surfaceCreated() gave us a null surface!");
|
||||
}
|
||||
if (!hasSurface) {
|
||||
hasSurface = true;
|
||||
initCamera(holder);
|
||||
|
@ -619,7 +635,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
|||
} catch (RuntimeException e) {
|
||||
// Barcode Scanner has seen crashes in the wild of this variety:
|
||||
// java.?lang.?RuntimeException: Fail to connect to camera service
|
||||
Log.w(TAG, "Unexpected error initializating camera", e);
|
||||
Log.w(TAG, "Unexpected error initializing camera", e);
|
||||
displayFrameworkBugMessageAndExit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,9 @@ public final class CameraManager {
|
|||
private final AutoFocusCallback autoFocusCallback;
|
||||
|
||||
/**
|
||||
* Initializes this static object with the Context of the calling Activity.
|
||||
* Initializes this static object with the Context of the calling Activity. The caller of this
|
||||
* method relies on the ability to harmlessly call it multiple times and only have the object
|
||||
* built once, the first time.
|
||||
*
|
||||
* @param context The Activity which wants to use the camera.
|
||||
*/
|
||||
|
@ -93,6 +95,13 @@ public final class CameraManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all state. We don't want to keep global variables around from one launch to another.
|
||||
*/
|
||||
public static void destroy() {
|
||||
cameraManager = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the CameraManager singleton instance.
|
||||
*
|
||||
|
@ -133,6 +142,7 @@ public final class CameraManager {
|
|||
camera = theCamera;
|
||||
}
|
||||
theCamera.setPreviewDisplay(holder);
|
||||
|
||||
if (!initialized) {
|
||||
initialized = true;
|
||||
configManager.initFromCameraParameters(theCamera);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version=1.6
|
||||
|
||||
# Set to the location where ProGuard's proguard.jar file can be found
|
||||
#proguard-jar=
|
||||
proguard-jar=/Users/dswitkin/Source/android-sdk/tools/proguard/lib/proguard.jar
|
||||
|
||||
# If you are building the J2ME client:
|
||||
#
|
||||
|
@ -28,7 +28,7 @@ version=1.6
|
|||
|
||||
# Set this to the location where you installed the Android SDK.
|
||||
#android-home=C:\\Program Files\\android-sdk-windows
|
||||
#android-home=/usr/local/android
|
||||
android-home=/Users/dswitkin/Source/android-sdk
|
||||
|
||||
# Set this to the location of a Tomcat installation if you want to compile and run the zxing.org
|
||||
# web site and web application
|
||||
|
@ -39,4 +39,4 @@ version=1.6
|
|||
# location of the Google Web Toolkit (GWT) which can be downloaded here:
|
||||
# http://code.google.com/webtoolkit/
|
||||
# It builds against GWT 2.0.1 at the moment.
|
||||
#GWT-home=/usr/local/gwt
|
||||
#GWT-home=/usr/local/gwt
|
||||
|
|
Loading…
Reference in a new issue