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

Commit 9ecb73c7 authored by Alan Viverette's avatar Alan Viverette
Browse files

Don't force hardware acceleration for services on low-end GFX

BUG: 18732678
Change-Id: I136135a91296de3e7d4c089b61019a5395de4a5b
parent 4ae0d904
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -215,12 +215,12 @@ public final class WindowManagerGlobal {
        final WindowManager.LayoutParams wparams = (WindowManager.LayoutParams) params;
        if (parentWindow != null) {
            parentWindow.adjustLayoutParamsForSubWindow(wparams);
        } else {
        } else if (ActivityManager.isHighEndGfx()) {
            // If there's no parent and we're running on L or above (or in the
            // system context), assume we want hardware acceleration.
            final Context context = view.getContext();
            if (context != null
                    && context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) {
            if (context != null && context.getApplicationInfo().targetSdkVersion
                    >= Build.VERSION_CODES.LOLLIPOP) {
                wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            }
        }