Expose the ability to resolve icon as a different app
This is needed as the Permission Controller needs to get the icons for
permissions declared by 3rd party apps.
Bug: 110953302
Test: Built
Change-Id: I3fa643ad46150283c33c8fac918df158ed9b5a30
diff --git a/api/system-current.txt b/api/system-current.txt
index 1d5f586..aaa2104 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -1269,6 +1269,14 @@
}
+package android.graphics.drawable {
+
+ public final class Icon implements android.os.Parcelable {
+ method public static android.graphics.drawable.Icon createWithResource(android.content.res.Resources, int);
+ }
+
+}
+
package android.hardware {
public final class Sensor {
diff --git a/graphics/java/android/graphics/drawable/Icon.java b/graphics/java/android/graphics/drawable/Icon.java
index accc081..a337773 100644
--- a/graphics/java/android/graphics/drawable/Icon.java
+++ b/graphics/java/android/graphics/drawable/Icon.java
@@ -21,6 +21,7 @@
import android.annotation.IdRes;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.content.ContentResolver;
import android.content.Context;
@@ -568,7 +569,7 @@
* Version of createWithResource that takes Resources. Do not use.
* @hide
*/
- @UnsupportedAppUsage
+ @SystemApi
public static Icon createWithResource(Resources res, @DrawableRes int resId) {
if (res == null) {
throw new IllegalArgumentException("Resource must not be null.");