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

Commit fb59ff83 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

StatusBarStateController.StateListener docs

Test: make
Change-Id: I03f4fdfb274e571da15957a1879beb4e6b7b2a1c
parent fddeab36
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -298,7 +298,8 @@ public class StatusBarStateController {
    public interface StateListener {
    public interface StateListener {


        /**
        /**
         * Callback before the new state is applied, for those who need to preempt the change
         * Callback before the new state is applied, for those who need to preempt the change.
         *
         * @param oldState state before the change
         * @param oldState state before the change
         * @param newState new state to be applied in {@link #onStateChanged}
         * @param newState new state to be applied in {@link #onStateChanged}
         */
         */
@@ -314,21 +315,26 @@ public class StatusBarStateController {
        /**
        /**
         * Required callback. Get the new state and do what you will with it. Keep in mind that
         * Required callback. Get the new state and do what you will with it. Keep in mind that
         * other listeners are typically unordered and don't rely on your work being done before
         * other listeners are typically unordered and don't rely on your work being done before
         * other peers
         * other peers.
         *
         * Only called if the state is actually different.
         *
         *
         * Only called if the state is actually different
         * @param newState the new {@link StatusBarState}
         * @param newState the new {@link StatusBarState}
         */
         */
        public void onStateChanged(int newState);
        public void onStateChanged(int newState);


        /**
        /**
         * Callback to be notified when Dozing changes. Dozing is stored separately from state.
         * Callback to be notified when Dozing changes. Dozing is stored separately from state.
         *
         * @param isDozing {@code true} if dozing according to {@link StatusBar}
         * @param isDozing {@code true} if dozing according to {@link StatusBar}
         */
         */
        public default void onDozingChanged(boolean isDozing) {}
        public default void onDozingChanged(boolean isDozing) {}


        /**
        /**
         * Callback to be notified when the doze amount changes. Useful for animations.
         * Callback to be notified when the doze amount changes. Useful for animations.
         * Note: this will be called for each animation frame. Please be careful to avoid
         * performance regressions.
         *
         * @param linear A number from 0 to 1, where 1 means that the device is dozing.
         * @param linear A number from 0 to 1, where 1 means that the device is dozing.
         * @param eased Same as {@code linear} but transformed by an interpolator.
         * @param eased Same as {@code linear} but transformed by an interpolator.
         */
         */