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

srowen srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Jun 30 15:29:58 UTC 2010


The following commit has been merged in the upstream branch:
commit 2444e973655f5b117e5eb507646dabaac3b11eea
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date:   Fri Mar 26 12:13:13 2010 +0000

    Add option to disable front light
    
    git-svn-id: http://zxing.googlecode.com/svn/trunk@1259 59b500cc-1b3d-0410-9834-0bbf25fbcc57

diff --git a/android/res/values-cs/strings.xml b/android/res/values-cs/strings.xml
index e08cc48..e73a771 100644
--- a/android/res/values-cs/strings.xml
+++ b/android/res/values-cs/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Nastavení</string>
   <string name="preferences_play_beep_title">Zvuky</string>
   <string name="preferences_vibrate_title">Vibrace</string>
+  <string name="preferences_front_light_title">Přední světla</string>
+  <string name="preferences_front_light_summary">Povolte přední světlo, pokud je k dispozici</string>
   <string name="preferences_result_title">Výsledek nastavení</string>
   <string name="preferences_custom_product_search_title">Vlastní vyhledávání URL.</string>
   <string name="preferences_custom_product_search_summary">Použít % jako zástupný symbol pro ID produktu</string>
diff --git a/android/res/values-de/strings.xml b/android/res/values-de/strings.xml
index 90e3f57..3555c54 100644
--- a/android/res/values-de/strings.xml
+++ b/android/res/values-de/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Einstellungen</string>
   <string name="preferences_play_beep_title">Ton</string>
   <string name="preferences_vibrate_title">Vibration</string>
+  <string name="preferences_front_light_title">Vor Licht</string>
+  <string name="preferences_front_light_summary">Aktivieren Sie vor Licht, wenn verfügbar</string>
   <string name="preferences_result_title">Ergebnis-Einstellungen</string>
   <string name="preferences_custom_product_search_title">Eigene Such-URL</string>
   <string name="preferences_custom_product_search_summary">Verwenden Sie %s als Platzhalter für die Produkt-ID</string>
diff --git a/android/res/values-es/strings.xml b/android/res/values-es/strings.xml
index 4223b71..d1ab05f 100644
--- a/android/res/values-es/strings.xml
+++ b/android/res/values-es/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Configuración</string>
   <string name="preferences_play_beep_title">Bip</string>
   <string name="preferences_vibrate_title">Vibrar</string>
+  <string name="preferences_front_light_title">Luz delantera</string>
+  <string name="preferences_front_light_summary">Activar luz delantera si está disponible</string>
   <string name="preferences_result_title">Configuración de resultados</string>
   <string name="preferences_custom_product_search_title">Búsqueda de productos con URL personalizada</string>
   <string name="preferences_custom_product_search_summary">Usar %s como un marcador de posición para el identificador de producto</string>
diff --git a/android/res/values-fi/strings.xml b/android/res/values-fi/strings.xml
index 34d8ab9..57cbba1 100644
--- a/android/res/values-fi/strings.xml
+++ b/android/res/values-fi/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Asetukset</string>
   <string name="preferences_play_beep_title">Piip</string>
   <string name="preferences_vibrate_title">Värinä</string>
+  <string name="preferences_front_light_title">Valo edessä</string>
+  <string name="preferences_front_light_summary">Activoi valo edessä, jos käytettävissä</string>
   <string name="preferences_result_title">Tuloksien asetukset</string>
   <string name="preferences_custom_product_search_title">Mukautettu hakukone</string>
   <string name="preferences_custom_product_search_summary">Käytä %s paikkana tuotetunnukselle</string>
diff --git a/android/res/values-fr/strings.xml b/android/res/values-fr/strings.xml
index c8cba0d..a3e38b9 100644
--- a/android/res/values-fr/strings.xml
+++ b/android/res/values-fr/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Paramètres</string>
   <string name="preferences_play_beep_title">Bip</string>
   <string name="preferences_vibrate_title">Vibrer</string>
+  <string name="preferences_front_light_title">Phare avant</string>
+  <string name="preferences_front_light_summary">Activer phare avant si disponible</string>
   <string name="preferences_result_title">Paramètres de résultat</string>
   <string name="preferences_custom_product_search_title">URL personnalisée de recherche</string>
   <string name="preferences_custom_product_search_summary">Utiliser %s à la place de l\'identifiant du produit</string>
diff --git a/android/res/values-it/strings.xml b/android/res/values-it/strings.xml
index f0d0dcf..aea9e61 100644
--- a/android/res/values-it/strings.xml
+++ b/android/res/values-it/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Impostazioni</string>
   <string name="preferences_play_beep_title">Suona</string>
   <string name="preferences_vibrate_title">Vibra</string>
