Conditionally remove settings that aren't required on the tablet.

Bug: 2985267

Changes not done : SD card related stuff, as we need some way still
to figure out if there is a real SD card in the device.

Change-Id: I21c41f18ebe6c050981918481a7f6d69f04b65d0
This commit is contained in:
Amith Yamasani
2010-09-11 14:17:31 -07:00
parent cc0e4db618
commit 60133dd036
7 changed files with 68 additions and 39 deletions

View File

@@ -136,7 +136,8 @@ public class AccessibilitySettings extends SettingsPreferenceFragment {
displayNoAppsAlert();
}
if (KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_POWER)) {
if (KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_POWER)
&& Utils.isVoiceCapable(getActivity())) {
int incallPowerBehavior = Settings.Secure.getInt(getContentResolver(),
Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR,
Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT);
@@ -148,7 +149,8 @@ public class AccessibilitySettings extends SettingsPreferenceFragment {
mPowerButtonEndsCallCheckBox.setChecked(powerButtonCheckboxEnabled);
mPowerButtonEndsCallCheckBox.setEnabled(true);
} else {
// No POWER key on the current device; this entire category is irrelevant.
// No POWER key on the current device or no voice capability;
// this entire category is irrelevant.
getPreferenceScreen().removePreference(mPowerButtonCategory);
}
}