Loading packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml +0 −10 Original line number Diff line number Diff line Loading @@ -50,16 +50,6 @@ android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:layout_marginBottom="@dimen/bottom_text_spacing_digital" /> <com.android.systemui.ChargingView android:id="@+id/battery_doze" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/clock_view" android:layout_alignBottom="@id/clock_view" android:layout_toEndOf="@id/clock_view" android:visibility="invisible" android:src="@drawable/ic_aod_charging_24dp" android:contentDescription="@string/accessibility_ambient_display_charging" /> <View android:id="@+id/clock_separator" android:layout_width="16dp" Loading packages/SystemUI/res/layout/keyguard_bottom_area.xml +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ android:gravity="center_horizontal" android:textStyle="italic" android:textColor="?attr/wallpaperTextColorSecondary" android:textSize="16sp" android:textAppearance="?android:attr/textAppearanceSmall" android:visibility="gone" /> Loading @@ -50,6 +51,7 @@ android:gravity="center_horizontal" android:textStyle="italic" android:textColor="?attr/wallpaperTextColorSecondary" android:textSize="16sp" android:textAppearance="?android:attr/textAppearanceSmall" android:accessibilityLiveRegion="polite" /> Loading packages/SystemUI/res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,7 @@ <dimen name="keyguard_affordance_icon_width">24dp</dimen> <dimen name="keyguard_indication_margin_bottom">65dp</dimen> <dimen name="keyguard_indication_margin_bottom_ambient">30dp</dimen> <!-- The text size for battery level --> <dimen name="battery_level_text_size">12sp</dimen> Loading packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +2 −12 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.keyguard; import android.app.ActivityManager; import android.app.AlarmManager; import android.content.Context; import android.content.res.Configuration; Loading @@ -40,7 +39,6 @@ import android.widget.TextClock; import android.widget.TextView; import com.android.internal.widget.LockPatternUtils; import com.android.systemui.ChargingView; import com.google.android.collect.Sets; Loading @@ -60,7 +58,6 @@ public class KeyguardStatusView extends GridLayout { private View mClockSeparator; private TextView mOwnerInfo; private ViewGroup mClockContainer; private ChargingView mBatteryDoze; private KeyguardSliceView mKeyguardSlice; private Runnable mPendingMarqueeStart; private Handler mHandler; Loading Loading @@ -155,11 +152,9 @@ public class KeyguardStatusView extends GridLayout { mClockView.setAccessibilityDelegate(new KeyguardClockAccessibilityDelegate(mContext)); } mOwnerInfo = findViewById(R.id.owner_info); mBatteryDoze = findViewById(R.id.battery_doze); mKeyguardSlice = findViewById(R.id.keyguard_status_area); mClockSeparator = findViewById(R.id.clock_separator); mVisibleInDoze = Sets.newArraySet(mBatteryDoze, mClockView, mKeyguardSlice, mClockSeparator); mVisibleInDoze = Sets.newArraySet(mClockView, mKeyguardSlice, mClockSeparator); mTextColor = mClockView.getCurrentTextColor(); mKeyguardSlice.setListener(this::onSliceContentChanged); Loading @@ -184,10 +179,6 @@ public class KeyguardStatusView extends GridLayout { mClockView.setTranslationY(translation); mClockView.setScaleX(clockScale); mClockView.setScaleY(clockScale); final float batteryTranslation = -(mClockView.getWidth() - (mClockView.getWidth() * clockScale)) / 2; mBatteryDoze.setTranslationX(batteryTranslation); mBatteryDoze.setTranslationY(translation); mClockSeparator.setVisibility(hasHeader ? VISIBLE : GONE); } Loading Loading @@ -310,7 +301,7 @@ public class KeyguardStatusView extends GridLayout { } } public void setDark(float darkAmount) { public void setDarkAmount(float darkAmount) { if (mDarkAmount == darkAmount) { return; } Loading @@ -331,7 +322,6 @@ public class KeyguardStatusView extends GridLayout { final int blendedTextColor = ColorUtils.blendARGB(mTextColor, Color.WHITE, darkAmount); updateDozeVisibleViews(); mBatteryDoze.setDark(dark); mKeyguardSlice.setDark(darkAmount); mClockView.setTextColor(blendedTextColor); mClockSeparator.setBackgroundColor(blendedTextColor); Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −3 Original line number Diff line number Diff line Loading @@ -1613,11 +1613,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private static boolean isBatteryUpdateInteresting(BatteryStatus old, BatteryStatus current) { private boolean isBatteryUpdateInteresting(BatteryStatus old, BatteryStatus current) { final boolean nowPluggedIn = current.isPluggedIn(); final boolean wasPluggedIn = old.isPluggedIn(); final boolean stateChangedWhilePluggedIn = wasPluggedIn == true && nowPluggedIn == true final boolean stateChangedWhilePluggedIn = wasPluggedIn && nowPluggedIn && (old.status != current.status); // change in plug state is always interesting Loading @@ -1630,6 +1629,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { return true; } // change in battery level while keyguard visible if (mKeyguardIsVisible && old.level != current.level) { return true; } // change where battery needs charging if (!nowPluggedIn && current.isBatteryLow() && current.level != old.level) { return true; Loading Loading
packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml +0 −10 Original line number Diff line number Diff line Loading @@ -50,16 +50,6 @@ android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" android:layout_marginBottom="@dimen/bottom_text_spacing_digital" /> <com.android.systemui.ChargingView android:id="@+id/battery_doze" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@id/clock_view" android:layout_alignBottom="@id/clock_view" android:layout_toEndOf="@id/clock_view" android:visibility="invisible" android:src="@drawable/ic_aod_charging_24dp" android:contentDescription="@string/accessibility_ambient_display_charging" /> <View android:id="@+id/clock_separator" android:layout_width="16dp" Loading
packages/SystemUI/res/layout/keyguard_bottom_area.xml +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ android:gravity="center_horizontal" android:textStyle="italic" android:textColor="?attr/wallpaperTextColorSecondary" android:textSize="16sp" android:textAppearance="?android:attr/textAppearanceSmall" android:visibility="gone" /> Loading @@ -50,6 +51,7 @@ android:gravity="center_horizontal" android:textStyle="italic" android:textColor="?attr/wallpaperTextColorSecondary" android:textSize="16sp" android:textAppearance="?android:attr/textAppearanceSmall" android:accessibilityLiveRegion="polite" /> Loading
packages/SystemUI/res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,7 @@ <dimen name="keyguard_affordance_icon_width">24dp</dimen> <dimen name="keyguard_indication_margin_bottom">65dp</dimen> <dimen name="keyguard_indication_margin_bottom_ambient">30dp</dimen> <!-- The text size for battery level --> <dimen name="battery_level_text_size">12sp</dimen> Loading
packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +2 −12 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.keyguard; import android.app.ActivityManager; import android.app.AlarmManager; import android.content.Context; import android.content.res.Configuration; Loading @@ -40,7 +39,6 @@ import android.widget.TextClock; import android.widget.TextView; import com.android.internal.widget.LockPatternUtils; import com.android.systemui.ChargingView; import com.google.android.collect.Sets; Loading @@ -60,7 +58,6 @@ public class KeyguardStatusView extends GridLayout { private View mClockSeparator; private TextView mOwnerInfo; private ViewGroup mClockContainer; private ChargingView mBatteryDoze; private KeyguardSliceView mKeyguardSlice; private Runnable mPendingMarqueeStart; private Handler mHandler; Loading Loading @@ -155,11 +152,9 @@ public class KeyguardStatusView extends GridLayout { mClockView.setAccessibilityDelegate(new KeyguardClockAccessibilityDelegate(mContext)); } mOwnerInfo = findViewById(R.id.owner_info); mBatteryDoze = findViewById(R.id.battery_doze); mKeyguardSlice = findViewById(R.id.keyguard_status_area); mClockSeparator = findViewById(R.id.clock_separator); mVisibleInDoze = Sets.newArraySet(mBatteryDoze, mClockView, mKeyguardSlice, mClockSeparator); mVisibleInDoze = Sets.newArraySet(mClockView, mKeyguardSlice, mClockSeparator); mTextColor = mClockView.getCurrentTextColor(); mKeyguardSlice.setListener(this::onSliceContentChanged); Loading @@ -184,10 +179,6 @@ public class KeyguardStatusView extends GridLayout { mClockView.setTranslationY(translation); mClockView.setScaleX(clockScale); mClockView.setScaleY(clockScale); final float batteryTranslation = -(mClockView.getWidth() - (mClockView.getWidth() * clockScale)) / 2; mBatteryDoze.setTranslationX(batteryTranslation); mBatteryDoze.setTranslationY(translation); mClockSeparator.setVisibility(hasHeader ? VISIBLE : GONE); } Loading Loading @@ -310,7 +301,7 @@ public class KeyguardStatusView extends GridLayout { } } public void setDark(float darkAmount) { public void setDarkAmount(float darkAmount) { if (mDarkAmount == darkAmount) { return; } Loading @@ -331,7 +322,6 @@ public class KeyguardStatusView extends GridLayout { final int blendedTextColor = ColorUtils.blendARGB(mTextColor, Color.WHITE, darkAmount); updateDozeVisibleViews(); mBatteryDoze.setDark(dark); mKeyguardSlice.setDark(darkAmount); mClockView.setTextColor(blendedTextColor); mClockSeparator.setBackgroundColor(blendedTextColor); Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −3 Original line number Diff line number Diff line Loading @@ -1613,11 +1613,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private static boolean isBatteryUpdateInteresting(BatteryStatus old, BatteryStatus current) { private boolean isBatteryUpdateInteresting(BatteryStatus old, BatteryStatus current) { final boolean nowPluggedIn = current.isPluggedIn(); final boolean wasPluggedIn = old.isPluggedIn(); final boolean stateChangedWhilePluggedIn = wasPluggedIn == true && nowPluggedIn == true final boolean stateChangedWhilePluggedIn = wasPluggedIn && nowPluggedIn && (old.status != current.status); // change in plug state is always interesting Loading @@ -1630,6 +1629,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { return true; } // change in battery level while keyguard visible if (mKeyguardIsVisible && old.level != current.level) { return true; } // change where battery needs charging if (!nowPluggedIn && current.isBatteryLow() && current.level != old.level) { return true; Loading