diff options
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 9 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 1 | ||||
| -rw-r--r-- | core/java/android/view/WindowManagerGlobal.java | 10 |
4 files changed, 5 insertions, 16 deletions
diff --git a/api/current.txt b/api/current.txt index 988722d..9f54b85 100644 --- a/api/current.txt +++ b/api/current.txt @@ -8673,7 +8673,6 @@ package android.content.pm { field public int descriptionRes; field public boolean enabled; field public int flags; - field public boolean hardwareAccelerated; field public int largestWidthLimitDp; field public java.lang.String manageSpaceActivityName; field public java.lang.String nativeLibraryDir; diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 5b7896a..e1a2aa9 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -598,11 +598,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED; - /** - * True when the application's rendering should be hardware accelerated. - */ - public boolean hardwareAccelerated; - public void dump(Printer pw, String prefix) { super.dumpFront(pw, prefix); if (className != null) { @@ -642,7 +637,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } pw.println(prefix + "enabled=" + enabled + " targetSdkVersion=" + targetSdkVersion + " versionCode=" + versionCode); - pw.println(prefix + "hardwareAccelerated=" + hardwareAccelerated); if (manageSpaceActivityName != null) { pw.println(prefix + "manageSpaceActivityName="+manageSpaceActivityName); } @@ -728,7 +722,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { descriptionRes = orig.descriptionRes; uiOptions = orig.uiOptions; backupAgentName = orig.backupAgentName; - hardwareAccelerated = orig.hardwareAccelerated; } @@ -780,7 +773,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeString(backupAgentName); dest.writeInt(descriptionRes); dest.writeInt(uiOptions); - dest.writeInt(hardwareAccelerated ? 1 : 0); } public static final Parcelable.Creator<ApplicationInfo> CREATOR @@ -831,7 +823,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { backupAgentName = source.readString(); descriptionRes = source.readInt(); uiOptions = source.readInt(); - hardwareAccelerated = source.readInt() != 0; } /** diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index a245ba5..1140756 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -2519,7 +2519,6 @@ public class PackageParser { owner.baseHardwareAccelerated = sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_hardwareAccelerated, owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH); - ai.hardwareAccelerated = owner.baseHardwareAccelerated; if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_hasCode, diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index 57558ff..1cebe3f 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 there's no parent, then hardware acceleration for this view is - // set from the application's hardware acceleration setting. + } 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().hardwareAccelerated) { + if (context != null && context.getApplicationInfo().targetSdkVersion + >= Build.VERSION_CODES.LOLLIPOP) { wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; } } |
