10/N Remove MetricsLogger from QSPanel
Test: atest SystemUITests Bug: 168904199 Change-Id: I38f6c4d4086edacc20c447ffead6c0d2b325fd48
This commit is contained in:
@@ -35,11 +35,8 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.UiEventLogger;
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.internal.widget.RemeasuringLinearLayout;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.plugins.qs.DetailAdapter;
|
||||
import com.android.systemui.plugins.qs.QSTile;
|
||||
@@ -77,7 +74,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
protected BrightnessSlider mToggleSliderController;
|
||||
|
||||
private final H mHandler = new H();
|
||||
private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class);
|
||||
/** Whether or not the QS media player feature is enabled. */
|
||||
protected boolean mUsingMediaPlayer;
|
||||
private int mVisualMarginStart;
|
||||
@@ -104,7 +100,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
@Nullable
|
||||
private ViewGroup mHeaderContainer;
|
||||
private PageIndicator mFooterPageIndicator;
|
||||
private boolean mGridContentVisible = true;
|
||||
private int mContentMarginStart;
|
||||
private int mContentMarginEnd;
|
||||
private int mVisualTilePadding;
|
||||
@@ -367,15 +362,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
mDivider = findViewById(R.id.divider);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the listening state of the current layout to the state of the view. Used after
|
||||
* switching layouts.
|
||||
*/
|
||||
public void reSetLayoutListening() {
|
||||
mTileLayout.setListening(mListening);
|
||||
}
|
||||
|
||||
private void updateHorizontalLinearLayoutMargins() {
|
||||
if (mHorizontalLinearLayout != null && !displayMediaMarginsOnMedia()) {
|
||||
LayoutParams lp = (LayoutParams) mHorizontalLinearLayout.getLayoutParams();
|
||||
@@ -634,14 +620,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
fireScanStateChanged(scanState);
|
||||
}
|
||||
|
||||
void setGridContentVisibility(boolean visible) {
|
||||
int newVis = visible ? VISIBLE : INVISIBLE;
|
||||
setVisibility(newVis);
|
||||
if (mGridContentVisible != visible) {
|
||||
mMetricsLogger.visibility(MetricsEvent.QS_PANEL, newVis);
|
||||
}
|
||||
mGridContentVisible = visible;
|
||||
}
|
||||
private void fireShowingDetail(DetailAdapter detail, int x, int y) {
|
||||
if (mCallback != null) {
|
||||
mCallback.onShowingDetail(detail, x, y);
|
||||
@@ -869,7 +847,7 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the max number of collums to show
|
||||
* Set the max number of columns to show
|
||||
*
|
||||
* @param maxColumns the maximum
|
||||
*
|
||||
|
||||
@@ -28,6 +28,7 @@ import android.view.ViewGroup;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.UiEventLogger;
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.systemui.dump.DumpManager;
|
||||
import com.android.systemui.media.MediaHierarchyManager;
|
||||
import com.android.systemui.media.MediaHost;
|
||||
@@ -58,6 +59,9 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> {
|
||||
private final BrightnessSlider.Factory mBrightnessSliderFactory;
|
||||
private final BrightnessSlider mBrightnessSlider;
|
||||
|
||||
private BrightnessMirrorController mBrightnessMirrorController;
|
||||
private boolean mGridContentVisible = true;
|
||||
|
||||
private final QSPanel.OnConfigurationChangedListener mOnConfigurationChangedListener =
|
||||
new QSPanel.OnConfigurationChangedListener() {
|
||||
@Override
|
||||
@@ -70,7 +74,6 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> {
|
||||
updateBrightnessMirror();
|
||||
}
|
||||
};
|
||||
private BrightnessMirrorController mBrightnessMirrorController;
|
||||
|
||||
private final BrightnessMirrorController.BrightnessMirrorListener mBrightnessMirrorListener =
|
||||
mirror -> updateBrightnessMirror();
|
||||
@@ -243,7 +246,12 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> {
|
||||
|
||||
/** */
|
||||
public void setGridContentVisibility(boolean visible) {
|
||||
mView.setGridContentVisibility(visible);
|
||||
int newVis = visible ? View.VISIBLE : View.INVISIBLE;
|
||||
setVisibility(newVis);
|
||||
if (mGridContentVisible != visible) {
|
||||
mMetricsLogger.visibility(MetricsEvent.QS_PANEL, newVis);
|
||||
}
|
||||
mGridContentVisible = visible;
|
||||
}
|
||||
|
||||
public boolean isLayoutRtl() {
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
|
||||
private final QSCustomizerController mQsCustomizerController;
|
||||
private final boolean mUsingMediaPlayer;
|
||||
protected final MediaHost mMediaHost;
|
||||
private final MetricsLogger mMetricsLogger;
|
||||
protected final MetricsLogger mMetricsLogger;
|
||||
private final UiEventLogger mUiEventLogger;
|
||||
private final DumpManager mDumpManager;
|
||||
protected final ArrayList<TileRecord> mRecords = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user