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;
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,
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) {
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;
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.
}
}
- if (UserId.myUserId() > 0) {
+ if (UserHandle.myUserId() > 0) {
return root;
}
// Rest are for primary user...
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;
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);
}