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

Commit c3c3e96b authored by Winson Chung's avatar Winson Chung
Browse files

Adding windowing flags to WMShell

- Also only provide the system perf hinter if the VRR flag is enabled

Bug: 300019131
Test: Builds
Change-Id: I2938b85ca7285d986fe6bbfe134a0d05d38378c9
parent f0d16342
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ android_library {
        "kotlinx-coroutines-core",
        "iconloader_base",
        "com_android_wm_shell_flags_lib",
        "com.android.window.flags.window-aconfig-java",
        "WindowManager-Shell-proto",
        "dagger2",
        "jsr330",
+5 −2
Original line number Diff line number Diff line
@@ -324,13 +324,16 @@ public abstract class WMShellBaseModule {

    @WMSingleton
    @Provides
    static SystemPerformanceHinter provideSystemPerformanceHinter(Context context,
    static Optional<SystemPerformanceHinter> provideSystemPerformanceHinter(Context context,
            ShellInit shellInit,
            ShellCommandHandler shellCommandHandler,
            RootTaskDisplayAreaOrganizer rootTdaOrganizer) {
        if (!com.android.window.flags.Flags.explicitRefreshRateHints()) {
            return Optional.empty();
        }
        final PerfHintController perfHintController =
                new PerfHintController(context, shellInit, shellCommandHandler, rootTdaOrganizer);
        return perfHintController.getHinter();
        return Optional.of(perfHintController.getHinter());
    }

    //