mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -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. -->
|
versionName is 2.31, 2.4, or 3.0. -->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.google.zxing.client.android"
|
package="com.google.zxing.client.android"
|
||||||
android:versionName="3.61 beta 1"
|
android:versionName="3.7 beta 1"
|
||||||
android:versionCode="71"
|
android:versionCode="72"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
<!-- We require Cupcake (Android 1.5) or later, but are really targeting Donut. -->
|
<!-- We require Cupcake (Android 1.5) or later, but are really targeting Donut. -->
|
||||||
<uses-sdk android:minSdkVersion="3"
|
<uses-sdk android:minSdkVersion="3"
|
||||||
|
|
|
@ -4,23 +4,18 @@
|
||||||
<link rel="stylesheet" href="../style.css" type="text/css"/>
|
<link rel="stylesheet" href="../style.css" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p><b>New in version 3.61:</b></p>
|
<p><b>New in version 3.7:</b></p>
|
||||||
<ul>
|
<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>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>
|
<li>Prevented secure URIs from being added to History or copied to the clipboard.</li>
|
||||||
</ul>
|
<li>Removed some unnecessary permissions.</li>
|
||||||
<p><b>New in version 3.6:</b></p>
|
<li>Improved support for WiFi and contacts in QR Codes.</li>
|
||||||
<ul>
|
<li>Made sharing of applications via Market work better.</li>
|
||||||
<li>Added support for the Motorola Xoom and other tablets.</li>
|
<li>Fixed loading the right Google sites based on locale.</li>
|
||||||
<li>Added the ability to type in text and encode it as a QR Code.</li>
|
<li>New Indonesian and Greek translations.</li>
|
||||||
<li>Added support for many more locales for web search and product search.</li>
|
<li>Fixes for Chinese, Slovakian, Hebrew, and Danish translations.</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>
|
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -70,8 +70,9 @@ import java.util.Set;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The barcode reader activity itself. This is loosely based on the CameraPreview
|
* This activity opens the camera and does the actual scanning on a background thread. It draws a
|
||||||
* example included in the Android SDK.
|
* 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 dswitkin@google.com (Daniel Switkin)
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
|
@ -154,7 +155,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
setContentView(R.layout.capture);
|
setContentView(R.layout.capture);
|
||||||
|
|
||||||
CameraManager.init(getApplication());
|
|
||||||
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
|
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
|
||||||
resultView = findViewById(R.id.result_view);
|
resultView = findViewById(R.id.result_view);
|
||||||
statusView = (TextView) findViewById(R.id.status_view);
|
statusView = (TextView) findViewById(R.id.status_view);
|
||||||
|
@ -172,6 +172,13 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.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();
|
resetStatusView();
|
||||||
|
|
||||||
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
|
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
|
||||||
|
@ -247,6 +254,12 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
CameraManager.get().closeDriver();
|
CameraManager.get().closeDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
CameraManager.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
inactivityTimer.shutdown();
|
inactivityTimer.shutdown();
|
||||||
|
@ -341,6 +354,9 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
}
|
}
|
||||||
|
|
||||||
public void surfaceCreated(SurfaceHolder holder) {
|
public void surfaceCreated(SurfaceHolder holder) {
|
||||||
|
if (holder == null) {
|
||||||
|
Log.e(TAG, "*** WARNING *** surfaceCreated() gave us a null surface!");
|
||||||
|
}
|
||||||
if (!hasSurface) {
|
if (!hasSurface) {
|
||||||
hasSurface = true;
|
hasSurface = true;
|
||||||
initCamera(holder);
|
initCamera(holder);
|
||||||
|
@ -619,7 +635,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
// Barcode Scanner has seen crashes in the wild of this variety:
|
// Barcode Scanner has seen crashes in the wild of this variety:
|
||||||
// java.?lang.?RuntimeException: Fail to connect to camera service
|
// 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();
|
displayFrameworkBugMessageAndExit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,9 @@ public final class CameraManager {
|
||||||
private final AutoFocusCallback autoFocusCallback;
|
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.
|
* @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.
|
* Gets the CameraManager singleton instance.
|
||||||
*
|
*
|
||||||
|
@ -133,6 +142,7 @@ public final class CameraManager {
|
||||||
camera = theCamera;
|
camera = theCamera;
|
||||||
}
|
}
|
||||||
theCamera.setPreviewDisplay(holder);
|
theCamera.setPreviewDisplay(holder);
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
configManager.initFromCameraParameters(theCamera);
|
configManager.initFromCameraParameters(theCamera);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
version=1.6
|
version=1.6
|
||||||
|
|
||||||
# Set to the location where ProGuard's proguard.jar file can be found
|
# 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:
|
# 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.
|
# Set this to the location where you installed the Android SDK.
|
||||||
#android-home=C:\\Program Files\\android-sdk-windows
|
#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
|
# Set this to the location of a Tomcat installation if you want to compile and run the zxing.org
|
||||||
# web site and web application
|
# web site and web application
|
||||||
|
@ -39,4 +39,4 @@ version=1.6
|
||||||
# location of the Google Web Toolkit (GWT) which can be downloaded here:
|
# location of the Google Web Toolkit (GWT) which can be downloaded here:
|
||||||
# http://code.google.com/webtoolkit/
|
# http://code.google.com/webtoolkit/
|
||||||
# It builds against GWT 2.0.1 at the moment.
|
# 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