+  <string name="preferences_front_light_title">Luce anteriore</string>
+  <string name="preferences_front_light_summary">Consentire la luce anteriore, se disponibile</string>
   <string name="preferences_result_title">Impostazioni risultato</string>
   <string name="preferences_custom_product_search_title">URL ricerca prodotto personalizzata</string>
   <string name="preferences_custom_product_search_summary">Utilizza %s come segnaposto per l\'ID del prodotto</string>
diff --git a/android/res/values-ja-rJP/strings.xml b/android/res/values-ja-rJP/strings.xml
index 13d1b7b..7266e28 100644
--- a/android/res/values-ja-rJP/strings.xml
+++ b/android/res/values-ja-rJP/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">設定</string>
   <string name="preferences_play_beep_title">通知音</string>
   <string name="preferences_vibrate_title">バイブ</string>
+  <string name="preferences_front_light_title">フロントライト</string>
+  <string name="preferences_front_light_summary">有効にするフロントライト可能な場合</string>
   <string name="preferences_result_title">検索結果の設定</string>
   <string name="preferences_custom_product_search_title">カスタム商品サーチ URL</string>
   <string name="preferences_custom_product_search_summary">URL中の「%s」はスキャン結果に置換される</string>
diff --git a/android/res/values-nl/strings.xml b/android/res/values-nl/strings.xml
index 036298d..cac7791 100644
--- a/android/res/values-nl/strings.xml
+++ b/android/res/values-nl/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Instellingen</string>
   <string name="preferences_play_beep_title">Piepen</string>
   <string name="preferences_vibrate_title">Trillen</string>
+  <string name="preferences_front_light_title">Voorzijde licht</string>
+  <string name="preferences_front_light_summary">Inschakelen voorzijde licht, indien beschikbaar</string>
   <string name="preferences_result_title">Instellingen voor resultaat</string>
   <string name="preferences_custom_product_search_title">Zoek aangepaste URL</string>
   <string name="preferences_custom_product_search_summary">Gebruik %s voor de plaats van het product ID</string>
diff --git a/android/res/values-ru/strings.xml b/android/res/values-ru/strings.xml
index 7c74249..20f4204 100644
--- a/android/res/values-ru/strings.xml
+++ b/android/res/values-ru/strings.xml
@@ -81,14 +81,16 @@
   <string name="msg_sbc_searching_book">Поиск книги\u2026</string>
   <string name="msg_share_explanation">Вы можете поделиться данными, сканировав штрих-код с вашего экрана другим телефоном.</string>
   <string name="msg_share_subject_line">Тут содержимое отсканированных Вами штрих-кодов</string>
-  <string name="preferences_name">Настройки</string>
-  <string name="preferences_general_title">Общие настройки</string>
+  <string name="preferences_actions_title">Когда штрих-код найден\u2026</string>
+  <string name="preferences_copy_to_clipboard_title">Копировать в буфер обмена</string>
   <string name="preferences_decode_1D_title">Распознавать линейные штрих-коды</string>
   <string name="preferences_decode_QR_title">Распознавать QR-коды</string>
-  <string name="preferences_actions_title">Когда штрих-код найден\u2026</string>
+  <string name="preferences_general_title">Общие настройки</string>
+  <string name="preferences_name">Настройки</string>
   <string name="preferences_play_beep_title">Пищать</string>
   <string name="preferences_vibrate_title">Вибрировать</string>
-  <string name="preferences_copy_to_clipboard_title">Копировать в буфер обмена</string>
+  <string name="preferences_front_light_title">Передние омыватели</string>
+  <string name="preferences_front_light_summary">Включите свет, если передние доступно</string>
   <string name="preferences_result_title">Настройки результата</string>
   <string name="preferences_custom_product_search_title">URL пользовательского поиска</string>
   <string name="preferences_custom_product_search_summary">%s будет заменён на ID товара</string>
diff --git a/android/res/values-sv/strings.xml b/android/res/values-sv/strings.xml
index 6068390..98c5eb6 100644
--- a/android/res/values-sv/strings.xml
+++ b/android/res/values-sv/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Inställningar</string>
   <string name="preferences_play_beep_title">Pip</string>
   <string name="preferences_vibrate_title">Vibrera</string>
+  <string name="preferences_front_light_title">Ljuset framför</string>
+  <string name="preferences_front_light_summary">Aktivera ljuset framför, om det finns</string>
   <string name="preferences_result_title">Resultatinställningar</string>
   <string name="preferences_custom_product_search_title">Anpassad sök-URL</string>
   <string name="preferences_custom_product_search_summary">Skriv %s där produktens ID ska placeras</string>
diff --git a/android/res/values-zh-rCN/strings.xml b/android/res/values-zh-rCN/strings.xml
index 1e1c7e5..07832b8 100644
--- a/android/res/values-zh-rCN/strings.xml
+++ b/android/res/values-zh-rCN/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">设置</string>
   <string name="preferences_play_beep_title">提示音</string>
   <string name="preferences_vibrate_title">振动</string>
