FileDocCategorySizeDatePackage
PhoneStatusBarView.javaAPI DocAndroid 5.1 API5797Thu Mar 12 22:22:42 GMT 2015com.android.systemui.statusbar.phone

PhoneStatusBarView

public class PhoneStatusBarView extends PanelBar

Fields Summary
private static final String
TAG
private static final boolean
DEBUG
private static final boolean
DEBUG_GESTURES
PhoneStatusBar
mBar
PanelView
mLastFullyOpenedPanel
PanelView
mNotificationPanel
private final PhoneStatusBarTransitions
mBarTransitions
private ScrimController
mScrimController
Constructors Summary
public PhoneStatusBarView(android.content.Context context, android.util.AttributeSet attrs)


         
        super(context, attrs);

        Resources res = getContext().getResources();
        mBarTransitions = new PhoneStatusBarTransitions(this);
    
Methods Summary
public voidaddPanel(PanelView pv)

        super.addPanel(pv);
        if (pv.getId() == R.id.notification_panel) {
            mNotificationPanel = pv;
        }
    
public BarTransitionsgetBarTransitions()

        return mBarTransitions;
    
public voidonAllPanelsCollapsed()

        super.onAllPanelsCollapsed();

        // Close the status bar in the next frame so we can show the end of the animation.
        postOnAnimation(new Runnable() {
            @Override
            public void run() {
                mBar.makeExpandedInvisible();
            }
        });
        mLastFullyOpenedPanel = null;
    
public voidonClosingFinished()

        super.onClosingFinished();
        mBar.onClosingFinished();
    
public voidonExpandingFinished()

        super.onExpandingFinished();
        mScrimController.onExpandingFinished();
    
public voidonFinishInflate()

        mBarTransitions.init();
    
public booleanonInterceptTouchEvent(android.view.MotionEvent event)

        return mBar.interceptTouchEvent(event) || super.onInterceptTouchEvent(event);
    
public voidonPanelFullyOpened(PanelView openPanel)

        super.onPanelFullyOpened(openPanel);
        if (openPanel != mLastFullyOpenedPanel) {
            openPanel.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
        }
        mLastFullyOpenedPanel = openPanel;
    
public voidonPanelPeeked()

        super.onPanelPeeked();
        mBar.makeExpandedVisible(false);
    
public booleanonRequestSendAccessibilityEvent(android.view.View child, android.view.accessibility.AccessibilityEvent event)

        if (super.onRequestSendAccessibilityEvent(child, event)) {
            // The status bar is very small so augment the view that the user is touching
            // with the content of the status bar a whole. This way an accessibility service
            // may announce the current item as well as the entire content if appropriate.
            AccessibilityEvent record = AccessibilityEvent.obtain();
            onInitializeAccessibilityEvent(record);
            dispatchPopulateAccessibilityEvent(record);
            event.appendRecord(record);
            return true;
        }
        return false;
    
public booleanonTouchEvent(android.view.MotionEvent event)

        boolean barConsumedEvent = mBar.interceptTouchEvent(event);

        if (DEBUG_GESTURES) {
            if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
                EventLog.writeEvent(EventLogTags.SYSUI_PANELBAR_TOUCH,
                        event.getActionMasked(), (int) event.getX(), (int) event.getY(),
                        barConsumedEvent ? 1 : 0);
            }
        }

        return barConsumedEvent || super.onTouchEvent(event);
    
public voidonTrackingStarted(PanelView panel)

        super.onTrackingStarted(panel);
        mBar.onTrackingStarted();
        mScrimController.onTrackingStarted();
    
public voidonTrackingStopped(PanelView panel, boolean expand)

        super.onTrackingStopped(panel, expand);
        mBar.onTrackingStopped(expand);
    
public voidpanelExpansionChanged(PanelView panel, float frac, boolean expanded)

        super.panelExpansionChanged(panel, frac, expanded);
        mScrimController.setPanelExpansion(frac);
        mBar.updateCarrierLabelVisibility(false);
    
public booleanpanelsEnabled()

        return mBar.panelsEnabled();
    
public PanelViewselectPanelForTouch(android.view.MotionEvent touch)

        // No double swiping. If either panel is open, nothing else can be pulled down.
        return mNotificationPanel.getExpandedHeight() > 0
                ? null
                : mNotificationPanel;
    
public voidsetBar(PhoneStatusBar bar)

        mBar = bar;
    
public voidsetScrimController(ScrimController scrimController)

        mScrimController = scrimController;