Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc975d63 authored by dongwan0605.kim's avatar dongwan0605.kim Committed by Selim Cinek
Browse files

Fix guts not expanding when QSPanel is expanded

When exposing notification guts, we notified height changed event
without expandable view(row). Then, when QSPanel is expanded,
NotificationPanelView did not update its height and guts was not
expanded properly due to lack of height.
So fix it by notifying height changed event with expandable view
when expose notification guts.
Also, do not request animation when panel is collapsed.

Test: Expand QSPanel > Long press on the collapsed notification >
      Verify guts expanded properly

Change-Id: Id7abd858800036fd6ff11c003c079c84c7ea54ef
parent d3b4a1b9
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ import java.util.Stack;
public abstract class BaseStatusBar extends SystemUI implements
        CommandQueue.Callbacks, ActivatableNotificationView.OnActivatedListener,
        ExpandableNotificationRow.ExpansionLogger, NotificationData.Environment,
        ExpandableNotificationRow.OnExpandClickListener, OnGutsClosedListener {
        ExpandableNotificationRow.OnExpandClickListener {
    public static final String TAG = "StatusBar";
    public static final boolean DEBUG = false;
    public static final boolean MULTIUSER_DEBUG = false;
@@ -1058,7 +1058,12 @@ public abstract class BaseStatusBar extends SystemUI implements
        PackageManager pmUser = getPackageManagerForUser(mContext, sbn.getUser().getIdentifier());
        row.setTag(sbn.getPackageName());
        final NotificationGuts guts = row.getGuts();
        guts.setClosedListener(this);
        guts.setClosedListener((NotificationGuts g) -> {
            if (!row.isRemoved()) {
                mStackScroller.onHeightChanged(row, !isPanelFullyCollapsed() /* needsAnimation */);
            }
            mNotificationGutsExposed = null;
        });

        final INotificationManager iNotificationManager = INotificationManager.Stub.asInterface(
                ServiceManager.getService(Context.NOTIFICATION_SERVICE));
@@ -1166,7 +1171,7 @@ public abstract class BaseStatusBar extends SystemUI implements
                        guts.setExposed(true /* exposed */,
                                mState == StatusBarState.KEYGUARD /* needsFalsingProtection */);
                        row.closeRemoteInput();
                        mStackScroller.onHeightChanged(null, true /* needsAnimation */);
                        mStackScroller.onHeightChanged(row, true /* needsAnimation */);
                        mNotificationGutsExposed = guts;
                    }
                });
@@ -1199,12 +1204,6 @@ public abstract class BaseStatusBar extends SystemUI implements
        }
    }

    @Override
    public void onGutsClosed(NotificationGuts guts) {
        mStackScroller.onHeightChanged(null, true /* needsAnimation */);
        mNotificationGutsExposed = null;
    }

    @Override
    public void showRecentApps(boolean triggeredFromAltTab, boolean fromHome) {
        int msg = MSG_SHOW_RECENT_APPS;