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
This commit is contained in:
Amith Yamasani
2012-09-23 12:54:14 -07:00
parent b105531116
commit 9627a8ea15
16 changed files with 321 additions and 46 deletions

View File

@@ -26,6 +26,7 @@ import android.os.Bundle;
import android.os.SELinux;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
@@ -126,9 +127,14 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
// These are contained by the root preference screen
parentPreference = getPreferenceScreen();
Utils.updatePreferenceToSpecificActivityOrRemove(act, parentPreference,
KEY_SYSTEM_UPDATE_SETTINGS,
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
if (UserHandle.myUserId() == UserHandle.USER_OWNER) {
Utils.updatePreferenceToSpecificActivityOrRemove(act, parentPreference,
KEY_SYSTEM_UPDATE_SETTINGS,
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
} else {
// Remove for secondary users
removePreference(KEY_SYSTEM_UPDATE_SETTINGS);
}
Utils.updatePreferenceToSpecificActivityOrRemove(act, parentPreference, KEY_CONTRIBUTORS,
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);