Loading core/java/android/app/admin/DevicePolicyManagerInternal.java +10 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,16 @@ public abstract class DevicePolicyManagerInternal { @Nullable public abstract ComponentName getProfileOwnerAsUser(@UserIdInt int userId); /** * Returns the device owner component for the device, or {@code null} if there is not one. * * @deprecated added temporarily to support Android Role permission granting. * Please contact Android Enterprise Device Policy team before calling this function. */ @Deprecated @Nullable public abstract ComponentName getDeviceOwnerComponent(boolean callingUserOnly); /** * Returns the user id of the device owner, or {@link UserHandle#USER_NULL} if there is not one. */ Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -16228,6 +16228,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { return DevicePolicyManagerService.this.getProfileOwnerAsUser(userId); } @Override public ComponentName getDeviceOwnerComponent(boolean callingUserOnly) { return DevicePolicyManagerService.this.getDeviceOwnerComponent(callingUserOnly); } @Override public int getDeviceOwnerUserId() { return DevicePolicyManagerService.this.getDeviceOwnerUserId(); Loading
core/java/android/app/admin/DevicePolicyManagerInternal.java +10 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,16 @@ public abstract class DevicePolicyManagerInternal { @Nullable public abstract ComponentName getProfileOwnerAsUser(@UserIdInt int userId); /** * Returns the device owner component for the device, or {@code null} if there is not one. * * @deprecated added temporarily to support Android Role permission granting. * Please contact Android Enterprise Device Policy team before calling this function. */ @Deprecated @Nullable public abstract ComponentName getDeviceOwnerComponent(boolean callingUserOnly); /** * Returns the user id of the device owner, or {@link UserHandle#USER_NULL} if there is not one. */ Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -16228,6 +16228,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { return DevicePolicyManagerService.this.getProfileOwnerAsUser(userId); } @Override public ComponentName getDeviceOwnerComponent(boolean callingUserOnly) { return DevicePolicyManagerService.this.getDeviceOwnerComponent(callingUserOnly); } @Override public int getDeviceOwnerUserId() { return DevicePolicyManagerService.this.getDeviceOwnerUserId();