[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809

srowen srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:32:22 UTC 2010


The following commit has been merged in the upstream branch:
commit 00b6c0c72e3af4fa80bbae58bd4048e3fa6e89a1
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date:   Wed Jun 23 10:23:09 2010 +0000

    Small style things
    
    git-svn-id: http://zxing.googlecode.com/svn/trunk@1457 59b500cc-1b3d-0410-9834-0bbf25fbcc57

diff --git a/android/src/com/google/zxing/client/android/result/WifiResultHandler.java b/android/src/com/google/zxing/client/android/result/WifiResultHandler.java
index 1cc2b5d..2ef26c2 100644
--- a/android/src/com/google/zxing/client/android/result/WifiResultHandler.java
+++ b/android/src/com/google/zxing/client/android/result/WifiResultHandler.java
@@ -28,10 +28,9 @@ import com.google.zxing.client.result.WifiParsedResult;
  * @author viki at google.com (Vikram Aggarwal)
  */
 public final class WifiResultHandler extends ResultHandler {
-  Activity parentActivity = null;
+
   public WifiResultHandler(Activity activity, ParsedResult result) {
     super(activity, result);
-    parentActivity = activity;
   }
 
   @Override
@@ -42,24 +41,18 @@ public final class WifiResultHandler extends ResultHandler {
 
   @Override
   public int getButtonText(int index) {
-    switch (index) {
-    case 0:
+    if (index == 0) {
       return R.string.button_wifi;
-    default:
-      throw new ArrayIndexOutOfBoundsException();
     }
+    throw new ArrayIndexOutOfBoundsException();
   }
 
   @Override
   public void handleButtonPress(int index) {
     // Get the underlying wifi config
     WifiParsedResult wifiResult = (WifiParsedResult) getResult();
-    switch (index) {
-    case 0:
+    if (index == 0) {
       wifiConnect(wifiResult);
-      break;
-    default:
-      break;
     }
   }
 
diff --git a/android/src/com/google/zxing/client/android/wifi/ConnectedReceiver.java b/android/src/com/google/zxing/client/android/wifi/ConnectedReceiver.java
index 40ce99c..c42852b 100644
--- a/android/src/com/google/zxing/client/android/wifi/ConnectedReceiver.java
+++ b/android/src/com/google/zxing/client/android/wifi/ConnectedReceiver.java
@@ -1,10 +1,22 @@
-package com.google.zxing.client.android.wifi;
+/*
+ * Copyright (C) 2010 ZXing authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
-import com.google.zxing.client.android.R;
+package com.google.zxing.client.android.wifi;
 
 import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.ActivityNotFoundException;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
diff --git a/android/src/com/google/zxing/client/android/wifi/WifiActivity.java b/android/src/com/google/zxing/client/android/wifi/WifiActivity.java
index b86fed0..948aa45 100644
--- a/android/src/com/google/zxing/client/android/wifi/WifiActivity.java
+++ b/android/src/com/google/zxing/client/android/wifi/WifiActivity.java
@@ -19,12 +19,9 @@ package com.google.zxing.client.android.wifi;
 import java.util.List;
 
 import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.ActivityNotFoundException;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.net.ConnectivityManager;
-import android.net.Uri;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
 import android.os.Bundle;

-- 
Multi-format 1D/2D barcode image processing library



More information about the Pkg-google-commits mailing list