コード例 #1
0
 void updateConfiguration() {
   Configuration newConfig = getResources().getConfiguration();
   if (newConfig.orientation != mCreationOrientation) {
     mCallback.recreateMe(newConfig);
   } else if (newConfig.hardKeyboardHidden != mKeyboardHidden) {
     mKeyboardHidden = newConfig.hardKeyboardHidden;
     final boolean isKeyboardOpen = mKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO;
     if (mUpdateMonitor.isKeyguardBypassEnabled() && isKeyboardOpen) {
       mCallback.goToUnlockScreen();
     }
   }
 }
コード例 #2
0
 /** {@inheritDoc} */
 public void cleanUp() {
   mUpdateMonitor.removeCallback(this); // this must be first
   mLockPatternUtils = null;
   mUpdateMonitor = null;
   mCallback = null;
 }