Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07459a36 authored by Ed Heyl's avatar Ed Heyl Committed by Android (Google) Code Review
Browse files

Merge "Fix build: Revert "Enable/disable hardware rendering on windows by application tag""

parents 532c8e9b 1445469b
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -8673,7 +8673,6 @@ package android.content.pm {
    field public int descriptionRes;
    field public int descriptionRes;
    field public boolean enabled;
    field public boolean enabled;
    field public int flags;
    field public int flags;
    field public boolean hardwareAccelerated;
    field public int largestWidthLimitDp;
    field public int largestWidthLimitDp;
    field public java.lang.String manageSpaceActivityName;
    field public java.lang.String manageSpaceActivityName;
    field public java.lang.String nativeLibraryDir;
    field public java.lang.String nativeLibraryDir;
+0 −9
Original line number Original line Diff line number Diff line
@@ -598,11 +598,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
     */
     */
    public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED;
    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) {
    public void dump(Printer pw, String prefix) {
        super.dumpFront(pw, prefix);
        super.dumpFront(pw, prefix);
        if (className != null) {
        if (className != null) {
@@ -642,7 +637,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        }
        }
        pw.println(prefix + "enabled=" + enabled + " targetSdkVersion=" + targetSdkVersion
        pw.println(prefix + "enabled=" + enabled + " targetSdkVersion=" + targetSdkVersion
                + " versionCode=" + versionCode);
                + " versionCode=" + versionCode);
        pw.println(prefix + "hardwareAccelerated=" + hardwareAccelerated);
        if (manageSpaceActivityName != null) {
        if (manageSpaceActivityName != null) {
            pw.println(prefix + "manageSpaceActivityName="+manageSpaceActivityName);
            pw.println(prefix + "manageSpaceActivityName="+manageSpaceActivityName);
        }
        }
@@ -728,7 +722,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        descriptionRes = orig.descriptionRes;
        descriptionRes = orig.descriptionRes;
        uiOptions = orig.uiOptions;
        uiOptions = orig.uiOptions;
        backupAgentName = orig.backupAgentName;
        backupAgentName = orig.backupAgentName;
        hardwareAccelerated = orig.hardwareAccelerated;
    }
    }




@@ -780,7 +773,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        dest.writeString(backupAgentName);
        dest.writeString(backupAgentName);
        dest.writeInt(descriptionRes);
        dest.writeInt(descriptionRes);
        dest.writeInt(uiOptions);
        dest.writeInt(uiOptions);
        dest.writeInt(hardwareAccelerated ? 1 : 0);
    }
    }


    public static final Parcelable.Creator<ApplicationInfo> CREATOR
    public static final Parcelable.Creator<ApplicationInfo> CREATOR
@@ -831,7 +823,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        backupAgentName = source.readString();
        backupAgentName = source.readString();
        descriptionRes = source.readInt();
        descriptionRes = source.readInt();
        uiOptions = source.readInt();
        uiOptions = source.readInt();
        hardwareAccelerated = source.readInt() != 0;
    }
    }


    /**
    /**
+0 −1
Original line number Original line Diff line number Diff line
@@ -2519,7 +2519,6 @@ public class PackageParser {
        owner.baseHardwareAccelerated = sa.getBoolean(
        owner.baseHardwareAccelerated = sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestApplication_hardwareAccelerated,
                com.android.internal.R.styleable.AndroidManifestApplication_hardwareAccelerated,
                owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH);
                owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH);
        ai.hardwareAccelerated = owner.baseHardwareAccelerated;


        if (sa.getBoolean(
        if (sa.getBoolean(
                com.android.internal.R.styleable.AndroidManifestApplication_hasCode,
                com.android.internal.R.styleable.AndroidManifestApplication_hasCode,
+5 −5
Original line number Original line Diff line number Diff line
@@ -249,12 +249,12 @@ public final class WindowManagerGlobal {
        final WindowManager.LayoutParams wparams = (WindowManager.LayoutParams) params;
        final WindowManager.LayoutParams wparams = (WindowManager.LayoutParams) params;
        if (parentWindow != null) {
        if (parentWindow != null) {
            parentWindow.adjustLayoutParamsForSubWindow(wparams);
            parentWindow.adjustLayoutParamsForSubWindow(wparams);
        } else {
        } else if (ActivityManager.isHighEndGfx()) {
            // If there's no parent, then hardware acceleration for this view is
            // If there's no parent and we're running on L or above (or in the
            // set from the application's hardware acceleration setting.
            // system context), assume we want hardware acceleration.
            final Context context = view.getContext();
            final Context context = view.getContext();
            if (context != null
            if (context != null && context.getApplicationInfo().targetSdkVersion
                    && context.getApplicationInfo().hardwareAccelerated) {
                    >= Build.VERSION_CODES.LOLLIPOP) {
                wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
                wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            }
            }
        }
        }