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

Commit ce1ca2a1 authored by Evan Laird's avatar Evan Laird Committed by Android (Google) Code Review
Browse files

Merge "Sysui changes to support vibrate icon setting" into tm-dev

parents dae36ce9 225052be
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -9970,6 +9970,13 @@ public final class Settings {
        public static final String LOCKSCREEN_USE_DOUBLE_LINE_CLOCK =
                "lockscreen_use_double_line_clock";
        /**
         * Whether to show the vibrate icon in the Status Bar (default off)
         *
         * @hide
         */
        public static final String STATUS_BAR_SHOW_VIBRATE_ICON = "status_bar_show_vibrate_icon";
        /**
         * Specifies whether the web action API is enabled.
         *
+1 −0
Original line number Diff line number Diff line
@@ -197,5 +197,6 @@ public class SecureSettings {
        Settings.Secure.LOCKSCREEN_SHOW_WALLET,
        Settings.Secure.LOCK_SCREEN_SHOW_QR_CODE_SCANNER,
        Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK,
        Settings.Secure.STATUS_BAR_SHOW_VIBRATE_ICON
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.LOCKSCREEN_SHOW_WALLET, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.LOCK_SCREEN_SHOW_QR_CODE_SCANNER, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.STATUS_BAR_SHOW_VIBRATE_ICON, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.DOZE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.DOZE_ALWAYS_ON, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.DOZE_PICK_UP_GESTURE, BOOLEAN_VALIDATOR);
+12 −4
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import com.android.systemui.statusbar.StatusIconDisplayable;
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.CallIndicatorIconState;
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.WifiIconState;
import com.android.systemui.util.Assert;

import java.util.ArrayList;
import java.util.List;
@@ -66,6 +67,8 @@ public interface StatusBarIconController {
    void addIconGroup(IconManager iconManager);
    /** */
    void removeIconGroup(IconManager iconManager);
    /** Refresh the state of an IconManager by recreating the views */
    void refreshIconGroup(IconManager iconManager);
    /** */
    void setExternalIcon(String slot);
    /** */
@@ -243,6 +246,7 @@ public interface StatusBarIconController {
        protected final int mIconSize;
        // Whether or not these icons show up in dumpsys
        protected boolean mShouldLog = false;
        private StatusBarIconController mController;

        // Enables SystemUI demo mode to take effect in this group
        protected boolean mDemoable = true;
@@ -267,13 +271,17 @@ public interface StatusBarIconController {
            mDemoable = demoable;
        }

        public void setBlockList(@Nullable List<String> blockList) {
            mBlockList.clear();
            if (blockList == null || blockList.isEmpty()) {
                return;
        void setController(StatusBarIconController controller) {
            mController = controller;
        }

        public void setBlockList(@Nullable List<String> blockList) {
            Assert.isMainThread();
            mBlockList.clear();
            mBlockList.addAll(blockList);
            if (mController != null) {
                mController.refreshIconGroup(this);
            }
        }

        public void setShouldLog(boolean should) {
+7 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
            }
        }

        group.setController(this);
        mIconGroups.add(group);
        List<Slot> allSlots = getSlots();
        for (int i = 0; i < allSlots.size(); i++) {
@@ -115,6 +116,12 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
        }
    }

    @Override
    public void refreshIconGroup(IconManager iconManager) {
        removeIconGroup(iconManager);
        addIconGroup(iconManager);
    }

    private void refreshIconGroups() {
        for (int i = mIconGroups.size() - 1; i >= 0; --i) {
            IconManager group = mIconGroups.get(i);
Loading