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

Commit de165adb authored by Alex Chau's avatar Alex Chau Committed by Automerger Merge Worker
Browse files

Merge "Use DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED for getDisplays" into tm-dev am: 1965e130

parents b17912fd 1965e130
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.quickstep.util;

import android.content.Context;
import android.hardware.display.DisplayManager;
import android.view.Display;

import com.android.launcher3.util.window.WindowManagerProxy;
@@ -43,4 +44,10 @@ public class SystemWindowManagerProxy extends WindowManagerProxy {
    public int getRotation(Context context) {
        return context.getResources().getConfiguration().windowConfiguration.getRotation();
    }

    @Override
    protected Display[] getDisplays(Context context) {
        return context.getSystemService(DisplayManager.class).getDisplays(
                DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED);
    }
}
+8 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ public class WindowManagerProxy implements ResourceBasedOverride {
     */
    public ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> estimateInternalDisplayBounds(
            Context context) {
        Display[] displays = context.getSystemService(DisplayManager.class).getDisplays();
        Display[] displays = getDisplays(context);
        ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> result = new ArrayMap<>();
        for (Display display : displays) {
            if (isInternalDisplay(display)) {
@@ -355,4 +355,11 @@ public class WindowManagerProxy implements ResourceBasedOverride {
        }
        return d.getRotation();
    }

    /**
     * Returns all currently valid logical displays.
     */
    protected Display[] getDisplays(Context context) {
        return context.getSystemService(DisplayManager.class).getDisplays();
    }
}