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

Commit a68f0500 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Avoid 60ms QS inflations on UI thread after density changes" into...

Merge "Avoid 60ms QS inflations on UI thread after density changes" into udc-qpr-dev am: 72ac76b7 am: 4f528f90

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23634884



Change-Id: Id0ad6130e7c1cc6ee6b58cf44517f995c767c8d6
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents cd2a042a 4f528f90
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -28,11 +28,11 @@ import android.content.res.Resources;
public class InterestingConfigChanges {
    private final Configuration mLastConfiguration = new Configuration();
    private final int mFlags;
    private int mLastDensity;

    public InterestingConfigChanges() {
        this(ActivityInfo.CONFIG_LOCALE | ActivityInfo.CONFIG_LAYOUT_DIRECTION
                | ActivityInfo.CONFIG_UI_MODE | ActivityInfo.CONFIG_ASSETS_PATHS);
                | ActivityInfo.CONFIG_UI_MODE | ActivityInfo.CONFIG_ASSETS_PATHS
                | ActivityInfo.CONFIG_DENSITY);
    }

    public InterestingConfigChanges(int flags) {
@@ -50,11 +50,6 @@ public class InterestingConfigChanges {
    public boolean applyNewConfig(Resources res) {
        int configChanges = mLastConfiguration.updateFrom(
                Configuration.generateDelta(mLastConfiguration, res.getConfiguration()));
        boolean densityChanged = mLastDensity != res.getDisplayMetrics().densityDpi;
        if (densityChanged || (configChanges & (mFlags)) != 0) {
            mLastDensity = res.getDisplayMetrics().densityDpi;
            return true;
        }
        return false;
        return (configChanges & (mFlags)) != 0;
    }
}