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

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

Merge "Add dozeTimeTick method to ClockPlugin interface."

parents 25d07aad ffbe315d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -13,11 +13,11 @@
 */
package com.android.systemui.plugins;

import com.android.systemui.plugins.annotations.ProvidesInterface;

import android.graphics.Paint.Style;
import android.view.View;

import com.android.systemui.plugins.annotations.ProvidesInterface;

/**
 * This plugin is used to replace main clock in keyguard.
 */
@@ -44,4 +44,9 @@ public interface ClockPlugin extends Plugin {
     * @param color A color value.
     */
    void setTextColor(int color);

    /**
     * Notifies that time tick alarm from doze service fired.
     */
    default void dozeTimeTick() { }
}
+9 −0
Original line number Diff line number Diff line
@@ -142,6 +142,15 @@ public class KeyguardClockSwitch extends FrameLayout {
        mClockView.refresh();
    }

    /**
     * Notifies that time tick alarm from doze service fired.
     */
    public void dozeTimeTick() {
        if (mClockPlugin != null) {
            mClockPlugin.dozeTimeTick();
        }
    }

    /**
     * When plugin changes, set all kept parameters into newer plugin.
     */
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import com.android.internal.widget.ViewClippingUtil;
import com.android.systemui.Dependency;
import com.android.systemui.Interpolators;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.util.wakelock.KeepAwakeAnimationListener;

import com.google.android.collect.Sets;

@@ -276,6 +275,7 @@ public class KeyguardStatusView extends GridLayout implements
    public void dozeTimeTick() {
        refreshTime();
        mKeyguardSlice.refresh();
        mClockView.dozeTimeTick();
    }

    private void refreshTime() {