use of android.os.Message in project android_frameworks_base by ParanoidAndroid.
the class KeyguardViewMediator method showLocked.
/**
* Send message to keyguard telling it to show itself
* @see #handleShow()
*/
private void showLocked(Bundle options) {
if (DEBUG)
Log.d(TAG, "showLocked");
// ensure we stay awake until we are finished displaying the keyguard
mShowKeyguardWakeLock.acquire();
Message msg = mHandler.obtainMessage(SHOW, options);
mHandler.sendMessage(msg);
}
use of android.os.Message in project android_frameworks_base by ParanoidAndroid.
the class KeyguardViewMediator method notifyScreenOnLocked.
/**
* Send a message to keyguard telling it the screen just turned on.
* @see #onScreenTurnedOn()
* @see #handleNotifyScreenOn
*/
private void notifyScreenOnLocked(KeyguardViewManager.ShowListener showListener) {
if (DEBUG)
Log.d(TAG, "notifyScreenOnLocked");
Message msg = mHandler.obtainMessage(NOTIFY_SCREEN_ON, showListener);
mHandler.sendMessage(msg);
}
use of android.os.Message in project android_frameworks_base by ParanoidAndroid.
the class KeyguardViewMediator method keyguardDone.
public void keyguardDone(boolean authenticated, boolean wakeup) {
mKeyguardDonePending = false;
synchronized (this) {
EventLog.writeEvent(70000, 2);
if (DEBUG)
Log.d(TAG, "keyguardDone(" + authenticated + ")");
Message msg = mHandler.obtainMessage(KEYGUARD_DONE);
msg.arg1 = wakeup ? 1 : 0;
mHandler.sendMessage(msg);
if (authenticated) {
mUpdateMonitor.clearFailedUnlockAttempts();
}
if (mExitSecureCallback != null) {
mExitSecureCallback.onKeyguardExitResult(authenticated);
mExitSecureCallback = null;
if (authenticated) {
// after succesfully exiting securely, no need to reshow
// the keyguard when they've released the lock
mExternallyEnabled = true;
mNeedToReshowWhenReenabled = false;
}
}
}
}
use of android.os.Message in project android_frameworks_base by ParanoidAndroid.
the class KeyguardViewMediator method doKeyguardTimeout.
/**
* Used by PhoneWindowManager to enable the keyguard due to a user activity timeout.
* This must be safe to call from any thread and with any window manager locks held.
*/
public void doKeyguardTimeout(Bundle options) {
mHandler.removeMessages(KEYGUARD_TIMEOUT);
Message msg = mHandler.obtainMessage(KEYGUARD_TIMEOUT, options);
mHandler.sendMessage(msg);
}
use of android.os.Message in project android_frameworks_base by ParanoidAndroid.
the class PhoneWindowManager method dispatchMediaKeyWithWakeLock.
void dispatchMediaKeyWithWakeLock(KeyEvent event) {
if (DEBUG_INPUT) {
Slog.d(TAG, "dispatchMediaKeyWithWakeLock: " + event);
}
if (mHavePendingMediaKeyRepeatWithWakeLock) {
if (DEBUG_INPUT) {
Slog.d(TAG, "dispatchMediaKeyWithWakeLock: canceled repeat");
}
mHandler.removeMessages(MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK);
mHavePendingMediaKeyRepeatWithWakeLock = false;
// pending repeat was holding onto the wake lock
mBroadcastWakeLock.release();
}
dispatchMediaKeyWithWakeLockToAudioService(event);
if (event.getAction() == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) {
mHavePendingMediaKeyRepeatWithWakeLock = true;
Message msg = mHandler.obtainMessage(MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK, event);
msg.setAsynchronous(true);
mHandler.sendMessageDelayed(msg, ViewConfiguration.getKeyRepeatTimeout());
} else {
mBroadcastWakeLock.release();
}
}
Aggregations