Guest User

Untitled

a guest
Oct 18th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. private boolean dettachLockScreenView() {
  2.  
  3. if (null != mWindowManager && null != mLockscreenView && isAttachedToWindow())
  4.  
  5. {
  6. mWindowManager.removeView(mLockscreenView);
  7.  
  8. mLockscreenView = null;
  9.  
  10. mWindowManager = null;
  11. stopSelf(mServiceStartId);
  12.  
  13. Intent enter_pin=new Intent(mContext,com.github.mugku.lockscreensample.Enter_pin.class);
  14. enter_pin.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  15. startActivity(enter_pin);
  16.  
  17. return true;
  18. }
  19. else
  20. {
  21. return false;
  22. }
  23. }
  24.  
  25. if (null != mWindowManager && null != mLockscreenView && isAttachedToWindow())
  26.  
  27. {
  28. mWindowManager.removeView(mLockscreenView);
  29.  
  30. mLockscreenView = null;
  31.  
  32. mWindowManager = null;
  33. stopSelf(mServiceStartId);
  34.  
  35. Intent enter_pin=new Intent(mContext,com.github.mugku.lockscreensample.Enter_pin.class);
  36. enter_pin.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  37. startActivity(enter_pin);
  38.  
  39. return true;
  40. }
  41. else
  42. {
  43. return false;
  44. }
  45. }
Add Comment
Please, Sign In to add comment