Skip to content

Commit a8ef3b0

Browse files
committed
Suppress quick settings if setup has not been completed.
The button was already hidden, but there are lots of other ways to get into QS that should check for USER_SETUP. Bug: 7638795 Change-Id: Ib6c48fc02e833670768e7dc76e25c38097b88c18
1 parent bf0e106 commit a8ef3b0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public void onChange(boolean selfChange) {
298298
if (MULTIUSER_DEBUG) Slog.d(TAG, String.format("User setup changed: " +
299299
"selfChange=%s userSetup=%s mUserSetup=%s",
300300
selfChange, userSetup, mUserSetup));
301-
if (mSettingsButton != null && !mHasSettingsPanel) {
301+
if (mSettingsButton != null && mHasFlipSettings) {
302302
mSettingsButton.setVisibility(userSetup ? View.VISIBLE : View.INVISIBLE);
303303
}
304304
if (mSettingsPanel != null) {
@@ -1488,6 +1488,9 @@ public void animateExpandSettingsPanel() {
14881488
return;
14891489
}
14901490

1491+
// Settings are not available in setup
1492+
if (!mUserSetup) return;
1493+
14911494
if (mHasFlipSettings) {
14921495
mNotificationPanel.expand();
14931496
if (mFlipSettingsView.getVisibility() != View.VISIBLE) {
@@ -1501,6 +1504,9 @@ public void animateExpandSettingsPanel() {
15011504
}
15021505

15031506
public void switchToSettings() {
1507+
// Settings are not available in setup
1508+
if (!mUserSetup) return;
1509+
15041510
mFlipSettingsView.setScaleX(1f);
15051511
mFlipSettingsView.setVisibility(View.VISIBLE);
15061512
mSettingsButton.setVisibility(View.GONE);
@@ -1512,6 +1518,9 @@ public void switchToSettings() {
15121518
}
15131519

15141520
public void flipToSettings() {
1521+
// Settings are not available in setup
1522+
if (!mUserSetup) return;
1523+
15151524
if (mFlipSettingsViewAnim != null) mFlipSettingsViewAnim.cancel();
15161525
if (mScrollViewAnim != null) mScrollViewAnim.cancel();
15171526
if (mSettingsButtonAnim != null) mSettingsButtonAnim.cancel();

0 commit comments

Comments
 (0)