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

Commit 14ec4448 authored by Steve Kondik's avatar Steve Kondik
Browse files

Merge branch 'themes-2.3.1_r1' of...

Merge branch 'themes-2.3.1_r1' of https://github.com/tmobile/themes-platform-frameworks-base into HEAD
parents 2fc02ad2 cfbf0164
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1098,12 +1098,14 @@ public final class ActivityThread {
    private final static class ResourcesKey {
        final private String mResDir;
        final private float mScale;
        final private boolean mIsThemeable;
        final private int mHash;

        ResourcesKey(String resDir, float scale) {
        ResourcesKey(String resDir, float scale, boolean isThemeable) {
            mResDir = resDir;
            mScale = scale;
            mHash = mResDir.hashCode() << 2 + (int) (mScale * 2);
            mIsThemeable = isThemeable;
            mHash = mResDir.hashCode() << 3 + ((mIsThemeable ? 1 : 0) << 2) + (int) (mScale * 2);
        }

        @Override
@@ -1117,7 +1119,8 @@ public final class ActivityThread {
                return false;
            }
            ResourcesKey peer = (ResourcesKey) obj;
            return mResDir.equals(peer.mResDir) && mScale == peer.mScale;
            return mResDir.equals(peer.mResDir) && mScale == peer.mScale &&
                    mIsThemeable == peer.mIsThemeable;
        }
    }

@@ -1184,7 +1187,7 @@ public final class ActivityThread {
     * null.
     */
    Resources getTopLevelResources(String resDir, CompatibilityInfo compInfo) {
        ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale);
        ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale, compInfo.isThemeable);
        Resources r;
        synchronized (mPackages) {
            // Resources is app scale dependent.