Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +39 −4 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import android.graphics.Paint; import android.graphics.Path; import android.graphics.Rect; import android.os.Bundle; import android.os.SystemClock; import android.os.Trace; import android.provider.Settings; import android.util.AttributeSet; Loading Loading @@ -208,6 +209,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private float mQsExpansionFraction; private final int mSplitShadeMinContentHeight; private String mLastUpdateSidePaddingDumpString; private long mLastUpdateSidePaddingElapsedRealtime; private String mLastInitViewDumpString; private long mLastInitViewElapsedRealtime; /** * The algorithm which calculates the properties for our children Loading Loading @@ -887,17 +891,34 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mOverflingDistance = configuration.getScaledOverflingDistance(); Resources res = context.getResources(); final boolean isSmallScreenLandscape = res.getBoolean(R.bool.is_small_screen_landscape); boolean useSmallLandscapeLockscreenResources = mIsSmallLandscapeLockscreenEnabled && res.getBoolean(R.bool.is_small_screen_landscape); && isSmallScreenLandscape; // TODO (b/293252410) remove condition here when flag is launched // Instead update the config_skinnyNotifsInLandscape to be false whenever // is_small_screen_landscape is true. Then, only use the config_skinnyNotifsInLandscape. final boolean configSkinnyNotifsInLandscape = res.getBoolean( R.bool.config_skinnyNotifsInLandscape); if (useSmallLandscapeLockscreenResources) { mSkinnyNotifsInLandscape = false; } else { mSkinnyNotifsInLandscape = res.getBoolean( R.bool.config_skinnyNotifsInLandscape); mSkinnyNotifsInLandscape = configSkinnyNotifsInLandscape; } mLastInitViewDumpString = "mIsSmallLandscapeLockscreenEnabled=" + mIsSmallLandscapeLockscreenEnabled + " isSmallScreenLandscape=" + isSmallScreenLandscape + " useSmallLandscapeLockscreenResources=" + useSmallLandscapeLockscreenResources + " skinnyNotifsInLandscape=" + configSkinnyNotifsInLandscape + " mSkinnyNotifsInLandscape=" + mSkinnyNotifsInLandscape; mLastInitViewElapsedRealtime = SystemClock.elapsedRealtime(); if (DEBUG_UPDATE_SIDE_PADDING) { Log.v(TAG, "initView @ elapsedRealtime " + mLastInitViewElapsedRealtime + ": " + mLastInitViewDumpString); } mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mStackScrollAlgorithm.initView(context); mStateAnimator.initView(context); Loading Loading @@ -925,9 +946,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mLastUpdateSidePaddingDumpString = "viewWidth=" + viewWidth + " skinnyNotifsInLandscape=" + mSkinnyNotifsInLandscape + " orientation=" + orientation; mLastUpdateSidePaddingElapsedRealtime = SystemClock.elapsedRealtime(); if (DEBUG_UPDATE_SIDE_PADDING) { Log.v(TAG, "updateSidePadding: " + mLastUpdateSidePaddingDumpString); Log.v(TAG, "updateSidePadding @ elapsedRealtime " + mLastUpdateSidePaddingElapsedRealtime + ": " + mLastUpdateSidePaddingDumpString); } if (viewWidth == 0 || !mSkinnyNotifsInLandscape) { Loading Loading @@ -4884,6 +4908,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable public void dump(PrintWriter pwOriginal, String[] args) { IndentingPrintWriter pw = DumpUtilsKt.asIndenting(pwOriginal); final long elapsedRealtime = SystemClock.elapsedRealtime(); pw.println("Internal state:"); DumpUtilsKt.withIncreasedIndent(pw, () -> { println(pw, "pulsing", mPulsing); Loading Loading @@ -4914,7 +4939,17 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable println(pw, "minimumPaddings", mMinimumPaddings); println(pw, "qsTilePadding", mQsTilePadding); println(pw, "sidePaddings", mSidePaddings); println(pw, "elapsedRealtime", elapsedRealtime); println(pw, "lastInitView", mLastInitViewDumpString); println(pw, "lastInitViewElapsedRealtime", mLastInitViewElapsedRealtime); println(pw, "lastInitViewMillisAgo", elapsedRealtime - mLastInitViewElapsedRealtime); println(pw, "shouldUseSplitNotificationShade", mShouldUseSplitNotificationShade); println(pw, "lastUpdateSidePadding", mLastUpdateSidePaddingDumpString); println(pw, "lastUpdateSidePaddingElapsedRealtime", mLastUpdateSidePaddingElapsedRealtime); println(pw, "lastUpdateSidePaddingMillisAgo", elapsedRealtime - mLastUpdateSidePaddingElapsedRealtime); println(pw, "isSmallLandscapeLockscreenEnabled", mIsSmallLandscapeLockscreenEnabled); mNotificationStackSizeCalculator.dump(pw, args); }); pw.println(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +39 −4 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import android.graphics.Paint; import android.graphics.Path; import android.graphics.Rect; import android.os.Bundle; import android.os.SystemClock; import android.os.Trace; import android.provider.Settings; import android.util.AttributeSet; Loading Loading @@ -208,6 +209,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private float mQsExpansionFraction; private final int mSplitShadeMinContentHeight; private String mLastUpdateSidePaddingDumpString; private long mLastUpdateSidePaddingElapsedRealtime; private String mLastInitViewDumpString; private long mLastInitViewElapsedRealtime; /** * The algorithm which calculates the properties for our children Loading Loading @@ -887,17 +891,34 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mOverflingDistance = configuration.getScaledOverflingDistance(); Resources res = context.getResources(); final boolean isSmallScreenLandscape = res.getBoolean(R.bool.is_small_screen_landscape); boolean useSmallLandscapeLockscreenResources = mIsSmallLandscapeLockscreenEnabled && res.getBoolean(R.bool.is_small_screen_landscape); && isSmallScreenLandscape; // TODO (b/293252410) remove condition here when flag is launched // Instead update the config_skinnyNotifsInLandscape to be false whenever // is_small_screen_landscape is true. Then, only use the config_skinnyNotifsInLandscape. final boolean configSkinnyNotifsInLandscape = res.getBoolean( R.bool.config_skinnyNotifsInLandscape); if (useSmallLandscapeLockscreenResources) { mSkinnyNotifsInLandscape = false; } else { mSkinnyNotifsInLandscape = res.getBoolean( R.bool.config_skinnyNotifsInLandscape); mSkinnyNotifsInLandscape = configSkinnyNotifsInLandscape; } mLastInitViewDumpString = "mIsSmallLandscapeLockscreenEnabled=" + mIsSmallLandscapeLockscreenEnabled + " isSmallScreenLandscape=" + isSmallScreenLandscape + " useSmallLandscapeLockscreenResources=" + useSmallLandscapeLockscreenResources + " skinnyNotifsInLandscape=" + configSkinnyNotifsInLandscape + " mSkinnyNotifsInLandscape=" + mSkinnyNotifsInLandscape; mLastInitViewElapsedRealtime = SystemClock.elapsedRealtime(); if (DEBUG_UPDATE_SIDE_PADDING) { Log.v(TAG, "initView @ elapsedRealtime " + mLastInitViewElapsedRealtime + ": " + mLastInitViewDumpString); } mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mStackScrollAlgorithm.initView(context); mStateAnimator.initView(context); Loading Loading @@ -925,9 +946,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mLastUpdateSidePaddingDumpString = "viewWidth=" + viewWidth + " skinnyNotifsInLandscape=" + mSkinnyNotifsInLandscape + " orientation=" + orientation; mLastUpdateSidePaddingElapsedRealtime = SystemClock.elapsedRealtime(); if (DEBUG_UPDATE_SIDE_PADDING) { Log.v(TAG, "updateSidePadding: " + mLastUpdateSidePaddingDumpString); Log.v(TAG, "updateSidePadding @ elapsedRealtime " + mLastUpdateSidePaddingElapsedRealtime + ": " + mLastUpdateSidePaddingDumpString); } if (viewWidth == 0 || !mSkinnyNotifsInLandscape) { Loading Loading @@ -4884,6 +4908,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable public void dump(PrintWriter pwOriginal, String[] args) { IndentingPrintWriter pw = DumpUtilsKt.asIndenting(pwOriginal); final long elapsedRealtime = SystemClock.elapsedRealtime(); pw.println("Internal state:"); DumpUtilsKt.withIncreasedIndent(pw, () -> { println(pw, "pulsing", mPulsing); Loading Loading @@ -4914,7 +4939,17 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable println(pw, "minimumPaddings", mMinimumPaddings); println(pw, "qsTilePadding", mQsTilePadding); println(pw, "sidePaddings", mSidePaddings); println(pw, "elapsedRealtime", elapsedRealtime); println(pw, "lastInitView", mLastInitViewDumpString); println(pw, "lastInitViewElapsedRealtime", mLastInitViewElapsedRealtime); println(pw, "lastInitViewMillisAgo", elapsedRealtime - mLastInitViewElapsedRealtime); println(pw, "shouldUseSplitNotificationShade", mShouldUseSplitNotificationShade); println(pw, "lastUpdateSidePadding", mLastUpdateSidePaddingDumpString); println(pw, "lastUpdateSidePaddingElapsedRealtime", mLastUpdateSidePaddingElapsedRealtime); println(pw, "lastUpdateSidePaddingMillisAgo", elapsedRealtime - mLastUpdateSidePaddingElapsedRealtime); println(pw, "isSmallLandscapeLockscreenEnabled", mIsSmallLandscapeLockscreenEnabled); mNotificationStackSizeCalculator.dump(pw, args); }); pw.println(); Loading