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

Commit ff7704a2 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12399304 from 56ee25a2 to 25Q2-release

Change-Id: I6a5ab5d6be535f7610dee0af56473a759af34fd4
parents a88a1838 56ee25a2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import static com.android.documentsui.DevicePolicyResources.Strings.WORK_PROFILE
import static com.android.documentsui.DevicePolicyResources.Strings.WORK_PROFILE_OFF_ERROR_TITLE;

import android.Manifest;
import android.app.ActivityManager;
import android.app.AuthenticationRequiredException;
import android.app.admin.DevicePolicyManager;
import android.content.pm.PackageManager;
@@ -242,6 +243,11 @@ abstract class Message {

        private boolean setCanModifyQuietMode() {
            if (SdkLevel.isAtLeastV() && mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
                // Quite mode cannot be modified when DocsUi is launched from a non-foreground user
                if (UserId.CURRENT_USER.getIdentifier() != ActivityManager.getCurrentUser()) {
                    return false;
                }

                if (mUserManager == null) {
                    Log.e(TAG, "can not obtain user manager class");
                    return false;