summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorTimi Rautamäki <timi.rautamaki@gmail.com>2022-03-14 08:50:25 +0000
committeralk3pInjection <webmaster@raspii.tech>2022-05-07 00:20:58 +0800
commita75763aaba6bf8b35c318a25091476aef35ddb18 (patch)
tree8182c1f0cc1f1546ae6a74e2c5b5309f42ae5431 /packages
parent236bec889cdcbb656689e3865fce856cc56dd298 (diff)
Keyguard: allow large clock on tablets
This effectively allows large clock to be shown on tablets, while keeping it disabled for small screen devices. Change-Id: I5bd1cdead55bd11dd4d0684ff95986cbcfdf4757
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
index 1e1bcd14e23b..74430a66d461 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
@@ -1,5 +1,7 @@
package com.android.keyguard;
+import static com.android.systemui.shared.recents.utilities.Utilities.isTablet;
+
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -100,7 +102,8 @@ public class KeyguardClockSwitch extends RelativeLayout {
if (mDisplayedClockSize != null) {
boolean landscape = newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE;
- boolean useLargeClock = mDisplayedClockSize == LARGE && !landscape;
+ boolean useLargeClock = mDisplayedClockSize == LARGE &&
+ (!landscape || isTablet(mContext));
animateClockChange(useLargeClock);
}
}
@@ -291,7 +294,7 @@ public class KeyguardClockSwitch extends RelativeLayout {
}
boolean landscape = getResources().getConfiguration().orientation
== Configuration.ORIENTATION_LANDSCAPE;
- boolean useLargeClock = clockSize == LARGE && !landscape;
+ boolean useLargeClock = clockSize == LARGE && (!landscape || isTablet(mContext));
// let's make sure clock is changed only after all views were laid out so we can
// translate them properly