summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/pm
diff options
context:
space:
mode:
authorSaurabh Shah <saurshah@codeaurora.org>2015-05-07 14:10:23 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:27:54 -0600
commitd5282e055963a44df64265e4a592750e31bd9901 (patch)
treeb01acebb234f1ff3a1ab950418da6f7ec5728154 /core/java/android/content/pm
parent65093cc820e098e0ea1d1e64b4af0f3a58b80fc9 (diff)
downloadframeworks_base-d5282e055963a44df64265e4a592750e31bd9901.zip
frameworks_base-d5282e055963a44df64265e4a592750e31bd9901.tar.gz
frameworks_base-d5282e055963a44df64265e4a592750e31bd9901.tar.bz2
frameworks/base: Add support for low resolution rendering
This change is a combination of following changes: 1) frameworks/base: Handle custom activityTrigger flags * Take necessary action needed for each vendor specific flag set as part of activityTrigger. * If the HW acceleration has to be enabled for a particular activity, populate the neccessary activityInfo flags. * If the resolution needs to be overridden for SurfaceView of a specific app, set the overrideRes to 1 in applicationInfo. Author: Raj Kamal<rkamal@codeaurora.org> Change-Id: Ic835ec1f2ebcc016542ace4050bfef5fb32f20a0 2) frameworks/base: Add support to render certain apps at lower resolution. Add support to render certain apps at a resolution lower than the primary display device resolution. This would reduce the load on GPU and would help in saving power Author: Uday Kiran jandhyala<ukiran@codeaurora.org> Change-Id: I7004a145f3048aafbfb456451e08ea5ba229cfe9 This change also moves out custom functionality related to overriding resolution from SurfaceView, to a new class ResolutionOverride. Change-Id: Icabc17b9462a347c9c452cc53222ea7dcb6f336b
Diffstat (limited to 'core/java/android/content/pm')
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 6feb860..41f5233 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -465,6 +465,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public int privateFlags;
/**
+ * Boolean indicating whether the resolution of the SurfaceView associated
+ * with this appplication can be overriden.
+ * {@hide}
+ */
+ public int overrideRes = 0;
+
+ /**
* The required smallest screen width the application can run on. If 0,
* nothing has been specified. Comes from
* {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
@@ -754,6 +761,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
theme = orig.theme;
flags = orig.flags;
privateFlags = orig.privateFlags;
+ overrideRes = orig.overrideRes;
requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
largestWidthLimitDp = orig.largestWidthLimitDp;
@@ -807,6 +815,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
dest.writeInt(theme);
dest.writeInt(flags);
dest.writeInt(privateFlags);
+ dest.writeInt(overrideRes);
dest.writeInt(requiresSmallestWidthDp);
dest.writeInt(compatibleWidthLimitDp);
dest.writeInt(largestWidthLimitDp);
@@ -859,6 +868,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
theme = source.readInt();
flags = source.readInt();
privateFlags = source.readInt();
+ overrideRes = source.readInt();
requiresSmallestWidthDp = source.readInt();
compatibleWidthLimitDp = source.readInt();
largestWidthLimitDp = source.readInt();
@@ -997,6 +1007,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
/** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; }
/** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; }
/** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; }
+ /** {@hide} */ public void setOverrideRes(int overrideResolution) { overrideRes = overrideResolution; }
/** {@hide} */ public String getCodePath() { return scanSourceDir; }
/** {@hide} */ public String getBaseCodePath() { return sourceDir; }
@@ -1004,4 +1015,5 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
/** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; }
/** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; }
/** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; }
+ /** {@hide} */ public int canOverrideRes() { return overrideRes; }
}