FileDocCategorySizeDatePackage
AmbientState.javaAPI DocAndroid 5.1 API3325Thu Mar 12 22:22:42 GMT 2015com.android.systemui.statusbar.stack

AmbientState

public class AmbientState extends Object
A global state to track all input states for the algorithm.

Fields Summary
private ArrayList
mDraggedViews
private int
mScrollY
private boolean
mDimmed
private com.android.systemui.statusbar.ActivatableNotificationView
mActivatedChild
private float
mOverScrollTopAmount
private float
mOverScrollBottomAmount
private int
mSpeedBumpIndex
private boolean
mDark
private boolean
mHideSensitive
Constructors Summary
Methods Summary
public com.android.systemui.statusbar.ActivatableNotificationViewgetActivatedChild()

        return mActivatedChild;
    
public java.util.ArrayListgetDraggedViews()

        return mDraggedViews;
    
public floatgetOverScrollAmount(boolean top)

        return top ? mOverScrollTopAmount : mOverScrollBottomAmount;
    
public intgetScrollY()


       
        return mScrollY;
    
public intgetSpeedBumpIndex()

        return mSpeedBumpIndex;
    
public booleanisDark()

        return mDark;
    
public booleanisDimmed()

        return mDimmed;
    
public booleanisHideSensitive()

        return mHideSensitive;
    
public voidonBeginDrag(android.view.View view)

        mDraggedViews.add(view);
    
public voidonDragFinished(android.view.View view)

        mDraggedViews.remove(view);
    
public voidsetActivatedChild(com.android.systemui.statusbar.ActivatableNotificationView activatedChild)
In dimmed mode, a child can be activated, which happens on the first tap of the double-tap interaction. This child is then scaled normally and its background is fully opaque.

        mActivatedChild = activatedChild;
    
public voidsetDark(boolean dark)
In dark mode, we draw as little as possible, assuming a black background

        mDark = dark;
    
public voidsetDimmed(boolean dimmed)

param
dimmed Whether we are in a dimmed state (on the lockscreen), where the backgrounds are translucent and everything is scaled back a bit.

        mDimmed = dimmed;
    
public voidsetHideSensitive(boolean hideSensitive)

        mHideSensitive = hideSensitive;
    
public voidsetOverScrollAmount(float amount, boolean onTop)

        if (onTop) {
            mOverScrollTopAmount = amount;
        } else {
            mOverScrollBottomAmount = amount;
        }
    
public voidsetScrollY(int scrollY)

        this.mScrollY = scrollY;
    
public voidsetSpeedBumpIndex(int speedBumpIndex)

        mSpeedBumpIndex = speedBumpIndex;