Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +5 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ public class QSPanel extends LinearLayout implements Tunable { if (mUsingMediaPlayer) { mHorizontalLinearLayout = new RemeasuringLinearLayout(mContext); mHorizontalLinearLayout.setOrientation(LinearLayout.HORIZONTAL); mHorizontalLinearLayout.setVisibility( mUsingHorizontalLayout ? View.VISIBLE : View.GONE); mHorizontalLinearLayout.setClipChildren(false); mHorizontalLinearLayout.setClipToPadding(false); Loading Loading @@ -445,6 +447,8 @@ public class QSPanel extends LinearLayout implements Tunable { mMediaHostView = hostView; ViewGroup newParent = horizontal ? mHorizontalLinearLayout : this; ViewGroup currentParent = (ViewGroup) hostView.getParent(); Log.d(getDumpableTag(), "Reattaching media host: " + horizontal + ", current " + currentParent + ", new " + newParent); if (currentParent != newParent) { if (currentParent != null) { currentParent.removeView(hostView); Loading Loading @@ -589,6 +593,7 @@ public class QSPanel extends LinearLayout implements Tunable { void setUsingHorizontalLayout(boolean horizontal, ViewGroup mediaHostView, boolean force) { if (horizontal != mUsingHorizontalLayout || force) { Log.d(getDumpableTag(), "setUsingHorizontalLayout: " + horizontal + ", " + force); mUsingHorizontalLayout = horizontal; ViewGroup newParent = horizontal ? mHorizontalContentContainer : this; switchAllContentToParent(newParent, mTileLayout); Loading packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java +6 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr public void onConfigurationChange(Configuration newConfig) { mShouldUseSplitNotificationShade = LargeScreenUtils.shouldUseSplitNotificationShade(getResources()); mQSLogger.logOnConfigurationChanged(mLastOrientation, newConfig.orientation, mView.getDumpableTag()); onConfigurationChanged(); if (newConfig.orientation != mLastOrientation) { mLastOrientation = newConfig.orientation; Loading Loading @@ -164,6 +166,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr mHost.addCallback(mQSHostCallback); setTiles(); mLastOrientation = getResources().getConfiguration().orientation; mQSLogger.logOnViewAttached(mLastOrientation, mView.getDumpableTag()); switchTileLayout(true); mDumpManager.registerDumpable(mView.getDumpableTag(), this); Loading @@ -171,6 +174,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr @Override protected void onViewDetached() { mQSLogger.logOnViewDetached(mLastOrientation, mView.getDumpableTag()); mView.removeOnConfigurationChangedListener(mOnConfigurationChangedListener); mHost.removeCallback(mQSHostCallback); Loading Loading @@ -325,6 +329,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr /* Whether or not the panel currently contains a media player. */ boolean horizontal = shouldUseHorizontalLayout(); if (horizontal != mUsingHorizontalLayout || force) { mQSLogger.logSwitchTileLayout(horizontal, mUsingHorizontalLayout, force, mView.getDumpableTag()); mUsingHorizontalLayout = horizontal; mView.setUsingHorizontalLayout(mUsingHorizontalLayout, mMediaHost.getHostView(), force); updateMediaDisappearParameters(); Loading packages/SystemUI/src/com/android/systemui/qs/logging/QSLogger.kt +48 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,54 @@ class QSLogger @Inject constructor( }) } fun logOnViewAttached(orientation: Int, containerName: String) { log(DEBUG, { str1 = containerName int1 = orientation }, { "onViewAttached: $str1 orientation $int1" }) } fun logOnViewDetached(orientation: Int, containerName: String) { log(DEBUG, { str1 = containerName int1 = orientation }, { "onViewDetached: $str1 orientation $int1" }) } fun logOnConfigurationChanged( lastOrientation: Int, newOrientation: Int, containerName: String ) { log(DEBUG, { str1 = containerName int1 = lastOrientation int2 = newOrientation }, { "configuration change: $str1 orientation was $int1, now $int2" }) } fun logSwitchTileLayout( after: Boolean, before: Boolean, force: Boolean, containerName: String ) { log(DEBUG, { str1 = containerName bool1 = after bool2 = before bool3 = force }, { "change tile layout: $str1 horizontal=$bool1 (was $bool2), force? $bool3" }) } private fun toStateString(state: Int): String { return when (state) { Tile.STATE_ACTIVE -> "active" Loading Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +5 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ public class QSPanel extends LinearLayout implements Tunable { if (mUsingMediaPlayer) { mHorizontalLinearLayout = new RemeasuringLinearLayout(mContext); mHorizontalLinearLayout.setOrientation(LinearLayout.HORIZONTAL); mHorizontalLinearLayout.setVisibility( mUsingHorizontalLayout ? View.VISIBLE : View.GONE); mHorizontalLinearLayout.setClipChildren(false); mHorizontalLinearLayout.setClipToPadding(false); Loading Loading @@ -445,6 +447,8 @@ public class QSPanel extends LinearLayout implements Tunable { mMediaHostView = hostView; ViewGroup newParent = horizontal ? mHorizontalLinearLayout : this; ViewGroup currentParent = (ViewGroup) hostView.getParent(); Log.d(getDumpableTag(), "Reattaching media host: " + horizontal + ", current " + currentParent + ", new " + newParent); if (currentParent != newParent) { if (currentParent != null) { currentParent.removeView(hostView); Loading Loading @@ -589,6 +593,7 @@ public class QSPanel extends LinearLayout implements Tunable { void setUsingHorizontalLayout(boolean horizontal, ViewGroup mediaHostView, boolean force) { if (horizontal != mUsingHorizontalLayout || force) { Log.d(getDumpableTag(), "setUsingHorizontalLayout: " + horizontal + ", " + force); mUsingHorizontalLayout = horizontal; ViewGroup newParent = horizontal ? mHorizontalContentContainer : this; switchAllContentToParent(newParent, mTileLayout); Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java +6 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr public void onConfigurationChange(Configuration newConfig) { mShouldUseSplitNotificationShade = LargeScreenUtils.shouldUseSplitNotificationShade(getResources()); mQSLogger.logOnConfigurationChanged(mLastOrientation, newConfig.orientation, mView.getDumpableTag()); onConfigurationChanged(); if (newConfig.orientation != mLastOrientation) { mLastOrientation = newConfig.orientation; Loading Loading @@ -164,6 +166,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr mHost.addCallback(mQSHostCallback); setTiles(); mLastOrientation = getResources().getConfiguration().orientation; mQSLogger.logOnViewAttached(mLastOrientation, mView.getDumpableTag()); switchTileLayout(true); mDumpManager.registerDumpable(mView.getDumpableTag(), this); Loading @@ -171,6 +174,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr @Override protected void onViewDetached() { mQSLogger.logOnViewDetached(mLastOrientation, mView.getDumpableTag()); mView.removeOnConfigurationChangedListener(mOnConfigurationChangedListener); mHost.removeCallback(mQSHostCallback); Loading Loading @@ -325,6 +329,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr /* Whether or not the panel currently contains a media player. */ boolean horizontal = shouldUseHorizontalLayout(); if (horizontal != mUsingHorizontalLayout || force) { mQSLogger.logSwitchTileLayout(horizontal, mUsingHorizontalLayout, force, mView.getDumpableTag()); mUsingHorizontalLayout = horizontal; mView.setUsingHorizontalLayout(mUsingHorizontalLayout, mMediaHost.getHostView(), force); updateMediaDisappearParameters(); Loading
packages/SystemUI/src/com/android/systemui/qs/logging/QSLogger.kt +48 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,54 @@ class QSLogger @Inject constructor( }) } fun logOnViewAttached(orientation: Int, containerName: String) { log(DEBUG, { str1 = containerName int1 = orientation }, { "onViewAttached: $str1 orientation $int1" }) } fun logOnViewDetached(orientation: Int, containerName: String) { log(DEBUG, { str1 = containerName int1 = orientation }, { "onViewDetached: $str1 orientation $int1" }) } fun logOnConfigurationChanged( lastOrientation: Int, newOrientation: Int, containerName: String ) { log(DEBUG, { str1 = containerName int1 = lastOrientation int2 = newOrientation }, { "configuration change: $str1 orientation was $int1, now $int2" }) } fun logSwitchTileLayout( after: Boolean, before: Boolean, force: Boolean, containerName: String ) { log(DEBUG, { str1 = containerName bool1 = after bool2 = before bool3 = force }, { "change tile layout: $str1 horizontal=$bool1 (was $bool2), force? $bool3" }) } private fun toStateString(state: Int): String { return when (state) { Tile.STATE_ACTIVE -> "active" Loading