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

Commit 01e42a4d authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Inline InputMethodUtils#getStringForUser" into main

parents d5e50c5b bf701d44
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -330,17 +330,11 @@ final class InputMethodUtils {

        @Nullable
        private String getString(@NonNull String key, @Nullable String defaultValue) {
            return getStringForUser(key, defaultValue, mCurrentUserId);
        }

        @Nullable
        private String getStringForUser(
                @NonNull String key, @Nullable String defaultValue, @UserIdInt int userId) {
            final String result;
            if (mCopyOnWrite && mCopyOnWriteDataStore.containsKey(key)) {
                result = mCopyOnWriteDataStore.get(key);
            } else {
                result = Settings.Secure.getStringForUser(mResolver, key, userId);
                result = Settings.Secure.getStringForUser(mResolver, key, mCurrentUserId);
            }
            return result != null ? result : defaultValue;
        }