Show more settings and add restrictions/dialogs for secondary users
Bug: 7213029 crash in About>Status
Bug: 7212495 hide System updates for second user
Bug: 7212230 nickname editor should select the text
Bug: 7160487 TTS settings
Bug: 7129411 Settings needs visibility changes for secondary users
Change-Id: Ia2d1229c08b392edfa6b671fce4a382410405b14
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 368976a..a5f021f 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -25,6 +25,7 @@
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
+import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.text.TextUtils;
@@ -66,6 +67,13 @@
}
}
+ protected void removePreference(String key) {
+ Preference pref = findPreference(key);
+ if (pref != null) {
+ getPreferenceScreen().removePreference(pref);
+ }
+ }
+
/**
* Override this if you want to show a help item in the menu, by returning the resource id.
* @return the resource id for the help url