Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb06a427 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Rename UserId to UserHandle.

Change-Id: I04b86f3777c28fb83f03eb404dd5c2eb18d3da8f
parent 704ca026
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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) {
+3 −3
Original line number Diff line number Diff line
@@ -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...
+3 −3
Original line number Diff line number Diff line
@@ -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);
            }