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

Commit 0c6fa93f authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Update EBGH resources when screen resolution mode changes

Bug: 336895560
Flag: NONE trivial bugfix
Test: Manual, i.e. verifying that EBGH's state is updated when changing the screen-resolution mode in Settings
Change-Id: I356c0d06f27772c181668b6a4b36dd077abb014c
parent c14c0eac
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
package com.android.systemui.navigationbar.gestural;

import static android.content.pm.ActivityInfo.CONFIG_FONT_SCALE;
import static android.view.InputDevice.SOURCE_MOUSE;
import static android.view.InputDevice.SOURCE_TOUCHPAD;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION;
@@ -28,6 +29,7 @@ import android.annotation.NonNull;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
@@ -1175,6 +1177,10 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
        // TODO(b/332635834): Disable this logging once b/332635834 is fixed.
        Log.i(DEBUG_MISSING_GESTURE_TAG, "Config changed: newConfig=" + newConfig
                + " lastReportedConfig=" + mLastReportedConfig);
        final int diff = newConfig.diff(mLastReportedConfig);
        if ((diff & CONFIG_FONT_SCALE) != 0 || (diff & ActivityInfo.CONFIG_DENSITY) != 0) {
            updateCurrentUserResources();
        }
        mLastReportedConfig.updateFrom(newConfig);
        updateDisplaySize();
    }