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

Commit cc50b38f authored by Vaibhav Devmurari's avatar Vaibhav Devmurari Committed by Automerger Merge Worker
Browse files

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

Merge "Fix out of sync sysprop flag for backlight animation" into udc-qpr-dev am: 914e1547 am: c9f79ed0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23051398



Change-Id: Icf83c92f1383fd06c397e38bc4d8328953aaa378
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1b836740 c9f79ed0
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";