Эх сурвалжийг харах

- moved timeout to PINCODE_TIMEOUT

tobiasKaminsky 10 жил өмнө
parent
commit
bceecf9d17

+ 3 - 2
src/com/owncloud/android/authentication/PinCheck.java

@@ -10,14 +10,15 @@ public class PinCheck extends Activity {
 
 
     private static Long timestamp = 0l;
     private static Long timestamp = 0l;
     private static Long lastStart = 0l;
     private static Long lastStart = 0l;
+    private static int PINCODE_TIMEOUT = 10000;
     
     
     public static void setUnlockTimestamp() {
     public static void setUnlockTimestamp() {
         timestamp = System.currentTimeMillis();
         timestamp = System.currentTimeMillis();
     }
     }
 
 
     public static boolean checkIfPinEntry(){
     public static boolean checkIfPinEntry(){
-        if ((System.currentTimeMillis() - timestamp) > 10000 &&
-            (System.currentTimeMillis() - lastStart) > 10000){
+        if ((System.currentTimeMillis() - timestamp) > PINCODE_TIMEOUT &&
+            (System.currentTimeMillis() - lastStart) > PINCODE_TIMEOUT){
             SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(MainApp.getAppContext());
             SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(MainApp.getAppContext());
             if (appPrefs.getBoolean("set_pincode", false)) {
             if (appPrefs.getBoolean("set_pincode", false)) {
                 lastStart = System.currentTimeMillis();
                 lastStart = System.currentTimeMillis();