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

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

THEMES-98: Move check for isThemeable closer to the engine.

Doing so allows us to more finely control when to respect the flag and
fix a bug which causes the engine to kick in even when not requested.

This partially reverts commit 0df542d9.

CR: Sergey Ten
parent e2bfe0eb
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ public final class ActivityThread {
    public final static class PackageInfo {

        private final ActivityThread mActivityThread;
        private final ApplicationInfo mApplicationInfo;
        /* package */ final ApplicationInfo mApplicationInfo;
        private final String mPackageName;
        private final String mAppDir;
        private final String mResDir;
@@ -2255,8 +2255,6 @@ public final class ActivityThread {
                    } else {
                        activity.setTheme(theme);
                    }
                } else if (r.activityInfo.isThemeable() == false) {
                    activity.setTheme(android.R.style.Theme);
                }

                activity.mCalled = false;
+1 −1
Original line number Diff line number Diff line
@@ -261,7 +261,7 @@ class ApplicationContext extends Context {
    }

    private int determineDefaultThemeResource() {
        if (getResources() != Resources.getSystem()) {
        if (getResources() != Resources.getSystem() && mPackageInfo.mApplicationInfo.isThemeable) {
            try {
                Configuration config = ActivityManagerNative.getDefault().getConfiguration();
                if (config.customTheme != null) {