diff options
Diffstat (limited to 'core/java/android/view/WindowManagerGlobal.java')
| -rw-r--r-- | core/java/android/view/WindowManagerGlobal.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index 1cebe3f..57558ff 100644 --- a/core/java/android/view/WindowManagerGlobal.java +++ b/core/java/android/view/WindowManagerGlobal.java @@ -249,12 +249,12 @@ public final class WindowManagerGlobal { final WindowManager.LayoutParams wparams = (WindowManager.LayoutParams) params; if (parentWindow != null) { parentWindow.adjustLayoutParamsForSubWindow(wparams); - } 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. + } else { + // If there's no parent, then hardware acceleration for this view is + // set from the application's hardware acceleration setting. final Context context = view.getContext(); - if (context != null && context.getApplicationInfo().targetSdkVersion - >= Build.VERSION_CODES.LOLLIPOP) { + if (context != null + && context.getApplicationInfo().hardwareAccelerated) { wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; } } |
