Add logs to ensure that QS / NPVC clip bounds match
Bug: 191436459 Test: treehugger Change-Id: I07dbb58b234bee06c31a67fd38ab363ff13d9458 Merged-In: I07dbb58b234bee06c31a67fd38ab363ff13d9458
This commit is contained in:
@@ -28,13 +28,17 @@ import android.view.View;
|
|||||||
import android.view.WindowInsets;
|
import android.view.WindowInsets;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
|
import com.android.systemui.Dumpable;
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.qs.customize.QSCustomizer;
|
import com.android.systemui.qs.customize.QSCustomizer;
|
||||||
|
|
||||||
|
import java.io.FileDescriptor;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper view with background which contains {@link QSPanel} and {@link QuickStatusBarHeader}
|
* Wrapper view with background which contains {@link QSPanel} and {@link QuickStatusBarHeader}
|
||||||
*/
|
*/
|
||||||
public class QSContainerImpl extends FrameLayout {
|
public class QSContainerImpl extends FrameLayout implements Dumpable {
|
||||||
|
|
||||||
private final Point mSizePoint = new Point();
|
private final Point mSizePoint = new Point();
|
||||||
private int mFancyClippingTop;
|
private int mFancyClippingTop;
|
||||||
@@ -296,4 +300,11 @@ public class QSContainerImpl extends FrameLayout {
|
|||||||
mFancyClippingBottom, mFancyClippingRadii, Path.Direction.CW);
|
mFancyClippingBottom, mFancyClippingRadii, Path.Direction.CW);
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||||
|
pw.println(getClass().getSimpleName() + " updateClippingPath: top("
|
||||||
|
+ mFancyClippingTop + ") bottom(" + mFancyClippingBottom + ") mClippingEnabled("
|
||||||
|
+ mClippingEnabled + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ import android.widget.FrameLayout.LayoutParams;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.VisibleForTesting;
|
import androidx.annotation.VisibleForTesting;
|
||||||
|
|
||||||
|
import com.android.systemui.Dumpable;
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.animation.Interpolators;
|
import com.android.systemui.animation.Interpolators;
|
||||||
|
import com.android.systemui.dump.DumpManager;
|
||||||
import com.android.systemui.media.MediaHost;
|
import com.android.systemui.media.MediaHost;
|
||||||
import com.android.systemui.plugins.FalsingManager;
|
import com.android.systemui.plugins.FalsingManager;
|
||||||
import com.android.systemui.plugins.qs.QS;
|
import com.android.systemui.plugins.qs.QS;
|
||||||
@@ -131,6 +133,8 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
*/
|
*/
|
||||||
private boolean mAnimateNextQsUpdate;
|
private boolean mAnimateNextQsUpdate;
|
||||||
|
|
||||||
|
private DumpManager mDumpManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public QSFragment(RemoteInputQuickSettingsDisabler remoteInputQsDisabler,
|
public QSFragment(RemoteInputQuickSettingsDisabler remoteInputQsDisabler,
|
||||||
InjectionInflationController injectionInflater, QSTileHost qsTileHost,
|
InjectionInflationController injectionInflater, QSTileHost qsTileHost,
|
||||||
@@ -139,7 +143,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
@Named(QUICK_QS_PANEL) MediaHost qqsMediaHost,
|
@Named(QUICK_QS_PANEL) MediaHost qqsMediaHost,
|
||||||
KeyguardBypassController keyguardBypassController,
|
KeyguardBypassController keyguardBypassController,
|
||||||
QSFragmentComponent.Factory qsComponentFactory, FeatureFlags featureFlags,
|
QSFragmentComponent.Factory qsComponentFactory, FeatureFlags featureFlags,
|
||||||
FalsingManager falsingManager) {
|
FalsingManager falsingManager, DumpManager dumpManager) {
|
||||||
mRemoteInputQuickSettingsDisabler = remoteInputQsDisabler;
|
mRemoteInputQuickSettingsDisabler = remoteInputQsDisabler;
|
||||||
mInjectionInflater = injectionInflater;
|
mInjectionInflater = injectionInflater;
|
||||||
mCommandQueue = commandQueue;
|
mCommandQueue = commandQueue;
|
||||||
@@ -153,6 +157,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
mFalsingManager = falsingManager;
|
mFalsingManager = falsingManager;
|
||||||
mBypassController = keyguardBypassController;
|
mBypassController = keyguardBypassController;
|
||||||
mStatusBarStateController = statusBarStateController;
|
mStatusBarStateController = statusBarStateController;
|
||||||
|
mDumpManager = dumpManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -197,6 +202,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
mQSContainerImplController = qsFragmentComponent.getQSContainerImplController();
|
mQSContainerImplController = qsFragmentComponent.getQSContainerImplController();
|
||||||
mQSContainerImplController.init();
|
mQSContainerImplController.init();
|
||||||
mContainer = mQSContainerImplController.getView();
|
mContainer = mQSContainerImplController.getView();
|
||||||
|
mDumpManager.registerDumpable(mContainer.getClass().getName(), mContainer);
|
||||||
|
|
||||||
mQSDetail.setQsPanel(mQSPanelController, mHeader, mFooter, mFalsingManager);
|
mQSDetail.setQsPanel(mQSPanelController, mHeader, mFooter, mFalsingManager);
|
||||||
mQSAnimator = qsFragmentComponent.getQSAnimator();
|
mQSAnimator = qsFragmentComponent.getQSAnimator();
|
||||||
@@ -248,6 +254,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
|||||||
mQSCustomizerController.setQs(null);
|
mQSCustomizerController.setQs(null);
|
||||||
mQsDetailDisplayer.setQsPanelController(null);
|
mQsDetailDisplayer.setQsPanelController(null);
|
||||||
mScrollListener = null;
|
mScrollListener = null;
|
||||||
|
mDumpManager.unregisterDumpable(mContainer.getClass().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -631,6 +631,9 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
private int mScreenCornerRadius;
|
private int mScreenCornerRadius;
|
||||||
private boolean mQSAnimatingHiddenFromCollapsed;
|
private boolean mQSAnimatingHiddenFromCollapsed;
|
||||||
|
|
||||||
|
private int mQsClipTop;
|
||||||
|
private int mQsClipBottom;
|
||||||
|
private boolean mQsVisible;
|
||||||
private final ContentResolver mContentResolver;
|
private final ContentResolver mContentResolver;
|
||||||
|
|
||||||
private final Executor mUiExecutor;
|
private final Executor mUiExecutor;
|
||||||
@@ -2402,9 +2405,12 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
mQsTranslationForFullShadeTransition = qsTranslation;
|
mQsTranslationForFullShadeTransition = qsTranslation;
|
||||||
updateQsFrameTranslation();
|
updateQsFrameTranslation();
|
||||||
float currentTranslation = mQsFrame.getTranslationY();
|
float currentTranslation = mQsFrame.getTranslationY();
|
||||||
mQs.setFancyClipping((
|
mQsClipTop = (int) (top - currentTranslation);
|
||||||
int) (top - currentTranslation),
|
mQsClipBottom = (int) (bottom - currentTranslation);
|
||||||
(int) (bottom - currentTranslation),
|
mQsVisible = qsVisible;
|
||||||
|
mQs.setFancyClipping(
|
||||||
|
mQsClipTop,
|
||||||
|
mQsClipBottom,
|
||||||
radius, qsVisible
|
radius, qsVisible
|
||||||
&& !mShouldUseSplitNotificationShade);
|
&& !mShouldUseSplitNotificationShade);
|
||||||
}
|
}
|
||||||
@@ -3733,7 +3739,10 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
@Override
|
@Override
|
||||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||||
super.dump(fd, pw, args);
|
super.dump(fd, pw, args);
|
||||||
pw.println(" gestureExclusionRect: " + calculateGestureExclusionRect());
|
pw.println(" gestureExclusionRect: " + calculateGestureExclusionRect()
|
||||||
|
+ " applyQSClippingImmediately: top(" + mQsClipTop + ") bottom(" + mQsClipBottom
|
||||||
|
+ ") qsVisible(" + mQsVisible
|
||||||
|
);
|
||||||
if (mKeyguardStatusBar != null) {
|
if (mKeyguardStatusBar != null) {
|
||||||
mKeyguardStatusBar.dump(fd, pw, args);
|
mKeyguardStatusBar.dump(fd, pw, args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ public class QSFragmentTest extends SysuiBaseFragmentTest {
|
|||||||
mBypassController,
|
mBypassController,
|
||||||
mQsComponentFactory,
|
mQsComponentFactory,
|
||||||
mFeatureFlags,
|
mFeatureFlags,
|
||||||
mFalsingManager);
|
mFalsingManager,
|
||||||
|
mock(DumpManager.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user