Example usage for android.app StatusBarManager CAMERA_LAUNCH_SOURCE_WIGGLE

List of usage examples for android.app StatusBarManager CAMERA_LAUNCH_SOURCE_WIGGLE

Introduction

In this page you can find the example usage for android.app StatusBarManager CAMERA_LAUNCH_SOURCE_WIGGLE.

Prototype

int CAMERA_LAUNCH_SOURCE_WIGGLE

To view the source code for android.app StatusBarManager CAMERA_LAUNCH_SOURCE_WIGGLE.

Click Source Link

Usage

From source file:com.android.systemui.statusbar.phone.NotificationPanelView.java

public void launchCamera(boolean animate, int source) {
    if (source == StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP) {
        mLastCameraLaunchSource = KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP;
    } else if (source == StatusBarManager.CAMERA_LAUNCH_SOURCE_WIGGLE) {
        mLastCameraLaunchSource = KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_WIGGLE;
    } else {//from   ww w .ja va 2 s .  co  m

        // Default.
        mLastCameraLaunchSource = KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_AFFORDANCE;
    }

    // If we are launching it when we are occluded already we don't want it to animate,
    // nor setting these flags, since the occluded state doesn't change anymore, hence it's
    // never reset.
    if (!isFullyCollapsed()) {
        mLaunchingAffordance = true;
        setLaunchingAffordance(true);
    } else {
        animate = false;
    }
    mAfforanceHelper.launchAffordance(animate, getLayoutDirection() == LAYOUT_DIRECTION_RTL);
}