Code example for AppWidgetHost

Methods: stopListening

  paused = true;
  try { 
	 } catch (NullPointerException ex) {
	     Log.w("lockscreen destroy", "problem while stopping AppWidgetHost during Lockscreen destruction", ex);
  if (!starting && !hasWindowFocus() && !pendingDismiss) {
          //case: we yielded focus to something but didn't pause. Example: notif panel 
          //pause in this instance means something else is launching, that is about to try to stop us 
          //so we need to exit now, as it is a user nav, not a dormancy event 
          Log.v("navigation exit","got paused without focus, starting dismiss sequence");
          //anytime we lose focus before pause, we are calling disable 
          //this will exit properly as we navigate out 
          ManageKeyguard.exitKeyguardSecurely(new LaunchOnKeyguardExit() { 
          public void LaunchOnKeyguardExitSuccess() { 
             Log.v("doExit", "This is the exit callback");