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

Commit 2280019d authored by yuemingw's avatar yuemingw Committed by Yueming Wang
Browse files

Fix cts failure for com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled

Change-Id: Iba6078f06d7d251a12c530058d1f2ace78aa3e92
Fix: 68954948
Test: com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
parent 5cc7ea1f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3246,6 +3246,7 @@ public class DevicePolicyManager {
     *             that uses {@link DeviceAdminInfo#USES_POLICY_WIPE_DATA}
     */
    public void wipeData(int flags) {
        throwIfParentInstance("wipeData");
        final String wipeReasonForUser = mContext.getString(
                R.string.work_profile_deleted_description_dpm_wipe);
        wipeDataInternal(flags, wipeReasonForUser);
@@ -3270,6 +3271,7 @@ public class DevicePolicyManager {
     * @throws IllegalArgumentException if the input reason string is null or empty.
     */
    public void wipeDataWithReason(int flags, @NonNull CharSequence reason) {
        throwIfParentInstance("wipeDataWithReason");
        Preconditions.checkNotNull(reason, "CharSequence is null");
        wipeDataInternal(flags, reason.toString());
    }
@@ -3283,7 +3285,6 @@ public class DevicePolicyManager {
     * @hide
     */
    private void wipeDataInternal(int flags, @NonNull String wipeReasonForUser) {
        throwIfParentInstance("wipeDataWithReason");
        if (mService != null) {
            try {
                mService.wipeDataWithReason(flags, wipeReasonForUser);