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
This commit is contained in:
committed by
Selim Cinek
parent
d3b4a1b9bd
commit
fc975d6343
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user