From e8fc0b356025600578da59952c407241a43e8f2b Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Thu, 2 Mar 2023 00:57:19 +0000 Subject: [PATCH] Improved javadoc on UserVisibilityMediator. Test: echo "I don't always document a Java class, but when I do, I don't know how to generate its Javadoc" Fixes: 271339157 Change-Id: I3d73d0e14f4daf95fa4e24a677ac4f6b40a0aff9 --- .../server/pm/UserVisibilityMediator.java | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/pm/UserVisibilityMediator.java b/services/core/java/com/android/server/pm/UserVisibilityMediator.java index a8615c2c6200e..650052f6ec532 100644 --- a/services/core/java/com/android/server/pm/UserVisibilityMediator.java +++ b/services/core/java/com/android/server/pm/UserVisibilityMediator.java @@ -63,19 +63,39 @@ import java.util.concurrent.CopyOnWriteArrayList; /** * Class responsible for deciding whether a user is visible (or visible for a given display). * - *

Currently, it has 2 "modes" (set on constructor), which defines the class behavior (i.e, the + *

Currently, it has 3 "modes" (set on constructor), which defines the class behavior (i.e, the * logic that dictates the result of methods such as {@link #isUserVisible(int)} and * {@link #isUserVisible(int, int)}): * *

* + *

When you make changes in this class, you should run at least the 3 unit tests and + * {@link android.multiuser.cts.UserVisibilityTest} (which actually applies for all modes); for + * example, by calling {@code atest UserVisibilityMediatorSUSDTest UserVisibilityMediatorMUMDTest + * UserVisibilityMediatorMUPANDTest UserVisibilityTest}. Ideally, you should run the other 2 CTS + * tests as well (you can emulate these modes using {@code adb} commands; their javadoc provides + * instructions on how to do so). + * *

This class is thread safe. */ public final class UserVisibilityMediator implements Dumpable {