Skip onSharedPreferenceChanged if mIgnoreAutoRotateSettings is true in RotationHelper

Test: manual with DeviceProfile changed followed by settings change
Bug: 232081262
Change-Id: Ibc02bbc7fc015db9511960b565e860e6cb5b6246
This commit is contained in:
Alex Chau
2022-05-13 11:17:05 +01:00
parent 97c6b268cf
commit 19d43e0511
@@ -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()));