Search in sources :

Example 21 with Message

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);
}
Also used : Message(android.os.Message)

Example 22 with Message

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);
}
Also used : Message(android.os.Message)

Example 23 with Message

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;
            }
        }
    }
}
Also used : Message(android.os.Message)

Example 24 with Message

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);
}
Also used : Message(android.os.Message)

Example 25 with Message

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();
    }
}
Also used : Message(android.os.Message)

Aggregations

Message (android.os.Message)3198 Handler (android.os.Handler)347 RemoteException (android.os.RemoteException)263 Bundle (android.os.Bundle)210 Test (org.junit.Test)144 Intent (android.content.Intent)130 IOException (java.io.IOException)124 Point (android.graphics.Point)86 HashMap (java.util.HashMap)77 SomeArgs (com.android.internal.os.SomeArgs)67 SmallTest (android.test.suitebuilder.annotation.SmallTest)64 Messenger (android.os.Messenger)63 ArrayList (java.util.ArrayList)59 View (android.view.View)52 File (java.io.File)50 MediumTest (android.test.suitebuilder.annotation.MediumTest)43 TextView (android.widget.TextView)41 IBinder (android.os.IBinder)38 Map (java.util.Map)37 PendingIntent (android.app.PendingIntent)33