Loading core/java/android/os/UserHandle.java +5 −4 Original line number Diff line number Diff line Loading @@ -57,15 +57,15 @@ public final class UserHandle implements Parcelable { /** * @hide A user id constant to indicate the "owner" user of the device * @deprecated Consider using either USER_SYSTEM constant or * UserInfo.isPrimary(). * @deprecated Consider using either {@link UserHandle#USER_SYSTEM} constant or * check the target user's flag {@link android.content.pm.UserInfo#isAdmin}. */ public static final int USER_OWNER = 0; /** * @hide A user handle to indicate the primary/owner user of the device * @deprecated Consider using either SYSTEM constant or * UserInfo.isPrimary(). * @deprecated Consider using either {@link UserHandle#SYSTEM} constant or * check the target user's flag {@link android.content.pm.UserInfo#isAdmin}. */ public static final UserHandle OWNER = new UserHandle(USER_OWNER); Loading Loading @@ -280,6 +280,7 @@ public final class UserHandle implements Parcelable { * Returns true if this UserHandle refers to the owner user; false otherwise. * @return true if this UserHandle refers to the owner user; false otherwise. * @hide * TODO: find an alternative to this Api. */ @SystemApi public final boolean isOwner() { Loading services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +4 −3 Original line number Diff line number Diff line Loading @@ -363,7 +363,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku // ... and see if these are hosts we've been awaiting. // NOTE: We are backing up and restoring only the owner. if (newPackageAdded && userId == UserHandle.USER_OWNER) { // TODO: http://b/22388012 if (newPackageAdded && userId == UserHandle.USER_SYSTEM) { final int uid = getUidForPackage(pkgName, userId); if (uid >= 0 ) { resolveHostUidLocked(pkgName, uid); Loading Loading @@ -2729,7 +2730,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku Host host = lookupHostLocked(oldHostId); if (host != null) { final int uid = getUidForPackage(NEW_KEYGUARD_HOST_PACKAGE, UserHandle.USER_OWNER); UserHandle.USER_SYSTEM); if (uid >= 0) { host.id = new HostId(uid, KEYGUARD_HOST_ID, NEW_KEYGUARD_HOST_PACKAGE); } Loading @@ -2750,7 +2751,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private static AtomicFile getSavedStateFile(int userId) { File dir = Environment.getUserSystemDirectory(userId); File settingsFile = getStateFile(userId); if (!settingsFile.exists() && userId == UserHandle.USER_OWNER) { if (!settingsFile.exists() && userId == UserHandle.USER_SYSTEM) { if (!dir.exists()) { dir.mkdirs(); } Loading services/core/java/com/android/server/BluetoothManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -271,7 +271,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { int sysUiUid = -1; try { sysUiUid = mContext.getPackageManager().getPackageUid("com.android.systemui", UserHandle.USER_OWNER); UserHandle.USER_SYSTEM); } catch (PackageManager.NameNotFoundException e) { // Some platforms, such as wearables do not have a system ui. Log.w(TAG, "Unable to resolve SystemUI's UID.", e); Loading services/core/java/com/android/server/DeviceIdleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1689,7 +1689,7 @@ public class DeviceIdleController extends SystemService } if (args != null) { int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; for (int i=0; i<args.length; i++) { String arg = args[i]; if ("-h".equals(arg)) { Loading services/core/java/com/android/server/InputMethodManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3504,7 +3504,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub throw new NullPointerException("methodMap is null"); } mMethodMap = methodMap; final File systemDir = userId == UserHandle.USER_OWNER final File systemDir = userId == UserHandle.USER_SYSTEM ? new File(Environment.getDataDirectory(), SYSTEM_PATH) : Environment.getUserSystemDirectory(userId); final File inputMethodDir = new File(systemDir, INPUT_METHOD_PATH); Loading Loading
core/java/android/os/UserHandle.java +5 −4 Original line number Diff line number Diff line Loading @@ -57,15 +57,15 @@ public final class UserHandle implements Parcelable { /** * @hide A user id constant to indicate the "owner" user of the device * @deprecated Consider using either USER_SYSTEM constant or * UserInfo.isPrimary(). * @deprecated Consider using either {@link UserHandle#USER_SYSTEM} constant or * check the target user's flag {@link android.content.pm.UserInfo#isAdmin}. */ public static final int USER_OWNER = 0; /** * @hide A user handle to indicate the primary/owner user of the device * @deprecated Consider using either SYSTEM constant or * UserInfo.isPrimary(). * @deprecated Consider using either {@link UserHandle#SYSTEM} constant or * check the target user's flag {@link android.content.pm.UserInfo#isAdmin}. */ public static final UserHandle OWNER = new UserHandle(USER_OWNER); Loading Loading @@ -280,6 +280,7 @@ public final class UserHandle implements Parcelable { * Returns true if this UserHandle refers to the owner user; false otherwise. * @return true if this UserHandle refers to the owner user; false otherwise. * @hide * TODO: find an alternative to this Api. */ @SystemApi public final boolean isOwner() { Loading
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +4 −3 Original line number Diff line number Diff line Loading @@ -363,7 +363,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku // ... and see if these are hosts we've been awaiting. // NOTE: We are backing up and restoring only the owner. if (newPackageAdded && userId == UserHandle.USER_OWNER) { // TODO: http://b/22388012 if (newPackageAdded && userId == UserHandle.USER_SYSTEM) { final int uid = getUidForPackage(pkgName, userId); if (uid >= 0 ) { resolveHostUidLocked(pkgName, uid); Loading Loading @@ -2729,7 +2730,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku Host host = lookupHostLocked(oldHostId); if (host != null) { final int uid = getUidForPackage(NEW_KEYGUARD_HOST_PACKAGE, UserHandle.USER_OWNER); UserHandle.USER_SYSTEM); if (uid >= 0) { host.id = new HostId(uid, KEYGUARD_HOST_ID, NEW_KEYGUARD_HOST_PACKAGE); } Loading @@ -2750,7 +2751,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku private static AtomicFile getSavedStateFile(int userId) { File dir = Environment.getUserSystemDirectory(userId); File settingsFile = getStateFile(userId); if (!settingsFile.exists() && userId == UserHandle.USER_OWNER) { if (!settingsFile.exists() && userId == UserHandle.USER_SYSTEM) { if (!dir.exists()) { dir.mkdirs(); } Loading
services/core/java/com/android/server/BluetoothManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -271,7 +271,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { int sysUiUid = -1; try { sysUiUid = mContext.getPackageManager().getPackageUid("com.android.systemui", UserHandle.USER_OWNER); UserHandle.USER_SYSTEM); } catch (PackageManager.NameNotFoundException e) { // Some platforms, such as wearables do not have a system ui. Log.w(TAG, "Unable to resolve SystemUI's UID.", e); Loading
services/core/java/com/android/server/DeviceIdleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1689,7 +1689,7 @@ public class DeviceIdleController extends SystemService } if (args != null) { int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; for (int i=0; i<args.length; i++) { String arg = args[i]; if ("-h".equals(arg)) { Loading
services/core/java/com/android/server/InputMethodManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3504,7 +3504,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub throw new NullPointerException("methodMap is null"); } mMethodMap = methodMap; final File systemDir = userId == UserHandle.USER_OWNER final File systemDir = userId == UserHandle.USER_SYSTEM ? new File(Environment.getDataDirectory(), SYSTEM_PATH) : Environment.getUserSystemDirectory(userId); final File inputMethodDir = new File(systemDir, INPUT_METHOD_PATH); Loading