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

Commit 5231b62e authored by Tony Mak's avatar Tony Mak
Browse files

Honor the new policy DISALLOW_ASSIST_CONTEXTUAL_DATA

Bug: 323128958

Test: atest android.voiceinteraction.cts.VoiceInteractionServiceTest

Change-Id: Ibc6365413142a62ecf8f8972762a261c8c5ba128
parent 3bb1be05
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -3524,10 +3524,13 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            }
            final long callingIdentity = Binder.clearCallingIdentity();
            try {
                hasRestrictedWindow = displayContent.forAllWindows(windowState -> {
                    return windowState.isOnScreen() && UserManager.isUserTypePrivateProfile(
                            getUserManager().getProfileType(windowState.mShowUserId));
                }, true /* traverseTopToBottom */);
                hasRestrictedWindow = displayContent.forAllWindows(
                        windowState -> windowState.isOnScreen() && (
                                UserManager.isUserTypePrivateProfile(
                                        getUserManager().getProfileType(windowState.mShowUserId))
                                        || hasUserRestriction(
                                        UserManager.DISALLOW_ASSIST_CONTENT,
                                        windowState.mShowUserId)), true /* traverseTopToBottom */);
            } finally {
                Binder.restoreCallingIdentity(callingIdentity);
            }