diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-08-16 11:01:57 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-08-16 12:47:09 -0700 |
commit | bb06a427eb471227cf42a8078a54ca0581309493 (patch) | |
tree | b3c7551fb78800794fba5600193311b6ca543432 /src/com/android | |
parent | 704ca026e0919c9361859d755b1f3f4eb1315c64 (diff) | |
download | packages_apps_settings-bb06a427eb471227cf42a8078a54ca0581309493.zip packages_apps_settings-bb06a427eb471227cf42a8078a54ca0581309493.tar.gz packages_apps_settings-bb06a427eb471227cf42a8078a54ca0581309493.tar.bz2 |
Rename UserId to UserHandle.
Change-Id: I04b86f3777c28fb83f03eb404dd5c2eb18d3da8f
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/settings/DataUsageSummary.java | 8 | ||||
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 6 | ||||
-rw-r--r-- | src/com/android/settings/Settings.java | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index 5e20a6e..d0ec1e7 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -85,7 +85,7 @@ import android.os.Parcelable; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; -import android.os.UserId; +import android.os.UserHandle; import android.preference.Preference; import android.preference.PreferenceActivity; import android.provider.Settings; @@ -806,7 +806,7 @@ public class DataUsageSummary extends Fragment { updateDetailData(); - if (UserId.isApp(appId) && !mPolicyManager.getRestrictBackground() + if (UserHandle.isApp(appId) && !mPolicyManager.getRestrictBackground() && isBandwidthControlEnabled() && hasReadyMobileRadio(context)) { setPreferenceTitle(mAppRestrictView, R.string.data_usage_app_restrict_background); setPreferenceSummary(mAppRestrictView, @@ -1486,8 +1486,8 @@ public class DataUsageSummary extends Fragment { for (int i = 0; i < size; i++) { entry = stats.getValues(i, entry); - final boolean isApp = UserId.isApp(entry.uid); - final int appId = isApp ? UserId.getAppId(entry.uid) : entry.uid; + final boolean isApp = UserHandle.isApp(entry.uid); + final int appId = isApp ? UserHandle.getAppId(entry.uid) : entry.uid; if (isApp || appId == UID_REMOVED || appId == UID_TETHERING) { AppItem item = knownUids.get(appId); if (item == null) { diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 74cc753..8f33b9b 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -26,7 +26,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; -import android.os.UserId; +import android.os.UserHandle; import android.os.Vibrator; import android.preference.CheckBoxPreference; import android.preference.ListPreference; @@ -141,7 +141,7 @@ public class SecuritySettings extends SettingsPreferenceFragment DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); - if (UserId.myUserId() == 0) { + if (UserHandle.myUserId() == 0) { switch (dpm.getStorageEncryptionStatus()) { case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE: // The device is currently encrypted. @@ -193,7 +193,7 @@ public class SecuritySettings extends SettingsPreferenceFragment } } - if (UserId.myUserId() > 0) { + if (UserHandle.myUserId() > 0) { return root; } // Rest are for primary user... diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java index e6e6cff..364f96a 100644 --- a/src/com/android/settings/Settings.java +++ b/src/com/android/settings/Settings.java @@ -40,7 +40,7 @@ import android.os.Bundle; import android.os.INetworkManagementService; import android.os.RemoteException; import android.os.ServiceManager; -import android.os.UserId; +import android.os.UserHandle; import android.preference.Preference; import android.preference.PreferenceActivity; import android.preference.PreferenceActivity.Header; @@ -415,13 +415,13 @@ public class Settings extends PreferenceActivity i = insertAccountsHeaders(target, headerIndex); } else if (id == R.id.user_settings) { if (!mEnableUserManagement - || !UserId.MU_ENABLED || UserId.myUserId() != 0 + || !UserHandle.MU_ENABLED || UserHandle.myUserId() != 0 || !getResources().getBoolean(R.bool.enable_user_management) || Utils.isMonkeyRunning()) { target.remove(header); } } - if (UserId.MU_ENABLED && UserId.myUserId() != 0 + if (UserHandle.MU_ENABLED && UserHandle.myUserId() != 0 && !ArrayUtils.contains(SETTINGS_FOR_RESTRICTED, id)) { target.remove(header); } |