Show screen saver toggle on tablets.
Bug: 5669263 Change-Id: I16ca00ff96b17cc367c4f6fa4260da5a08480ac0
This commit is contained in:
@@ -69,7 +69,9 @@ public class DreamSettings extends SettingsPreferenceFragment {
|
|||||||
|
|
||||||
if (activity instanceof PreferenceActivity) {
|
if (activity instanceof PreferenceActivity) {
|
||||||
PreferenceActivity preferenceActivity = (PreferenceActivity) activity;
|
PreferenceActivity preferenceActivity = (PreferenceActivity) activity;
|
||||||
if (preferenceActivity.onIsHidingHeaders() || !preferenceActivity.onIsMultiPane()) {
|
// note: we do not check onIsHidingHeaders() or onIsMultiPane() because there's no
|
||||||
|
// switch in the left-hand pane to control this; we need to show the ON/OFF in our
|
||||||
|
// fragment every time
|
||||||
final int padding = activity.getResources().getDimensionPixelSize(
|
final int padding = activity.getResources().getDimensionPixelSize(
|
||||||
R.dimen.action_bar_switch_padding);
|
R.dimen.action_bar_switch_padding);
|
||||||
mEnableSwitch.setPadding(0, 0, padding, 0);
|
mEnableSwitch.setPadding(0, 0, padding, 0);
|
||||||
@@ -81,7 +83,6 @@ public class DreamSettings extends SettingsPreferenceFragment {
|
|||||||
Gravity.CENTER_VERTICAL | Gravity.RIGHT));
|
Gravity.CENTER_VERTICAL | Gravity.RIGHT));
|
||||||
activity.getActionBar().setTitle(R.string.screensaver_settings_title);
|
activity.getActionBar().setTitle(R.string.screensaver_settings_title);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mEnabler = new Enabler(activity, mEnableSwitch);
|
mEnabler = new Enabler(activity, mEnableSwitch);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user