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

Commit 19d43e05 authored by Alex Chau's avatar Alex Chau
Browse files

Skip onSharedPreferenceChanged if mIgnoreAutoRotateSettings is true in RotationHelper

Test: manual with DeviceProfile changed followed by settings change
Bug: 232081262
Change-Id: Ibc02bbc7fc015db9511960b565e860e6cb5b6246
parent 97c6b268
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public class RotationHelper implements OnSharedPreferenceChangeListener,

    @Override
    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {
        if (mDestroyed) return;
        if (mDestroyed || mIgnoreAutoRotateSettings) return;
        boolean wasRotationEnabled = mHomeRotationEnabled;
        mHomeRotationEnabled = mSharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY,
                getAllowRotationDefaultValue(mActivity.getDeviceProfile()));