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

Commit 80cfdd10 authored by Curtis Belmonte's avatar Curtis Belmonte Committed by Android (Google) Code Review
Browse files

Merge "Don't attempt caching for BiometricManager.Strings" into sc-dev

parents a3d48ea4 8858de44
Loading
Loading
Loading
Loading
+18 −31
Original line number Diff line number Diff line
@@ -223,10 +223,6 @@ public class BiometricManager {
        @NonNull private final IAuthService mService;
        @Authenticators.Types int mAuthenticators;

        @Nullable CharSequence mButtonLabel;
        @Nullable CharSequence mPromptMessage;
        @Nullable CharSequence mSettingName;

        private Strings(@NonNull Context context, @NonNull IAuthService service,
                @Authenticators.Types int authenticators) {
            mContext = context;
@@ -259,17 +255,14 @@ public class BiometricManager {
        @RequiresPermission(USE_BIOMETRIC)
        @Nullable
        public CharSequence getButtonLabel() {
            if (mButtonLabel == null) {
            final int userId = mContext.getUserId();
            final String opPackageName = mContext.getOpPackageName();
            try {
                    mButtonLabel = mService.getButtonLabel(userId, opPackageName, mAuthenticators);
                return mService.getButtonLabel(userId, opPackageName, mAuthenticators);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
        }
            return mButtonLabel;
        }

        /**
         * Provides a localized string that can be shown while the user is authenticating with
@@ -296,7 +289,6 @@ public class BiometricManager {
        @RequiresPermission(USE_BIOMETRIC)
        @Nullable
        public CharSequence getPromptMessage() {
            if (mPromptMessage == null) {
            final int userId = mContext.getUserId();
            final String opPackageName = mContext.getOpPackageName();
            try {
@@ -305,8 +297,6 @@ public class BiometricManager {
                throw e.rethrowFromSystemServer();
            }
        }
            return mPromptMessage;
        }

        /**
         * Provides a localized string that can be shown as the title for an app setting that
@@ -335,7 +325,6 @@ public class BiometricManager {
        @RequiresPermission(USE_BIOMETRIC)
        @Nullable
        public CharSequence getSettingName() {
            if (mSettingName == null) {
            final int userId = mContext.getUserId();
            final String opPackageName = mContext.getOpPackageName();
            try {
@@ -344,8 +333,6 @@ public class BiometricManager {
                throw e.rethrowFromSystemServer();
            }
        }
            return mSettingName;
        }
    }

    @NonNull private final Context mContext;