Star
Star

Reputation: 707

How to remove transient displaying in top of status bar in android?

In car, there is an overlay displaying on top of status bar for applications in full screen when swipe down on top of status bar. Again when swipe down, notification panel is displaying.

But I want to remove the overlay on top of status bar and display the notification panel directly on first swipe of applications with full screen. But i am not able to identify how to remove the overlay on top of status bar. When I analysed, i found the below method is calling during first swipe of status bar.

public class CarSystemBar extends SystemUI implements CommandQueue.Callbacks{
......
@Override
    public void showTransient(int displayId, int[] types) {

        Log.i(TAG, "showTransient: ");
        if (displayId != mDisplayId) {
            return;
        }
        try{

            if (containsType(types, ITYPE_STATUS_BAR)) {
                if (!mStatusBarTransientShown) {
                    mStatusBarTransientShown = true;
                    handleTransientChanged();
                }
            }
            if (containsType(types, ITYPE_NAVIGATION_BAR)) {
                if (!mNavBarTransientShown) {
                    mNavBarTransientShown = true;
                    handleTransientChanged();
                }
            }
        }catch (Exception e) {
            Log.e(TAG, "Exception"+e);
        }
    }

 @Override
    public void abortTransient(int displayId, int[] types) {
        Log.i(TAG, "abortTransient: ");
        if (displayId != mDisplayId) {
            return;
        }
        if (!containsType(types, ITYPE_STATUS_BAR) && !containsType(types, ITYPE_NAVIGATION_BAR)) {
            return;
        }
        clearTransient();
    }

    private void clearTransient() {
        Log.i(TAG,"clearTransient");
        if (mStatusBarTransientShown) {
            mStatusBarTransientShown = false;
            handleTransientChanged();
        }
        if (mNavBarTransientShown) {
            mNavBarTransientShown = false;
            handleTransientChanged();
        }
    }

Scenario: When I swipe down, showTransient log is displaying and again when I swipe down notification panel is displaying.

I couldn't find why showTransient() is calling. How to skip to directly call NotificationPanel?

Source Ref

Upvotes: 0

Views: 43

Answers (0)

Related Questions