From 13d2335c708f91bf54826fc55a03e4bfd9e1dfd8 Mon Sep 17 00:00:00 2001 From: Nikita Dubrovsky Date: Wed, 20 Mar 2019 14:58:53 -0700 Subject: [PATCH] Update deprecation javadocs of APIs related to preferred activities Added a note to point to the new RoleManager API. Bug: 123661518 Test: build (javadoc-only change) Change-Id: Icd2b265375ca89fe7cd4af217de874ef099e8c38 --- .../android/content/pm/PackageManager.java | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 2f99879d43a67..46475ffb95619 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -5643,7 +5643,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated public abstract void addPackageToPreferred(String packageName); @@ -5652,7 +5654,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated public abstract void removePackageFromPreferred(String packageName); @@ -5669,7 +5673,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated public abstract List getPreferredPackages(@PackageInfoFlags int flags); @@ -5692,7 +5698,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated public abstract void addPreferredActivity(IntentFilter filter, int match, @@ -5707,7 +5715,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated @UnsupportedAppUsage @@ -5737,7 +5747,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated @UnsupportedAppUsage @@ -5763,7 +5775,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated @SystemApi @@ -5778,7 +5792,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated @UnsupportedAppUsage @@ -5799,7 +5815,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated public abstract void clearPackagePreferredActivities(String packageName); @@ -5824,7 +5842,9 @@ public abstract class PackageManager { * @deprecated This function no longer does anything. It is the platform's * responsibility to assign preferred activities and this cannot be modified * directly. To determine the activities resolved by the platform, use - * {@link #resolveActivity} or {@link #queryIntentActivities}. + * {@link #resolveActivity} or {@link #queryIntentActivities}. To configure + * an app to be responsible for a particular role and to check current role + * holders, see {@link android.app.role.RoleManager}. */ @Deprecated public abstract int getPreferredActivities(@NonNull List outFilters,