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

Commit f3fe3bf5 authored by Jason Monk's avatar Jason Monk
Browse files

Fix some config issues with sysui

It wasn't creating a delta so as soon as a change happened, it would
return true for any config changes.

Also StatusBar wasn't receiving config changes because the callback
was named wrong and SystemBars no longer passes it through.

Test: manual
Fixes: 62968485
Fixes: 62893293
Change-Id: I56750047168007edd0ca9ea35cb36c23dc790661
parent 1d8d34fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@ public class InterestingConfigChanges {
    }

    public boolean applyNewConfig(Resources res) {
        int configChanges = mLastConfiguration.updateFrom(res.getConfiguration());
        int configChanges = mLastConfiguration.updateFrom(
                Configuration.generateDelta(mLastConfiguration, res.getConfiguration()));
        boolean densityChanged = mLastDensity != res.getDisplayMetrics().densityDpi;
        if (densityChanged || (configChanges & (mFlags)) != 0) {
            mLastDensity = res.getDisplayMetrics().densityDpi;
+1 −1
Original line number Diff line number Diff line
@@ -3757,7 +3757,7 @@ public class StatusBar extends SystemUI implements DemoMode,

    // SystemUIService notifies SystemBars of configuration changes, which then calls down here
    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
    public void onConfigChanged(Configuration newConfig) {
        updateResources();
        updateDisplaySize(); // populates mDisplayMetrics