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

Commit a566d85a authored by Josh Guilfoyle's avatar Josh Guilfoyle
Browse files

Don't set isThemeable for the system context.

Proper theming support for it is not yet present.

Change-Id: I0be9905f2fc778ac590d42288d51ce088ec8a34d
parent 9bdba12e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
     * Is given application theme agnostic, i.e. behaves properly when default theme is changed.
     * {@hide}
     */
    public boolean isThemeable = true;
    public boolean isThemeable = false;

    private static final String PLUTO_SCHEMA = "http://www.w3.org/2001/pluto.html";

+7 −4
Original line number Diff line number Diff line
@@ -1124,6 +1124,7 @@ public class PackageParser {
            } else if (tagName.equals("theme")) {
                // this is a theme apk.
                pkg.mIsThemeApk = true;
                pkg.applicationInfo.isThemeable = false;
                pkg.mThemeInfos.add(new ThemeInfo(parser, res, attrs));
            } else if (RIGID_PARSER) {
                outError[0] = "Bad element under <manifest>: "
@@ -1476,7 +1477,7 @@ public class PackageParser {
        return a;
    }

    private void parseAndApplyPlutoAttributes(XmlPullParser parser, AttributeSet attrs,
    private void parseApplicationThemeAttributes(XmlPullParser parser, AttributeSet attrs,
            ApplicationInfo appInfo) {
        for (int i = 0; i < attrs.getAttributeCount(); i++) {
            if (!ApplicationInfo.isPlutoNamespace(parser.getAttributeNamespace(i))) {
@@ -1490,7 +1491,7 @@ public class PackageParser {
        }
    }

    private void parseAndApplyPlutoAttributes(XmlPullParser parser, AttributeSet attrs,
    private void parseActivityThemeAttributes(XmlPullParser parser, AttributeSet attrs,
            ActivityInfo ai) {
        for (int i = 0; i < attrs.getAttributeCount(); i++) {
            if (!ApplicationInfo.isPlutoNamespace(parser.getAttributeNamespace(i))) {
@@ -1509,7 +1510,9 @@ public class PackageParser {
        final ApplicationInfo ai = owner.applicationInfo;
        final String pkgName = owner.applicationInfo.packageName;

        parseAndApplyPlutoAttributes(parser, attrs, ai);
        // assume that this package is themeable unless explicitly set to false.
        ai.isThemeable = true;
        parseApplicationThemeAttributes(parser, attrs, ai);

        TypedArray sa = res.obtainAttributes(attrs,
                com.android.internal.R.styleable.AndroidManifestApplication);
@@ -1981,7 +1984,7 @@ public class PackageParser {
            return null;
        }

        parseAndApplyPlutoAttributes(parser, attrs, a.info);
        parseActivityThemeAttributes(parser, attrs, a.info);

        int outerDepth = parser.getDepth();
        int type;