Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d60c7851 authored by Evan Severson's avatar Evan Severson
Browse files

Change method to PackageManager#getBackgroundPermissionOptionLabel

Feedback advised renaming getBackgroundPermissionButtonLabel to
getBackgroundPermissionOptionLabel. Also update javadoc for this
method.

Fixes: 147907758
Test: Compile
Change-Id: Iaafef7c6e70538fe878db82c900d87ac668591bf
parent e9a4f023
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11865,7 +11865,7 @@ package android.content.pm {
    method @NonNull public abstract CharSequence getApplicationLabel(@NonNull android.content.pm.ApplicationInfo);
    method @Nullable public abstract android.graphics.drawable.Drawable getApplicationLogo(@NonNull android.content.pm.ApplicationInfo);
    method @Nullable public abstract android.graphics.drawable.Drawable getApplicationLogo(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
    method @NonNull public CharSequence getBackgroundPermissionButtonLabel();
    method @NonNull public CharSequence getBackgroundPermissionOptionLabel();
    method @Nullable public abstract android.content.pm.ChangedPackages getChangedPackages(@IntRange(from=0) int);
    method public abstract int getComponentEnabledSetting(@NonNull android.content.ComponentName);
    method @NonNull public abstract android.graphics.drawable.Drawable getDefaultActivityIcon();
+1 −1
Original line number Diff line number Diff line
@@ -868,7 +868,7 @@ public class ApplicationPackageManager extends PackageManager {
    }

    @Override
    public CharSequence getBackgroundPermissionButtonLabel() {
    public CharSequence getBackgroundPermissionOptionLabel() {
        try {

            String permissionController = getPermissionControllerPackageName();
+8 −5
Original line number Diff line number Diff line
@@ -4386,14 +4386,17 @@ public abstract class PackageManager {
    public abstract boolean shouldShowRequestPermissionRationale(@NonNull String permName);

    /**
     * Gets the string that is displayed on the button which corresponds to granting background
     * location in settings. The intended use for this is to help apps instruct users how to
     * grant a background permission by providing the string that users will see.
     * Gets the localized label that corresponds to the option in settings for granting
     * background access.
     *
     * @return the string shown on the button for granting background location
     * <p>The intended use is for apps to reference this label in its instruction for users to grant
     * a background permission.
     *
     * @return the localized label that corresponds to the settings option for granting
     * background access
     */
    @NonNull
    public CharSequence getBackgroundPermissionButtonLabel() {
    public CharSequence getBackgroundPermissionOptionLabel() {
        return "";
    }