Loading core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -13003,7 +13003,7 @@ package android.content.pm { method public final int getIconResource(); method public boolean isCrossProfileIntentForwarderActivity(); method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public CharSequence loadLabel(android.content.pm.PackageManager); method @NonNull public CharSequence loadLabel(@NonNull android.content.pm.PackageManager); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.ResolveInfo> CREATOR; field public android.content.pm.ActivityInfo activityInfo; core/java/android/content/pm/ResolveInfo.java +10 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.content.pm; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.compat.annotation.UnsupportedAppUsage; Loading @@ -33,6 +34,7 @@ import android.util.Slog; import java.text.Collator; import java.util.Comparator; import java.util.Objects; /** * Information that is returned from resolving an intent Loading Loading @@ -224,10 +226,17 @@ public class ResolveInfo implements Parcelable { * @return Returns a CharSequence containing the resolutions's label. If the * item does not have a label, its name is returned. */ public CharSequence loadLabel(PackageManager pm) { @NonNull public CharSequence loadLabel(@NonNull PackageManager pm) { if (nonLocalizedLabel != null) { return nonLocalizedLabel; } // In order to not change the original behavior. To add null check here to support backward // compatible. If nonLocalizedLabel is not null, we also return nonLocalizedLabel even if pm // is null. Objects.requireNonNull(pm); CharSequence label; if (resolvePackageName != null && labelRes != 0) { label = pm.getText(resolvePackageName, labelRes, null); Loading Loading
core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -13003,7 +13003,7 @@ package android.content.pm { method public final int getIconResource(); method public boolean isCrossProfileIntentForwarderActivity(); method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); method public CharSequence loadLabel(android.content.pm.PackageManager); method @NonNull public CharSequence loadLabel(@NonNull android.content.pm.PackageManager); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.ResolveInfo> CREATOR; field public android.content.pm.ActivityInfo activityInfo;
core/java/android/content/pm/ResolveInfo.java +10 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.content.pm; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.compat.annotation.UnsupportedAppUsage; Loading @@ -33,6 +34,7 @@ import android.util.Slog; import java.text.Collator; import java.util.Comparator; import java.util.Objects; /** * Information that is returned from resolving an intent Loading Loading @@ -224,10 +226,17 @@ public class ResolveInfo implements Parcelable { * @return Returns a CharSequence containing the resolutions's label. If the * item does not have a label, its name is returned. */ public CharSequence loadLabel(PackageManager pm) { @NonNull public CharSequence loadLabel(@NonNull PackageManager pm) { if (nonLocalizedLabel != null) { return nonLocalizedLabel; } // In order to not change the original behavior. To add null check here to support backward // compatible. If nonLocalizedLabel is not null, we also return nonLocalizedLabel even if pm // is null. Objects.requireNonNull(pm); CharSequence label; if (resolvePackageName != null && labelRes != 0) { label = pm.getText(resolvePackageName, labelRes, null); Loading