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

Commit 914e1547 authored by Vaibhav Devmurari's avatar Vaibhav Devmurari Committed by Android (Google) Code Review
Browse files

Merge "Fix out of sync sysprop flag for backlight animation" into udc-qpr-dev

parents bdc83919 dc4babdc
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package com.android.server.input;

import android.os.SystemProperties;
import android.sysprop.InputProperties;

import java.util.Optional;

@@ -30,13 +30,13 @@ public final class InputFeatureFlagProvider {

    // To disable Keyboard backlight control via Framework, run:
    // 'adb shell setprop persist.input.keyboard_backlight_control.enabled false' (requires restart)
    private static final boolean KEYBOARD_BACKLIGHT_CONTROL_ENABLED = SystemProperties.getBoolean(
            "persist.input.keyboard.backlight_control.enabled", true);
    private static final boolean KEYBOARD_BACKLIGHT_CONTROL_ENABLED =
            InputProperties.enable_keyboard_backlight_control().orElse(true);

    // To disable Framework controlled keyboard backlight animation run:
    // adb shell setprop persist.input.keyboard_backlight_animation.enabled false (requires restart)
    private static final boolean KEYBOARD_BACKLIGHT_ANIMATION_ENABLED = SystemProperties.getBoolean(
            "persist.input.keyboard.keyboard_backlight_animation.enabled", false);
    // adb shell setprop persist.input.keyboard.backlight_animation.enabled false (requires restart)
    private static final boolean KEYBOARD_BACKLIGHT_ANIMATION_ENABLED =
            InputProperties.enable_keyboard_backlight_animation().orElse(false);

    private static Optional<Boolean> sKeyboardBacklightControlOverride = Optional.empty();
    private static Optional<Boolean> sKeyboardBacklightAnimationOverride = Optional.empty();
+2 −2
Original line number Diff line number Diff line
@@ -71,8 +71,8 @@ final class KeyboardBacklightController implements
    private static final int MSG_INTERACTIVE_STATE_CHANGED = 6;
    private static final int MAX_BRIGHTNESS = 255;
    private static final int NUM_BRIGHTNESS_CHANGE_STEPS = 10;
    private static final long TRANSITION_ANIMATION_DURATION_MILLIS = Duration.ofSeconds(
            1).toMillis();
    private static final long TRANSITION_ANIMATION_DURATION_MILLIS =
            Duration.ofSeconds(1).toMillis();

    private static final String UEVENT_KEYBOARD_BACKLIGHT_TAG = "kbd_backlight";