am 60bf94e3: Merge "Move ApplicationInfo hardware acceleration to public flags" into mnc-dev
* commit '60bf94e3bef8da0adb4f42043770cef7a608d07d': Move ApplicationInfo hardware acceleration to public flags
This commit is contained in:
@@ -8907,6 +8907,7 @@ package android.content.pm {
|
||||
field public static final int FLAG_EXTRACT_NATIVE_LIBS = 268435456; // 0x10000000
|
||||
field public static final int FLAG_FACTORY_TEST = 16; // 0x10
|
||||
field public static final int FLAG_FULL_BACKUP_ONLY = 67108864; // 0x4000000
|
||||
field public static final int FLAG_HARDWARE_ACCELERATED = 536870912; // 0x20000000
|
||||
field public static final int FLAG_HAS_CODE = 4; // 0x4
|
||||
field public static final int FLAG_INSTALLED = 8388608; // 0x800000
|
||||
field public static final int FLAG_IS_DATA_ONLY = 16777216; // 0x1000000
|
||||
@@ -8936,7 +8937,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;
|
||||
|
||||
@@ -9136,6 +9136,7 @@ package android.content.pm {
|
||||
field public static final int FLAG_EXTRACT_NATIVE_LIBS = 268435456; // 0x10000000
|
||||
field public static final int FLAG_FACTORY_TEST = 16; // 0x10
|
||||
field public static final int FLAG_FULL_BACKUP_ONLY = 67108864; // 0x4000000
|
||||
field public static final int FLAG_HARDWARE_ACCELERATED = 536870912; // 0x20000000
|
||||
field public static final int FLAG_HAS_CODE = 4; // 0x4
|
||||
field public static final int FLAG_INSTALLED = 8388608; // 0x800000
|
||||
field public static final int FLAG_IS_DATA_ONLY = 16777216; // 0x1000000
|
||||
@@ -9165,7 +9166,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;
|
||||
|
||||
@@ -372,6 +372,12 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
||||
*/
|
||||
public static final int FLAG_EXTRACT_NATIVE_LIBS = 1<<28;
|
||||
|
||||
/**
|
||||
* Value for {@link #flags}: {@code true} when the application's rendering
|
||||
* should be hardware accelerated.
|
||||
*/
|
||||
public static final int FLAG_HARDWARE_ACCELERATED = 1<<29;
|
||||
|
||||
/**
|
||||
* Value for {@link #flags}: true if code from this application will need to be
|
||||
* loaded into other applications' processes. On devices that support multiple
|
||||
@@ -648,11 +654,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) {
|
||||
@@ -692,7 +693,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);
|
||||
}
|
||||
@@ -784,7 +784,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
||||
descriptionRes = orig.descriptionRes;
|
||||
uiOptions = orig.uiOptions;
|
||||
backupAgentName = orig.backupAgentName;
|
||||
hardwareAccelerated = orig.hardwareAccelerated;
|
||||
fullBackupContent = orig.fullBackupContent;
|
||||
}
|
||||
|
||||
@@ -838,7 +837,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
||||
dest.writeString(backupAgentName);
|
||||
dest.writeInt(descriptionRes);
|
||||
dest.writeInt(uiOptions);
|
||||
dest.writeInt(hardwareAccelerated ? 1 : 0);
|
||||
dest.writeInt(fullBackupContent);
|
||||
}
|
||||
|
||||
@@ -891,7 +889,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
||||
backupAgentName = source.readString();
|
||||
descriptionRes = source.readInt();
|
||||
uiOptions = source.readInt();
|
||||
hardwareAccelerated = source.readInt() != 0;
|
||||
fullBackupContent = source.readInt();
|
||||
}
|
||||
|
||||
|
||||
@@ -2530,7 +2530,9 @@ 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 (owner.baseHardwareAccelerated) {
|
||||
ai.flags |= ApplicationInfo.FLAG_HARDWARE_ACCELERATED;
|
||||
}
|
||||
|
||||
if (sa.getBoolean(
|
||||
com.android.internal.R.styleable.AndroidManifestApplication_hasCode,
|
||||
|
||||
@@ -20,6 +20,7 @@ import android.animation.ValueAnimator;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.ComponentCallbacks2;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
@@ -247,7 +248,8 @@ public final class WindowManagerGlobal {
|
||||
// set from the application's hardware acceleration setting.
|
||||
final Context context = view.getContext();
|
||||
if (context != null
|
||||
&& context.getApplicationInfo().hardwareAccelerated) {
|
||||
&& (context.getApplicationInfo().flags
|
||||
& ApplicationInfo.FLAG_HARDWARE_ACCELERATED) != 0) {
|
||||
wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user