Loading packages/SystemUI/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ filegroup { "tests/src/**/systemui/media/dialog/MediaOutputBroadcastDialogTest.java", "tests/src/**/systemui/media/dialog/MediaOutputDialogTest.java", "tests/src/**/systemui/settings/brightness/BrightnessDialogTest.kt", "tests/src/**/systemui/shared/clocks/view/SimpleDigitalClockTextViewTest.kt", "tests/src/**/systemui/shared/clocks/view/DigitalClockTextViewTest.kt", "tests/src/**/systemui/statusbar/policy/SecurityControllerTest.java", "tests/src/**/systemui/lifecycle/SysUiViewModelTest.kt", "tests/src/**/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt", Loading packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/ClockContext.kt 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.android.systemui.customization.clocks import android.content.Context import android.content.res.Resources import android.os.Vibrator import com.android.systemui.log.core.MessageBuffer import com.android.systemui.plugins.clocks.ClockSettings data class ClockContext( val context: Context, val resources: Resources, val settings: ClockSettings, val typefaceCache: TypefaceCache, val messageBuffer: MessageBuffer, val vibrator: Vibrator?, val timeKeeper: TimeKeeper, ) packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DigitTranslateAnimator.kt→packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/DigitTranslateAnimator.kt +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.systemui.shared.clocks package com.android.systemui.customization.clocks import android.animation.Animator import android.animation.AnimatorListenerAdapter Loading Loading @@ -59,7 +59,7 @@ class DigitTranslateAnimator(private val updateCallback: (VPointF) -> Unit) { bounceAnimator.duration = duration interpolator?.let { bounceAnimator.interpolator = it } if (onAnimationEnd != null) { val listener = bounceAnimator.addListener( object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator) { onAnimationEnd.run() Loading @@ -70,7 +70,7 @@ class DigitTranslateAnimator(private val updateCallback: (VPointF) -> Unit) { bounceAnimator.removeListener(this) } } bounceAnimator.addListener(listener) ) } bounceAnimator.start() } else { Loading packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/DigitalTimespec.kt 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.customization.clocks import com.android.systemui.plugins.clocks.ClockViewIds enum class DigitalTimespec(private val hourViewId: Int, private val minuteViewId: Int) { TIME_FULL_FORMAT(ClockViewIds.TIME_FULL_FORMAT, ClockViewIds.TIME_FULL_FORMAT), DIGIT_PAIR(ClockViewIds.HOUR_DIGIT_PAIR, ClockViewIds.MINUTE_DIGIT_PAIR), FIRST_DIGIT(ClockViewIds.HOUR_FIRST_DIGIT, ClockViewIds.MINUTE_FIRST_DIGIT), SECOND_DIGIT(ClockViewIds.HOUR_SECOND_DIGIT, ClockViewIds.MINUTE_SECOND_DIGIT); fun getViewId(isHour: Boolean): Int = if (isHour) hourViewId else minuteViewId } packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/FontTextStyle.kt 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.customization.clocks import android.view.animation.Interpolator import com.android.systemui.animation.TextAnimator data class FontTextStyle( val lineHeight: Float? = null, val fontSizeScale: Float? = null, val transitionDuration: Long = TextAnimator.DEFAULT_ANIMATION_DURATION, val transitionInterpolator: Interpolator? = null, ) Loading
packages/SystemUI/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ filegroup { "tests/src/**/systemui/media/dialog/MediaOutputBroadcastDialogTest.java", "tests/src/**/systemui/media/dialog/MediaOutputDialogTest.java", "tests/src/**/systemui/settings/brightness/BrightnessDialogTest.kt", "tests/src/**/systemui/shared/clocks/view/SimpleDigitalClockTextViewTest.kt", "tests/src/**/systemui/shared/clocks/view/DigitalClockTextViewTest.kt", "tests/src/**/systemui/statusbar/policy/SecurityControllerTest.java", "tests/src/**/systemui/lifecycle/SysUiViewModelTest.kt", "tests/src/**/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt", Loading
packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/ClockContext.kt 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.android.systemui.customization.clocks import android.content.Context import android.content.res.Resources import android.os.Vibrator import com.android.systemui.log.core.MessageBuffer import com.android.systemui.plugins.clocks.ClockSettings data class ClockContext( val context: Context, val resources: Resources, val settings: ClockSettings, val typefaceCache: TypefaceCache, val messageBuffer: MessageBuffer, val vibrator: Vibrator?, val timeKeeper: TimeKeeper, )
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DigitTranslateAnimator.kt→packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/DigitTranslateAnimator.kt +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.systemui.shared.clocks package com.android.systemui.customization.clocks import android.animation.Animator import android.animation.AnimatorListenerAdapter Loading Loading @@ -59,7 +59,7 @@ class DigitTranslateAnimator(private val updateCallback: (VPointF) -> Unit) { bounceAnimator.duration = duration interpolator?.let { bounceAnimator.interpolator = it } if (onAnimationEnd != null) { val listener = bounceAnimator.addListener( object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator) { onAnimationEnd.run() Loading @@ -70,7 +70,7 @@ class DigitTranslateAnimator(private val updateCallback: (VPointF) -> Unit) { bounceAnimator.removeListener(this) } } bounceAnimator.addListener(listener) ) } bounceAnimator.start() } else { Loading
packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/DigitalTimespec.kt 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.customization.clocks import com.android.systemui.plugins.clocks.ClockViewIds enum class DigitalTimespec(private val hourViewId: Int, private val minuteViewId: Int) { TIME_FULL_FORMAT(ClockViewIds.TIME_FULL_FORMAT, ClockViewIds.TIME_FULL_FORMAT), DIGIT_PAIR(ClockViewIds.HOUR_DIGIT_PAIR, ClockViewIds.MINUTE_DIGIT_PAIR), FIRST_DIGIT(ClockViewIds.HOUR_FIRST_DIGIT, ClockViewIds.MINUTE_FIRST_DIGIT), SECOND_DIGIT(ClockViewIds.HOUR_SECOND_DIGIT, ClockViewIds.MINUTE_SECOND_DIGIT); fun getViewId(isHour: Boolean): Int = if (isHour) hourViewId else minuteViewId }
packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/FontTextStyle.kt 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.customization.clocks import android.view.animation.Interpolator import com.android.systemui.animation.TextAnimator data class FontTextStyle( val lineHeight: Float? = null, val fontSizeScale: Float? = null, val transitionDuration: Long = TextAnimator.DEFAULT_ANIMATION_DURATION, val transitionInterpolator: Interpolator? = null, )