Bug 1178503 - Remove nightly-only flag for QR code input. r=liuche
authorKarim Benhmida <kbenhmida@mozilla.com>
Tue, 21 Jul 2015 13:23:57 -0700
changeset 254696 2fef87f7d115774e710e869485e695b79b6f94be
parent 254695 c950de0ffffb964209087cd39ecab4a4addbe0f9
child 254697 45c8080add2cff1287207738a60445ce1f59db10
push id29110
push userryanvm@gmail.com
push dateMon, 27 Jul 2015 14:39:38 +0000
treeherdermozilla-central@21ca97268bae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs1178503
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1178503 - Remove nightly-only flag for QR code input. r=liuche
mobile/android/base/preferences/GeckoPreferences.java
mobile/android/base/toolbar/ToolbarEditLayout.java
--- a/mobile/android/base/preferences/GeckoPreferences.java
+++ b/mobile/android/base/preferences/GeckoPreferences.java
@@ -826,17 +826,17 @@ OnSharedPreferenceChangeListener
                 } else if (PREFS_VOICE_INPUT_ENABLED.equals(key)) {
                     if (!InputOptionsUtils.supportsVoiceRecognizer(getApplicationContext(), getResources().getString(R.string.voicesearch_prompt))) {
                         // Remove UI for voice input on non nightly builds.
                         preferences.removePreference(pref);
                         i--;
                         continue;
                     }
                 } else if (PREFS_QRCODE_ENABLED.equals(key)) {
-                    if (!AppConstants.NIGHTLY_BUILD || !InputOptionsUtils.supportsQrCodeReader(getApplicationContext())) {
+                    if (!InputOptionsUtils.supportsQrCodeReader(getApplicationContext())) {
                         // Remove UI for qr code input on non nightly builds
                         preferences.removePreference(pref);
                         i--;
                         continue;
                     }
                 }
 
                 // Some Preference UI elements are not actually preferences,
--- a/mobile/android/base/toolbar/ToolbarEditLayout.java
+++ b/mobile/android/base/toolbar/ToolbarEditLayout.java
@@ -248,20 +248,16 @@ public class ToolbarEditLayout extends T
                 final InputMethodManager imm =
                         (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
                 imm.showSoftInput(mEditText, InputMethodManager.SHOW_IMPLICIT);
             }
         });
     }
 
     private boolean qrCodeIsEnabled(Context context) {
-        // QR code is enabled for nightly only
-        if(!AppConstants.NIGHTLY_BUILD) {
-            return false;
-        }
         final boolean qrCodeIsSupported = InputOptionsUtils.supportsQrCodeReader(context);
         if (!qrCodeIsSupported) {
             return false;
         }
         return GeckoSharedPrefs.forApp(context)
                 .getBoolean(GeckoPreferences.PREFS_QRCODE_ENABLED, true);
     }