summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/content/pm/PackageParser.java2
-rw-r--r--core/java/android/os/Build.java10
-rw-r--r--core/res/res/values/attrs_manifest.xml7
3 files changed, 15 insertions, 4 deletions
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index e927f6cd47fb..208869b6c2fd 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1573,7 +1573,7 @@ public class PackageParser {
boolean hardwareAccelerated = sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_hardwareAccelerated,
- false);
+ owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH);
if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_hasCode,
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 1b28aa2bcc6b..6c7c58dc85af 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -278,6 +278,16 @@ public class Build {
/**
* Current version under development.
+ *
+ * <p>Applications targeting this or a later release will get these
+ * new changes in behavior:</p>
+ * <ul>
+ * <li> 2d drawing hardware acceleration is now turned on by default.
+ * You can use
+ * {@link android.R.attr#hardwareAccelerated android:hardwareAccelerated}
+ * to turn it off if needed, although this is strongly discouraged since
+ * it will result in poor performance on larger screen devices.
+ * </ul>
*/
public static final int ICE_CREAM_SANDWICH = CUR_DEVELOPMENT;
}
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index f7974e93a836..c9ac57ad3cd0 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -235,12 +235,13 @@
<attr name="vmSafeMode" format="boolean" />
<!-- <p>Flag indicating whether the application's rendering should be hardware
- accelerated if possible. This flag is turned off by default, both for
- applications and activities.</p>
+ accelerated if possible. This flag is turned on by default for applications
+ that are targeting {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}
+ or later.</p>
<p>This flag can be set on the application and any activity declared
in the manifest. When enabled for the application, each activity is
automatically assumed to be hardware accelerated. This flag can be
- overriden in the activity tags, either turning it off (if on for the
+ overridden in the activity tags, either turning it off (if on for the
application) or on (if off for the application.)</p>
<p>When this flag is turned on for an activity (either directly or via
the application tag), every window created from the activity, including