From af42e0f676a6407e0e1ecf2b4d4d9bdb52bd1cec Mon Sep 17 00:00:00 2001 From: Mehdi Alizadeh Date: Mon, 21 Dec 2020 17:28:37 -0800 Subject: [PATCH] Adds RequiresPermission on ShortcutQuery#FLAG_GET_PERSON_DATA Bug: 174761872 Test: Passes pre-submit Change-Id: I192061a340bbed136f65261fe9e8c6ed37e153c1 --- core/api/system-current.txt | 2 +- core/java/android/content/pm/LauncherApps.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 5679c8958bbcf..86de5ddda5a94 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -2234,7 +2234,7 @@ package android.content.pm { } public static class LauncherApps.ShortcutQuery { - field public static final int FLAG_GET_PERSONS_DATA = 2048; // 0x800 + field @RequiresPermission(android.Manifest.permission.ACCESS_SHORTCUTS) public static final int FLAG_GET_PERSONS_DATA = 2048; // 0x800 } public class PackageInstaller { diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java index 4b7bbbfa9d209..62925757cde19 100644 --- a/core/java/android/content/pm/LauncherApps.java +++ b/core/java/android/content/pm/LauncherApps.java @@ -441,6 +441,7 @@ public class LauncherApps { * @hide */ @SystemApi + @RequiresPermission(android.Manifest.permission.ACCESS_SHORTCUTS) public static final int FLAG_GET_PERSONS_DATA = 1 << 11; /** @hide */