Merge "Adding logs to help diagnose QS disappearing in split shade" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
86bdd9be5c
@@ -2131,6 +2131,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
}
|
||||
updateExpansionAndVisibility();
|
||||
mNotificationStackScrollLayoutController.setPanelFlinging(false);
|
||||
mShadeLog.d("onFlingEnd called"); // TODO(b/277909752): remove log when bug is fixed
|
||||
// expandImmediate should be always reset at the end of animation
|
||||
mQsController.setExpandImmediate(false);
|
||||
}
|
||||
@@ -2666,6 +2667,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
setListening(true);
|
||||
}
|
||||
if (mBarState != SHADE) {
|
||||
// TODO(b/277909752): remove below logs when bug is fixed
|
||||
mShadeLog.d("onExpandingFinished called");
|
||||
if (mSplitShadeEnabled && !mQsController.getExpanded()) {
|
||||
mShadeLog.d("onExpandingFinished called before QS got expanded");
|
||||
}
|
||||
// updating qsExpandImmediate is done in onPanelStateChanged for unlocked shade but
|
||||
// on keyguard panel state is always OPEN so we need to have that extra update
|
||||
mQsController.setExpandImmediate(false);
|
||||
@@ -4718,6 +4724,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
}
|
||||
|
||||
private void onPanelStateChanged(@PanelState int state) {
|
||||
mShadeLog.logPanelStateChanged(state);
|
||||
mQsController.updateExpansionEnabledAmbient();
|
||||
|
||||
if (state == STATE_OPEN && mCurrentPanelState != state) {
|
||||
|
||||
@@ -787,6 +787,12 @@ public class QuickSettingsController implements Dumpable {
|
||||
|
||||
/** update Qs height state */
|
||||
public void setExpansionHeight(float height) {
|
||||
// TODO(b/277909752): remove below log when bug is fixed
|
||||
if (mSplitShadeEnabled && mShadeExpandedFraction == 1.0f && height == 0) {
|
||||
Log.wtf(TAG,
|
||||
"setting QS height to 0 in split shade while shade is open(ing). "
|
||||
+ "Value of mExpandImmediate = " + mExpandImmediate);
|
||||
}
|
||||
int maxHeight = getMaxExpansionHeight();
|
||||
height = Math.min(Math.max(
|
||||
height, getMinExpansionHeight()), maxHeight);
|
||||
@@ -933,7 +939,6 @@ public class QuickSettingsController implements Dumpable {
|
||||
return mShadeExpandedHeight;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void setExpandImmediate(boolean expandImmediate) {
|
||||
if (expandImmediate != mExpandImmediate) {
|
||||
mShadeLog.logQsExpandImmediateChanged(expandImmediate);
|
||||
|
||||
@@ -336,6 +336,17 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
||||
)
|
||||
}
|
||||
|
||||
fun logPanelStateChanged(@PanelState panelState: Int) {
|
||||
buffer.log(
|
||||
TAG,
|
||||
LogLevel.VERBOSE,
|
||||
{
|
||||
str1 = panelState.panelStateToString()
|
||||
},
|
||||
{ "New panel State: $str1" }
|
||||
)
|
||||
}
|
||||
|
||||
fun flingQs(flingType: Int, isClick: Boolean) {
|
||||
buffer.log(
|
||||
TAG,
|
||||
|
||||
Reference in New Issue
Block a user