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

Commit 7abe2753 authored by Tony Mak's avatar Tony Mak Committed by Android (Google) Code Review
Browse files

Merge "Honor the new policy DISALLOW_ASSIST_CONTEXTUAL_DATA" into main

parents 1fa524bc 5231b62e
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);
            }