Advertisement
Guest User

Untitled

a guest
Oct 26th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. public void checkLastLoggedInTime() {
  2.  
  3. if ((System.currentTimeMillis() - lastLoggedIn) / 1000 >= 300) {
  4.  
  5. if (pinVerficationDialogPopedUp == false) {
  6. //pops up the pin dialog
  7. pinVerificationDialog();
  8. }
  9. } else {
  10. lastLoggedIn = System.currentTimeMillis();
  11. }
  12. }
  13.  
  14. @Override
  15. public boolean dispatchTouchEvent(MotionEvent ev) {
  16. if (ev.getAction() == MotionEvent.ACTION_DOWN) {
  17. // check the idle time
  18. try{
  19. Utility utilityObj = new Utility(this);
  20. utilityObj.checkLastLoggedInTime();
  21. }catch(Exception e){
  22. e.printStackTrace();
  23. }
  24. }
  25. return super.dispatchTouchEvent(ev);
  26. }
  27.  
  28. @Override
  29. protected void onResume() {
  30. super.onResume();
  31. // check the idle time
  32. try{
  33. Utility utilityObj = new Utility(this);
  34. utilityObj.checkLastLoggedInTime();
  35. }catch(Exception e){
  36. e.printStackTrace();
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement