Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void checkLastLoggedInTime() {
- if ((System.currentTimeMillis() - lastLoggedIn) / 1000 >= 300) {
- if (pinVerficationDialogPopedUp == false) {
- //pops up the pin dialog
- pinVerificationDialog();
- }
- } else {
- lastLoggedIn = System.currentTimeMillis();
- }
- }
- @Override
- public boolean dispatchTouchEvent(MotionEvent ev) {
- if (ev.getAction() == MotionEvent.ACTION_DOWN) {
- // check the idle time
- try{
- Utility utilityObj = new Utility(this);
- utilityObj.checkLastLoggedInTime();
- }catch(Exception e){
- e.printStackTrace();
- }
- }
- return super.dispatchTouchEvent(ev);
- }
- @Override
- protected void onResume() {
- super.onResume();
- // check the idle time
- try{
- Utility utilityObj = new Utility(this);
- utilityObj.checkLastLoggedInTime();
- }catch(Exception e){
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement