summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2020-06-01 14:43:31 +0200
committerMichael W <baddaemon87@gmail.com>2020-06-05 13:56:44 +0200
commit63fc6d8c0acb37835336862674206cf001753667 (patch)
treea98e39ccb2592ddf043e87630d19d3574100feb1 /packages
parent2dc4ad095d8a0792c42d7a1dbe0d7f6e37717b23 (diff)
downloadframeworks_base-63fc6d8c0acb37835336862674206cf001753667.tar.gz
frameworks_base-63fc6d8c0acb37835336862674206cf001753667.tar.bz2
frameworks_base-63fc6d8c0acb37835336862674206cf001753667.zip
SystemUI: Make clock truly invisible
* When the clock is set to left and then hidden, the notification icons, which would appear on the left first transition to the right to make place for the clock then finally snap into place * The same happens when the clock was set to show right and then is hidden: The battery, wifi, etc. icons do leave space for the (not displayed) clock and then snap to the right * This patch fixes the behavior Change-Id: Ic68b1001becb91da6f1aeaca95a7312b36e1d2a1
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
index 1607b464b80..76344345d82 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
@@ -289,7 +289,8 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
*/
private int clockHiddenMode() {
if (!mStatusBar.isClosed() && !mKeyguardMonitor.isShowing()
- && !mStatusBarStateController.isDozing()) {
+ && !mStatusBarStateController.isDozing()
+ && mClockController.getClock().shouldBeVisible()) {
return View.INVISIBLE;
}
return View.GONE;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index f1808c133c9..b89f27d5b5d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -268,7 +268,7 @@ public class Clock extends TextView implements DemoMode, Tunable, CommandQueue.C
updateClockVisibility();
}
- private boolean shouldBeVisible() {
+ public boolean shouldBeVisible() {
return mClockVisibleByPolicy && mClockVisibleByUser;
}