mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-05 00:02:27 -08:00
Lock since keyboard and refactor
This commit is contained in:
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));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user