+  <string name="preferences_front_light_title">前灯</string>
+  <string name="preferences_front_light_summary">使前灯如果可用</string>
   <string name="preferences_result_title">结果设置</string>
   <string name="preferences_custom_product_search_title">自定义搜索网址</string>
   <string name="preferences_custom_product_search_summary">使用%s作为产品ID占位</string>
diff --git a/android/res/values-zh-rTW/strings.xml b/android/res/values-zh-rTW/strings.xml
index 6225bc5..e6588c1 100644
--- a/android/res/values-zh-rTW/strings.xml
+++ b/android/res/values-zh-rTW/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">設置</string>
   <string name="preferences_play_beep_title">提示音</string>
   <string name="preferences_vibrate_title">振動</string>
+  <string name="preferences_front_light_title">前燈</string>
+  <string name="preferences_front_light_summary">使前燈如果可用</string>
   <string name="preferences_result_title">結果設置</string>
   <string name="preferences_custom_product_search_title">自定義搜索網址</string>
   <string name="preferences_custom_product_search_summary">使用%s作為佔位符的產品ID</string>
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
index a971c09..d628357 100755
--- a/android/res/values/strings.xml
+++ b/android/res/values/strings.xml
@@ -89,6 +89,8 @@
   <string name="preferences_name">Settings</string>
   <string name="preferences_play_beep_title">Beep</string>
   <string name="preferences_vibrate_title">Vibrate</string>
+  <string name="preferences_front_light_title">Front light</string>
+  <string name="preferences_front_light_summary">Enable front light, if available</string>  
   <string name="preferences_result_title">Result settings</string>
   <string name="preferences_custom_product_search_title">Custom search URL</string>
   <string name="preferences_custom_product_search_summary">Use %s as a placeholder for the product ID</string>
diff --git a/android/res/xml/preferences.xml b/android/res/xml/preferences.xml
index 2962a3a..104d046 100755
--- a/android/res/xml/preferences.xml
+++ b/android/res/xml/preferences.xml
@@ -24,6 +24,11 @@
         android:key="preferences_decode_QR"
         android:defaultValue="true"
         android:title="@string/preferences_decode_QR_title"/>
+    <CheckBoxPreference
+        android:key="preferences_front_light"
+        android:defaultValue="true"
+        android:title="@string/preferences_front_light_title"
+        android:summary="@string/preferences_front_light_summary"/>
   </PreferenceCategory>
   <PreferenceCategory android:title="@string/preferences_actions_title">
     <CheckBoxPreference
diff --git a/android/src/com/google/zxing/client/android/CameraManager.java b/android/src/com/google/zxing/client/android/CameraManager.java
index cc9b83a..e9f5349 100755
--- a/android/src/com/google/zxing/client/android/CameraManager.java
+++ b/android/src/com/google/zxing/client/android/CameraManager.java
@@ -19,6 +19,7 @@ package com.google.zxing.client.android;
 import com.google.zxing.ResultPoint;
 
 import android.content.Context;
+import android.content.SharedPreferences;
 import android.graphics.PixelFormat;
 import android.graphics.Point;
 import android.graphics.Rect;
@@ -26,6 +27,7 @@ import android.hardware.Camera;
 import android.os.Build;
 import android.os.Handler;
 import android.os.Message;
+import android.preference.PreferenceManager;
 import android.util.Log;
 import android.view.Display;
 import android.view.SurfaceHolder;
@@ -157,7 +159,10 @@ final class CameraManager {
       }
 
       setCameraParameters();
-      FlashlightManager.enableFlashlight();
+      SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+      if (prefs.getBoolean(PreferencesActivity.KEY_FRONT_LIGHT, true)) {
+        FlashlightManager.enableFlashlight();
+      }
     }
   }
 
diff --git a/android/src/com/google/zxing/client/android/PreferencesActivity.java b/android/src/com/google/zxing/client/android/PreferencesActivity.java
index 8054d90..090953a 100755
--- a/android/src/com/google/zxing/client/android/PreferencesActivity.java
+++ b/android/src/com/google/zxing/client/android/PreferencesActivity.java
@@ -38,6 +38,7 @@ public final class PreferencesActivity extends PreferenceActivity
   static final String KEY_PLAY_BEEP = "preferences_play_beep";
   static final String KEY_VIBRATE = "preferences_vibrate";
   static final String KEY_COPY_TO_CLIPBOARD = "preferences_copy_to_clipboard";
+  static final String KEY_FRONT_LIGHT = "preferences_front_light";
 
   static final String KEY_HELP_VERSION_SHOWN = "preferences_help_version_shown";
   public static final String KEY_NOT_OUR_RESULTS_SHOWN = "preferences_not_out_results_shown";

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



More information about the Pkg-google-commits mailing list