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

Commit 7a19cf62 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid infinite blocked loop in VDM" into main

parents afad75ae eb4c26ec
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1349,14 +1349,14 @@ final class VirtualDeviceImpl extends IVirtualDevice.Stub

    private boolean shouldShowBlockedActivityDialog(ComponentName blockedComponent,
            ComponentName blockedAppStreamingActivityComponent) {
        if (!android.companion.virtualdevice.flags.Flags.activityControlApi()) {
            return true;
        }
        if (Objects.equals(blockedComponent, blockedAppStreamingActivityComponent)) {
            // Do not show the dialog if it was blocked for some reason already to avoid
            // infinite blocking loop.
            return false;
        }
        if (!android.companion.virtualdevice.flags.Flags.activityControlApi()) {
            return true;
        }
        // Do not show the dialog if disabled by policy.
        return getDevicePolicy(POLICY_TYPE_BLOCKED_ACTIVITY_BEHAVIOR) == DEVICE_POLICY_DEFAULT;
    }