1 package com
.owncloud
.android
.authentication
;
3 import android
.app
.Activity
;
4 import android
.content
.SharedPreferences
;
5 import android
.preference
.PreferenceManager
;
7 import com
.owncloud
.android
.MainApp
;
9 public class PinCheck
extends Activity
{
11 private static Long timestamp
= 0l;
12 private static Long lastStart
= 0l;
14 public static void setUnlockTimestamp() {
15 timestamp
= System
.currentTimeMillis();
18 public static boolean checkIfPinEntry(){
19 if ((System
.currentTimeMillis() - timestamp
) > 10000 &&
20 (System
.currentTimeMillis() - lastStart
) > 10000){
21 SharedPreferences appPrefs
= PreferenceManager
.getDefaultSharedPreferences(MainApp
.getAppContext());
22 if (appPrefs
.getBoolean("set_pincode", false
)) {
23 lastStart
= System
.currentTimeMillis();