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

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

Slightly refactored getTheme() to not check or apply mParentThemeId unless we...

Slightly refactored getTheme() to not check or apply mParentThemeId unless we took the global theming path.

CR: Sergey Ten.
parent 0df542d9
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -298,10 +298,6 @@ class ApplicationContext extends Context {
            mParentThemeId = -1;
            if (mThemeResource == 0) {
                themeId = determineDefaultThemeResource();
            } else {
                themeId = mThemeResource;
            }

                //if this is delta then apply the parent theme first
                // This is a minor performance improvement:
                // DeltaThemeInfo may just customize a wallpaper or a sound.
@@ -310,14 +306,16 @@ class ApplicationContext extends Context {
                    deltaThemeId = themeId;
                    themeId = mParentThemeId;
                }
            } else {
                themeId = mThemeResource;
            }

            mTheme = mResources.newTheme();
            mTheme.applyStyle(themeId, true);

//          Log.d(TAG, "******ThemeId :"+ themeId);
            if (deltaThemeId > 0) {
                mTheme.applyStyle(deltaThemeId, true);
            }

        }
        return mTheme;
    }