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

Unverified Commit 17c63451 authored by Bruno Martins's avatar Bruno Martins Committed by Michael Bestas
Browse files

SettingsActivity: Hide home screen rotation pref if not supported

Change-Id: Id697fa2c3021e9f9a723d8828ba7dfe0fae96c2e
parent eefe87f8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -252,6 +252,11 @@ public class SettingsActivity extends FragmentActivity
                        // Launcher supports rotation by default. No need to show this setting.
                        return false;
                    }
                    if (!getContext().getResources().getBoolean(
                            com.android.internal.R.bool.config_supportAutoRotation)) {
                        // Not supported by the device, hide setting.
                        return false;
                    }
                    // Initialize the UI once
                    preference.setDefaultValue(RotationHelper.getAllowRotationDefaultValue(info));
                    return true;