summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Beverly <beverlyt@google.com> 2020-06-04 13:30:15 -0400
committer Beverly <beverlyt@google.com> 2020-06-04 13:30:15 -0400
commit294762c45fdd750ac04c0b1e15a7f89c9562a26c (patch)
tree68e7c664f8a68fb077cc6d34477845afb6e4ca00
parenteadf939db8dfd2edc5fd12b692b7037294c15a62 (diff)
Always update PageIndicator visibility
Even if the number of childCount of the PageIndicator matches the new number of pages being set, update the PageIndicator's visibility in case this is the first time PageIndicator is being set to visible. Test: Reboot device, fully expand QS with more than one page of tiles -> should be able to see the PageIndicator Fixes: 158118587 Change-Id: I20cc995cfe6d92b730ce722c924b945bfa1c6bde
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java b/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java
index 0d614497190f..2c76d70fb3cc 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java
@@ -45,9 +45,6 @@ public class PageIndicator extends ViewGroup {
}
public void setNumPages(int numPages) {
- if (numPages == getChildCount()) {
- return;
- }
TypedArray array = getContext().obtainStyledAttributes(
new int[]{android.R.attr.colorControlActivated});
int color = array.getColor(0, 0);
@@ -55,12 +52,12 @@ public class PageIndicator extends ViewGroup {
setNumPages(numPages, color);
}
- /** Oveload of setNumPages that allows the indicator color to be specified.*/
+ /** Overload of setNumPages that allows the indicator color to be specified.*/
public void setNumPages(int numPages, int color) {
+ setVisibility(numPages > 1 ? View.VISIBLE : View.GONE);
if (numPages == getChildCount()) {
return;
}
- setVisibility(numPages > 1 ? View.VISIBLE : View.GONE);
if (mAnimating) {
Log.w(TAG, "setNumPages during animation");
}