diff options
| author | 2023-07-11 07:37:53 +0000 | |
|---|---|---|
| committer | 2023-07-11 07:37:53 +0000 | |
| commit | 2e65e914a38557b730b644c263f59a54f5aa490d (patch) | |
| tree | f23604b99c65a32a7eb6672a89ff73801b0fff47 | |
| parent | afed24e208891ac195d583a4351832008cdf1d6e (diff) | |
Revert "Add additional arguments to PackagesHash."
Revert submission 23710112-retail_demo_role
Reason for revert: b/290555961
Reverted changes: /q/submissionid:23710112-retail_demo_role
Change-Id: Iffbe45bfcda802fabc941b3066a5adb20a7c6792
| -rw-r--r-- | services/core/java/com/android/server/policy/role/RoleServicePlatformHelperImpl.java | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/services/core/java/com/android/server/policy/role/RoleServicePlatformHelperImpl.java b/services/core/java/com/android/server/policy/role/RoleServicePlatformHelperImpl.java index 5c4b6f1ad76b..6cc4258194d1 100644 --- a/services/core/java/com/android/server/policy/role/RoleServicePlatformHelperImpl.java +++ b/services/core/java/com/android/server/policy/role/RoleServicePlatformHelperImpl.java @@ -19,7 +19,6 @@ package com.android.server.policy.role; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; -import android.app.admin.DevicePolicyManagerInternal; import android.app.role.RoleManager; import android.content.ComponentName; import android.content.ContentResolver; @@ -304,8 +303,6 @@ public class RoleServicePlatformHelperImpl implements RoleServicePlatformHelper public String computePackageStateHash(@UserIdInt int userId) { PackageManagerInternal packageManagerInternal = LocalServices.getService( PackageManagerInternal.class); - DevicePolicyManagerInternal devicePolicyManagerInternal = LocalServices.getService( - DevicePolicyManagerInternal.class); final MessageDigestOutputStream mdos = new MessageDigestOutputStream(); DataOutputStream dataOutputStream = new DataOutputStream(new BufferedOutputStream(mdos)); @@ -345,30 +342,6 @@ public class RoleServicePlatformHelperImpl implements RoleServicePlatformHelper throw new AssertionError(e); } }, userId); - try { - String deviceOwner= ""; - if (devicePolicyManagerInternal.getDeviceOwnerUserId() == userId) { - ComponentName deviceOwnerComponent = - devicePolicyManagerInternal.getDeviceOwnerComponent(false); - if (deviceOwnerComponent != null) { - deviceOwner = deviceOwnerComponent.getPackageName(); - } - } - dataOutputStream.writeUTF(deviceOwner); - String profileOwner = ""; - ComponentName profileOwnerComponent = - devicePolicyManagerInternal.getProfileOwnerAsUser(userId); - if (profileOwnerComponent != null) { - profileOwner = profileOwnerComponent.getPackageName(); - } - dataOutputStream.writeUTF(profileOwner); - dataOutputStream.writeInt(Settings.Global.getInt(mContext.getContentResolver(), - Settings.Global.DEVICE_DEMO_MODE, 0)); - dataOutputStream.flush(); - } catch (IOException e) { - // Never happens for MessageDigestOutputStream and DataOutputStream. - throw new AssertionError(e); - } return mdos.getDigestAsString(); } |