Loading packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +0 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.util.ViewController; Loading @@ -49,7 +48,6 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie private final StatusBarStateController mStatusBarStateController; private final BroadcastDispatcher mBroadcastDispatcher; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardBypassController mBypassController; private final BatteryController mBatteryController; private final int mDozingColor = Color.WHITE; private int mLockScreenColor; Loading @@ -71,14 +69,12 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie BroadcastDispatcher broadcastDispatcher, BatteryController batteryController, KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardBypassController bypassController, @Main Resources resources ) { super(view); mStatusBarStateController = statusBarStateController; mBroadcastDispatcher = broadcastDispatcher; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mBypassController = bypassController; mBatteryController = batteryController; mBurmeseNumerals = mBurmeseNf.format(FORMAT_NUMBER); Loading packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java +29 −21 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.util.AttributeSet; import android.widget.TextView; import com.android.systemui.R; import com.android.systemui.statusbar.phone.KeyguardBypassController; import java.util.Calendar; import java.util.Locale; Loading Loading @@ -111,6 +110,28 @@ public class AnimatableClockView extends TextView { super.onDetachedFromWindow(); } int getDozingWeight() { if (useBoldedVersion()) { return mDozingWeight + 100; } return mDozingWeight; } int getLockScreenWeight() { if (useBoldedVersion()) { return mLockScreenWeight + 100; } return mLockScreenWeight; } /** * Whether to use a bolded version based on the user specified fontWeightAdjustment. */ boolean useBoldedVersion() { // "Bold text" fontWeightAdjustment is 300. return getResources().getConfiguration().fontWeightAdjustment > 100; } void refreshTime() { mTime.setTimeInMillis(System.currentTimeMillis()); setText(DateFormat.format(mFormat, mTime)); Loading Loading @@ -162,7 +183,7 @@ public class AnimatableClockView extends TextView { } setTextStyle( mDozingWeight, getDozingWeight(), -1 /* text size, no update */, mLockScreenColor, false /* animate */, Loading @@ -171,7 +192,7 @@ public class AnimatableClockView extends TextView { null /* onAnimationEnd */); setTextStyle( mLockScreenWeight, getLockScreenWeight(), -1 /* text size, no update */, mLockScreenColor, true, /* animate */ Loading @@ -180,35 +201,22 @@ public class AnimatableClockView extends TextView { null /* onAnimationEnd */); } void animateDisappear() { if (mTextAnimator == null) { return; } setTextStyle( 0 /* weight */, -1 /* text size, no update */, null /* color, no update */, true /* animate */, KeyguardBypassController.BYPASS_FADE_DURATION /* duration */, 0 /* delay */, null /* onAnimationEnd */); } void animateCharge(DozeStateGetter dozeStateGetter) { if (mTextAnimator == null || mTextAnimator.isRunning()) { // Skip charge animation if dozing animation is already playing. return; } Runnable startAnimPhase2 = () -> setTextStyle( dozeStateGetter.isDozing() ? mDozingWeight : mLockScreenWeight/* weight */, dozeStateGetter.isDozing() ? getDozingWeight() : getLockScreenWeight() /* weight */, -1, null, true /* animate */, CHARGE_ANIM_DURATION_PHASE_1, 0 /* delay */, null /* onAnimationEnd */); setTextStyle(dozeStateGetter.isDozing() ? mLockScreenWeight : mDozingWeight/* weight */, setTextStyle(dozeStateGetter.isDozing() ? getLockScreenWeight() : getDozingWeight()/* weight */, -1, null, true /* animate */, Loading @@ -218,7 +226,7 @@ public class AnimatableClockView extends TextView { } void animateDoze(boolean isDozing, boolean animate) { setTextStyle(isDozing ? mDozingWeight : mLockScreenWeight /* weight */, setTextStyle(isDozing ? getDozingWeight() : getLockScreenWeight() /* weight */, -1, isDozing ? mDozingColor : mLockScreenColor, animate, Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +0 −2 Original line number Diff line number Diff line Loading @@ -167,7 +167,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, mBypassController, mResources); mClockViewController.init(); Loading @@ -178,7 +177,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, mBypassController, mResources); mLargeClockViewController.init(); } Loading packages/SystemUI/tests/src/com/android/systemui/keyguard/AnimatableClockControllerTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import com.android.settingslib.Utils; import com.android.systemui.SysuiTestCase; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.BatteryController; import org.junit.After; Loading Loading @@ -69,8 +68,6 @@ public class AnimatableClockControllerTest extends SysuiTestCase { @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private KeyguardBypassController mBypassController; @Mock private Resources mResources; private MockitoSession mStaticMockSession; Loading Loading @@ -99,7 +96,6 @@ public class AnimatableClockControllerTest extends SysuiTestCase { mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, mBypassController, mResources ); mAnimatableClockController.init(); Loading Loading
packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +0 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.util.ViewController; Loading @@ -49,7 +48,6 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie private final StatusBarStateController mStatusBarStateController; private final BroadcastDispatcher mBroadcastDispatcher; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardBypassController mBypassController; private final BatteryController mBatteryController; private final int mDozingColor = Color.WHITE; private int mLockScreenColor; Loading @@ -71,14 +69,12 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie BroadcastDispatcher broadcastDispatcher, BatteryController batteryController, KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardBypassController bypassController, @Main Resources resources ) { super(view); mStatusBarStateController = statusBarStateController; mBroadcastDispatcher = broadcastDispatcher; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mBypassController = bypassController; mBatteryController = batteryController; mBurmeseNumerals = mBurmeseNf.format(FORMAT_NUMBER); Loading
packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java +29 −21 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.util.AttributeSet; import android.widget.TextView; import com.android.systemui.R; import com.android.systemui.statusbar.phone.KeyguardBypassController; import java.util.Calendar; import java.util.Locale; Loading Loading @@ -111,6 +110,28 @@ public class AnimatableClockView extends TextView { super.onDetachedFromWindow(); } int getDozingWeight() { if (useBoldedVersion()) { return mDozingWeight + 100; } return mDozingWeight; } int getLockScreenWeight() { if (useBoldedVersion()) { return mLockScreenWeight + 100; } return mLockScreenWeight; } /** * Whether to use a bolded version based on the user specified fontWeightAdjustment. */ boolean useBoldedVersion() { // "Bold text" fontWeightAdjustment is 300. return getResources().getConfiguration().fontWeightAdjustment > 100; } void refreshTime() { mTime.setTimeInMillis(System.currentTimeMillis()); setText(DateFormat.format(mFormat, mTime)); Loading Loading @@ -162,7 +183,7 @@ public class AnimatableClockView extends TextView { } setTextStyle( mDozingWeight, getDozingWeight(), -1 /* text size, no update */, mLockScreenColor, false /* animate */, Loading @@ -171,7 +192,7 @@ public class AnimatableClockView extends TextView { null /* onAnimationEnd */); setTextStyle( mLockScreenWeight, getLockScreenWeight(), -1 /* text size, no update */, mLockScreenColor, true, /* animate */ Loading @@ -180,35 +201,22 @@ public class AnimatableClockView extends TextView { null /* onAnimationEnd */); } void animateDisappear() { if (mTextAnimator == null) { return; } setTextStyle( 0 /* weight */, -1 /* text size, no update */, null /* color, no update */, true /* animate */, KeyguardBypassController.BYPASS_FADE_DURATION /* duration */, 0 /* delay */, null /* onAnimationEnd */); } void animateCharge(DozeStateGetter dozeStateGetter) { if (mTextAnimator == null || mTextAnimator.isRunning()) { // Skip charge animation if dozing animation is already playing. return; } Runnable startAnimPhase2 = () -> setTextStyle( dozeStateGetter.isDozing() ? mDozingWeight : mLockScreenWeight/* weight */, dozeStateGetter.isDozing() ? getDozingWeight() : getLockScreenWeight() /* weight */, -1, null, true /* animate */, CHARGE_ANIM_DURATION_PHASE_1, 0 /* delay */, null /* onAnimationEnd */); setTextStyle(dozeStateGetter.isDozing() ? mLockScreenWeight : mDozingWeight/* weight */, setTextStyle(dozeStateGetter.isDozing() ? getLockScreenWeight() : getDozingWeight()/* weight */, -1, null, true /* animate */, Loading @@ -218,7 +226,7 @@ public class AnimatableClockView extends TextView { } void animateDoze(boolean isDozing, boolean animate) { setTextStyle(isDozing ? mDozingWeight : mLockScreenWeight /* weight */, setTextStyle(isDozing ? getDozingWeight() : getLockScreenWeight() /* weight */, -1, isDozing ? mDozingColor : mLockScreenColor, animate, Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +0 −2 Original line number Diff line number Diff line Loading @@ -167,7 +167,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, mBypassController, mResources); mClockViewController.init(); Loading @@ -178,7 +177,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, mBypassController, mResources); mLargeClockViewController.init(); } Loading
packages/SystemUI/tests/src/com/android/systemui/keyguard/AnimatableClockControllerTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import com.android.settingslib.Utils; import com.android.systemui.SysuiTestCase; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.BatteryController; import org.junit.After; Loading Loading @@ -69,8 +68,6 @@ public class AnimatableClockControllerTest extends SysuiTestCase { @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private KeyguardBypassController mBypassController; @Mock private Resources mResources; private MockitoSession mStaticMockSession; Loading Loading @@ -99,7 +96,6 @@ public class AnimatableClockControllerTest extends SysuiTestCase { mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, mBypassController, mResources ); mAnimatableClockController.init(); Loading