Lock since keyboard and refactor

This commit is contained in:
J-Jamet committed 2018-06-08 17:59:18 +02:00
1 parent d8a8005d70
commit b4b215fe30
8 files changed
+50 -138

No files matched your search

@@ -28,7 +28,7 @@ import android.preference.PreferenceManager;
import android.util.Log;
import com.kunzisoft.keepass.R;
import com.kunzisoft.keepass.lock.LockService;
import com.kunzisoft.keepass.lock.LockingActivity;
public class Timeout {
@@ -37,7 +37,7 @@ public class Timeout {
private static String TAG = "KeePass Timeout";
private static PendingIntent buildIntent(Context ctx) {
Intent intent = new Intent(LockService.LOCK_ACTION);
Intent intent = new Intent(LockingActivity.LOCK_ACTION);
return PendingIntent.getBroadcast(ctx, REQUEST_ID, intent, PendingIntent.FLAG_CANCEL_CURRENT);
}
@@ -56,8 +56,6 @@ public class Timeout {
// No timeout don't start timeout service
return;
}
ctx.startService(new Intent(ctx, LockService.class));
long triggerTime = System.currentTimeMillis() + timeout;
AlarmManager am = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);
@@ -75,8 +73,6 @@ public class Timeout {
if (am != null) {
am.cancel(buildIntent(ctx));
}
ctx.stopService(new Intent(ctx, LockService.class));
}
}