Loading packages/SystemUI/src/com/android/systemui/qs/QSContainer.java +1 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ public class QSContainer extends FrameLayout { private void updateQsState() { boolean expandVisually = mQsExpanded || mStackScrollerOverscrolling || mHeaderAnimating; mQSPanel.setExpanded(mQsExpanded); mQSDetail.setExpanded(mQsExpanded); mHeader.setVisibility((mQsExpanded || !mKeyguardShowing || mHeaderAnimating) ? View.VISIBLE : View.INVISIBLE); Loading packages/SystemUI/src/com/android/systemui/qs/QSDetail.java +27 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Switch; import android.widget.TextView; import com.android.internal.logging.MetricsLogger; import com.android.systemui.FontSizeUtils; import com.android.systemui.R; Loading Loading @@ -64,6 +65,9 @@ public class QSDetail extends LinearLayout { private boolean mFullyExpanded; protected View mQsDetailHeaderBack; private BaseStatusBarHeader mHeader; private boolean mTriggeredExpand; private int mOpenX; private int mOpenY; public QSDetail(Context context, @Nullable AttributeSet attrs) { super(context, attrs); Loading Loading @@ -112,6 +116,7 @@ public class QSDetail extends LinearLayout { public void setQsPanel(QSPanel panel, BaseStatusBarHeader header) { mQsPanel = panel; mHeader = header; mHeader.setCallback(mQsPanelCallback); mQsPanel.setCallback(mQsPanelCallback); } Loading @@ -126,6 +131,12 @@ public class QSDetail extends LinearLayout { mFullyExpanded = fullyExpanded; } public void setExpanded(boolean qsExpanded) { if (!qsExpanded) { mTriggeredExpand = false; } } private void updateDetailText() { mDetailDoneButton.setText(R.string.quick_settings_done); mDetailSettingsButton.setText(R.string.quick_settings_more_settings); Loading @@ -146,6 +157,22 @@ public class QSDetail extends LinearLayout { setClickable(showingDetail); if (showingDetail) { setupDetailHeader(adapter); if (!mFullyExpanded) { mTriggeredExpand = true; mHost.animateToggleQSExpansion(); } else { mTriggeredExpand = false; } mOpenX = x; mOpenY = y; } else { // Ensure we collapse into the same point we opened from. x = mOpenX; y = mOpenY; if (mTriggeredExpand) { mHost.animateToggleQSExpansion(); mTriggeredExpand = false; } } boolean visibleDiff = (mDetailAdapter != null) != (adapter != null); Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +10 −14 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.res.Resources; import android.os.Handler; import android.os.Message; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; Loading Loading @@ -70,7 +71,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { private QSCustomizer mCustomizePanel; private Record mDetailRecord; private boolean mTriggeredExpand; public QSPanel(Context context) { this(context, null); Loading Loading @@ -220,7 +220,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { } MetricsLogger.visibility(mContext, MetricsEvent.QS_PANEL, mExpanded); if (!mExpanded) { mTriggeredExpand = false; closeDetail(); } else { logTiles(); Loading Loading @@ -298,6 +297,10 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { return new QSTileView(mContext, tile.createTileView(mContext), collapsedView); } protected boolean shouldShowDetail() { return mExpanded; } protected TileRecord addTile(final QSTile<?> tile, boolean collapsedView) { final TileRecord r = new TileRecord(); r.tile = tile; Loading @@ -310,8 +313,12 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { @Override public void onShowDetail(boolean show) { // Both the collapsed and full QS panels get this callback, this check determines // which one should handle showing the detail. if (shouldShowDetail()) { QSPanel.this.showDetail(show, r); } } @Override public void onToggleStateChanged(boolean state) { Loading Loading @@ -397,17 +404,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { } protected void handleShowDetail(Record r, boolean show) { if (show) { if (!mExpanded) { mTriggeredExpand = true; mHost.animateToggleQSExpansion(); } else { mTriggeredExpand = false; } } else if (mTriggeredExpand) { mHost.animateToggleQSExpansion(); mTriggeredExpand = false; } if (r instanceof TileRecord) { handleShowDetailTile((TileRecord) r, show); } else { Loading packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +5 −5 Original line number Diff line number Diff line Loading @@ -76,6 +76,11 @@ public class QuickQSPanel extends QSPanel { mHeader = header; } @Override protected boolean shouldShowDetail() { return !mExpanded; } @Override protected void drawTile(TileRecord r, State state) { if (state instanceof SignalState) { Loading @@ -89,11 +94,6 @@ public class QuickQSPanel extends QSPanel { super.drawTile(r, state); } @Override protected void showDetail(boolean show, Record r) { // Do nothing, will be handled by the QSPanel. } @Override protected QSTileBaseView createTileView(QSTile<?> tile, boolean collapsedView) { return new QSTileBaseView(mContext, tile.createTileView(mContext), collapsedView); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/BaseStatusBarHeader.java +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.util.AttributeSet; import android.widget.RelativeLayout; import com.android.systemui.qs.QSPanel; import com.android.systemui.qs.QSPanel.Callback; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.NetworkControllerImpl; import com.android.systemui.statusbar.policy.NextAlarmController; Loading @@ -44,4 +45,5 @@ public abstract class BaseStatusBarHeader extends RelativeLayout implements public abstract void setBatteryController(BatteryController batteryController); public abstract void setNextAlarmController(NextAlarmController nextAlarmController); public abstract void setUserInfoController(UserInfoController userInfoController); public abstract void setCallback(Callback qsPanelCallback); } Loading
packages/SystemUI/src/com/android/systemui/qs/QSContainer.java +1 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ public class QSContainer extends FrameLayout { private void updateQsState() { boolean expandVisually = mQsExpanded || mStackScrollerOverscrolling || mHeaderAnimating; mQSPanel.setExpanded(mQsExpanded); mQSDetail.setExpanded(mQsExpanded); mHeader.setVisibility((mQsExpanded || !mKeyguardShowing || mHeaderAnimating) ? View.VISIBLE : View.INVISIBLE); Loading
packages/SystemUI/src/com/android/systemui/qs/QSDetail.java +27 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Switch; import android.widget.TextView; import com.android.internal.logging.MetricsLogger; import com.android.systemui.FontSizeUtils; import com.android.systemui.R; Loading Loading @@ -64,6 +65,9 @@ public class QSDetail extends LinearLayout { private boolean mFullyExpanded; protected View mQsDetailHeaderBack; private BaseStatusBarHeader mHeader; private boolean mTriggeredExpand; private int mOpenX; private int mOpenY; public QSDetail(Context context, @Nullable AttributeSet attrs) { super(context, attrs); Loading Loading @@ -112,6 +116,7 @@ public class QSDetail extends LinearLayout { public void setQsPanel(QSPanel panel, BaseStatusBarHeader header) { mQsPanel = panel; mHeader = header; mHeader.setCallback(mQsPanelCallback); mQsPanel.setCallback(mQsPanelCallback); } Loading @@ -126,6 +131,12 @@ public class QSDetail extends LinearLayout { mFullyExpanded = fullyExpanded; } public void setExpanded(boolean qsExpanded) { if (!qsExpanded) { mTriggeredExpand = false; } } private void updateDetailText() { mDetailDoneButton.setText(R.string.quick_settings_done); mDetailSettingsButton.setText(R.string.quick_settings_more_settings); Loading @@ -146,6 +157,22 @@ public class QSDetail extends LinearLayout { setClickable(showingDetail); if (showingDetail) { setupDetailHeader(adapter); if (!mFullyExpanded) { mTriggeredExpand = true; mHost.animateToggleQSExpansion(); } else { mTriggeredExpand = false; } mOpenX = x; mOpenY = y; } else { // Ensure we collapse into the same point we opened from. x = mOpenX; y = mOpenY; if (mTriggeredExpand) { mHost.animateToggleQSExpansion(); mTriggeredExpand = false; } } boolean visibleDiff = (mDetailAdapter != null) != (adapter != null); Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +10 −14 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.res.Resources; import android.os.Handler; import android.os.Message; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; Loading Loading @@ -70,7 +71,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { private QSCustomizer mCustomizePanel; private Record mDetailRecord; private boolean mTriggeredExpand; public QSPanel(Context context) { this(context, null); Loading Loading @@ -220,7 +220,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { } MetricsLogger.visibility(mContext, MetricsEvent.QS_PANEL, mExpanded); if (!mExpanded) { mTriggeredExpand = false; closeDetail(); } else { logTiles(); Loading Loading @@ -298,6 +297,10 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { return new QSTileView(mContext, tile.createTileView(mContext), collapsedView); } protected boolean shouldShowDetail() { return mExpanded; } protected TileRecord addTile(final QSTile<?> tile, boolean collapsedView) { final TileRecord r = new TileRecord(); r.tile = tile; Loading @@ -310,8 +313,12 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { @Override public void onShowDetail(boolean show) { // Both the collapsed and full QS panels get this callback, this check determines // which one should handle showing the detail. if (shouldShowDetail()) { QSPanel.this.showDetail(show, r); } } @Override public void onToggleStateChanged(boolean state) { Loading Loading @@ -397,17 +404,6 @@ public class QSPanel extends LinearLayout implements Tunable, Callback { } protected void handleShowDetail(Record r, boolean show) { if (show) { if (!mExpanded) { mTriggeredExpand = true; mHost.animateToggleQSExpansion(); } else { mTriggeredExpand = false; } } else if (mTriggeredExpand) { mHost.animateToggleQSExpansion(); mTriggeredExpand = false; } if (r instanceof TileRecord) { handleShowDetailTile((TileRecord) r, show); } else { Loading
packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +5 −5 Original line number Diff line number Diff line Loading @@ -76,6 +76,11 @@ public class QuickQSPanel extends QSPanel { mHeader = header; } @Override protected boolean shouldShowDetail() { return !mExpanded; } @Override protected void drawTile(TileRecord r, State state) { if (state instanceof SignalState) { Loading @@ -89,11 +94,6 @@ public class QuickQSPanel extends QSPanel { super.drawTile(r, state); } @Override protected void showDetail(boolean show, Record r) { // Do nothing, will be handled by the QSPanel. } @Override protected QSTileBaseView createTileView(QSTile<?> tile, boolean collapsedView) { return new QSTileBaseView(mContext, tile.createTileView(mContext), collapsedView); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/BaseStatusBarHeader.java +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.util.AttributeSet; import android.widget.RelativeLayout; import com.android.systemui.qs.QSPanel; import com.android.systemui.qs.QSPanel.Callback; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.NetworkControllerImpl; import com.android.systemui.statusbar.policy.NextAlarmController; Loading @@ -44,4 +45,5 @@ public abstract class BaseStatusBarHeader extends RelativeLayout implements public abstract void setBatteryController(BatteryController batteryController); public abstract void setNextAlarmController(NextAlarmController nextAlarmController); public abstract void setUserInfoController(UserInfoController userInfoController); public abstract void setCallback(Callback qsPanelCallback); }