Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41e1a37f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AOD/LS - Large clock adjustments"

parents db42b61d aa568bbd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/keyguard_status_area"
        android:paddingTop="20dp"
        android:visibility="gone">
        <com.android.keyguard.AnimatableClockView
            android:id="@+id/animatable_clock_view_large"
@@ -97,7 +96,7 @@
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:gravity="center_horizontal"
            android:textSize="200dp"
            android:textSize="@dimen/large_clock_text_size"
            android:letterSpacing="0.02"
            android:lineSpacingMultiplier=".8"
            android:includeFontPadding="false"
+20 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2021 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
  -->

<resources>
    <!-- Large clock maximum font size (dp is intentional, to prevent any further scaling) -->
    <dimen name="large_clock_text_size">170dp</dimen>
</resources>
+4 −1
Original line number Diff line number Diff line
@@ -17,4 +17,7 @@
<resources>
    <!-- Minimum margin between clock and top of screen or ambient indication -->
    <dimen name="keyguard_clock_top_margin">76dp</dimen>

    <!-- Large clock maximum font size (dp is intentional, to prevent any further scaling) -->
    <dimen name="large_clock_text_size">200dp</dimen>
</resources>
+7 −0
Original line number Diff line number Diff line
@@ -1041,6 +1041,13 @@
         burn-in on AOD. -->
    <dimen name="burn_in_prevention_offset_y">50dp</dimen>

    <!-- The maximum offset in either direction that elements are moved vertically to prevent
         burn-in on AOD. -->
    <dimen name="burn_in_prevention_offset_y_large_clock">42dp</dimen>

    <!-- Large clock maximum font size (dp is intentional, to prevent any further scaling) -->
    <dimen name="large_clock_text_size">150dp</dimen>

    <!-- The maximum offset in either direction that icons move to prevent burn-in on AOD. -->
    <dimen name="default_burn_in_prevention_offset">15dp</dimen>

+5 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import android.widget.TextClock;
import android.widget.TextView;

import com.android.internal.colorextraction.ColorExtractor;
import com.android.keyguard.dagger.KeyguardStatusViewScope;
@@ -147,6 +148,10 @@ public class KeyguardClockSwitch extends RelativeLayout {
        setTextSize(TypedValue.COMPLEX_UNIT_PX, mContext.getResources()
                .getDimensionPixelSize(R.dimen.widget_big_font_size));

        ((TextView) mNewLockscreenLargeClockFrame.getChildAt(0))
                .setTextSize(TypedValue.COMPLEX_UNIT_PX, mContext.getResources()
                        .getDimensionPixelSize(R.dimen.large_clock_text_size));

        mClockSwitchYAmount = mContext.getResources().getDimensionPixelSize(
                R.dimen.keyguard_clock_switch_y_shift);
    }
@@ -391,7 +396,6 @@ public class KeyguardClockSwitch extends RelativeLayout {
        if (hasVisibleNotifications == mHasVisibleNotifications) {
            return;
        }

        animateClockChange(!hasVisibleNotifications);

        mHasVisibleNotifications = hasVisibleNotifications;
Loading