From 8bf356b5e6fa847826011919c566e7b65987be91 Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Tue, 29 Mar 2022 14:22:48 -0400 Subject: [PATCH] Update docs for WindowInsets#getPrivacyIndicatorBounds Added a paragraph to be more descriptivea bout how the bounds are loaded, and when they would be expected to change. In particular, added a clause to state that the bounds should never be null so long as there is a StatusBar window. Fixes: 189190379 Test: read docs Change-Id: I0392310d3a19ea6f6a74010266e90ffe5c1543e9 --- core/java/android/view/WindowInsets.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java index cde1cc704f929..ba3417980a3d5 100644 --- a/core/java/android/view/WindowInsets.java +++ b/core/java/android/view/WindowInsets.java @@ -517,6 +517,13 @@ public final class WindowInsets { /** * Returns the {@link Rect} of the maximum bounds of the system privacy indicator, for the * current orientation, in relative coordinates, or null if the bounds have not been loaded yet. + *

+ * The privacy indicator bounds are determined by SystemUI, and subsequently loaded once the + * StatusBar window has been created and attached. The bounds for all rotations are calculated + * and loaded at once, and this value is only expected to ever change on display or font scale + * changes. As long as there is a StatusBar window, this value should not be expected to be + * null. + *

* The privacy indicator shows over apps when an app uses the microphone or camera permissions, * while an app is in immersive mode. *