Skip to content
Snippets Groups Projects
Commit 15f52899 authored by Bruno Martins's avatar Bruno Martins Committed by Adithya R
Browse files

SettingsActivity: Hide home screen rotation pref if not supported


Change-Id: Id697fa2c3021e9f9a723d8828ba7dfe0fae96c2e
Signed-off-by: default avatarSahilSonar <sss.sonar2003@gmail.com>
Signed-off-by: default avatarSaalim Quadri <danascape@gmail.com>
parent 9b8ee891
No related branches found
No related tags found
No related merge requests found
......@@ -249,6 +249,11 @@ public class SettingsMisc extends CollapsingToolbarBaseActivity
// 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment