Allow only Recents to query app usage limit info.
The active launcher will no longer be able to query #getAppUsageLimit.
Bug: 124126265
Test: manual (verified SecurityException is not thrown anymore for Recents)
Change-Id: Ic948cf16232e7585eb74523ed360680aca9ceaf1
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index f87ce82..db43ce2 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -792,7 +792,7 @@
*
* @return an {@link AppUsageLimit} object describing the app time limit containing
* the given package with the smallest time remaining, or {@code null} if none exist.
- * @throws SecurityException when the caller is not the active launcher.
+ * @throws SecurityException when the caller is not the recents app.
*/
@Nullable
public LauncherApps.AppUsageLimit getAppUsageLimit(String packageName, UserHandle user) {