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

Commit 27331c66 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Fix lint warnings under com.android.server.inputmethod

This is a mechanical style-fix CL with no behavior change.

Fix: 249790290
Test: prebuilts/checkstyle/checkstyle.py -f \
  frameworks/base/services/core/java/com/android/server/inputmethod/ \
  | grep ".java:"
Change-Id: I64326fa2bec0293ecf0c62e4380bafa98c694721
parent 66fa8931
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
/*
** Copyright 2016, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server.inputmethod;
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ final class InputMethodDeviceConfigs {
    private boolean mHideImeWhenNoEditorFocus;
    private final DeviceConfig.OnPropertiesChangedListener mDeviceConfigChangedListener;

    public InputMethodDeviceConfigs() {
    InputMethodDeviceConfigs() {
        mDeviceConfigChangedListener = properties -> {
            if (!DeviceConfig.NAMESPACE_INPUT_METHOD_MANAGER.equals(properties.getNamespace())) {
                return;
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ final class InputMethodMenuController {
    @Nullable
    private InputMethodDialogWindowContext mDialogWindowContext;

    public InputMethodMenuController(InputMethodManagerService service) {
    InputMethodMenuController(InputMethodManagerService service) {
        mService = service;
        mSettings = mService.mSettings;
        mSwitchingController = mService.mSwitchingController;
+3 −4
Original line number Diff line number Diff line
@@ -183,8 +183,7 @@ final class InputMethodUtils {
        return subtype != null
                ? TextUtils.concat(subtype.getDisplayName(context,
                        imi.getPackageName(), imi.getServiceInfo().applicationInfo),
                                (TextUtils.isEmpty(imiLabel) ?
                                        "" : " - " + imiLabel))
                                (TextUtils.isEmpty(imiLabel) ? "" : " - " + imiLabel))
                : imiLabel;
    }

@@ -647,8 +646,8 @@ final class InputMethodUtils {
                            List<InputMethodSubtype> implicitlyEnabledSubtypes =
                                    SubtypeUtils.getImplicitlyApplicableSubtypesLocked(mRes, imi);
                            if (implicitlyEnabledSubtypes != null) {
                                final int N = implicitlyEnabledSubtypes.size();
                                for (int i = 0; i < N; ++i) {
                                final int numSubtypes = implicitlyEnabledSubtypes.size();
                                for (int i = 0; i < numSubtypes; ++i) {
                                    final InputMethodSubtype st = implicitlyEnabledSubtypes.get(i);
                                    if (String.valueOf(st.hashCode()).equals(subtypeHashCode)) {
                                        return subtypeHashCode;
+7 −7
Original line number Diff line number Diff line
@@ -68,14 +68,14 @@ final class SubtypeUtils {
        if (locale == null) {
            return false;
        }
        final int N = imi.getSubtypeCount();
        for (int i = 0; i < N; ++i) {
        final int numSubtypes = imi.getSubtypeCount();
        for (int i = 0; i < numSubtypes; ++i) {
            final InputMethodSubtype subtype = imi.getSubtypeAt(i);
            if (checkCountry) {
                final Locale subtypeLocale = subtype.getLocaleObject();
                if (subtypeLocale == null ||
                        !TextUtils.equals(subtypeLocale.getLanguage(), locale.getLanguage()) ||
                        !TextUtils.equals(subtypeLocale.getCountry(), locale.getCountry())) {
                if (subtypeLocale == null
                        || !TextUtils.equals(subtypeLocale.getLanguage(), locale.getLanguage())
                        || !TextUtils.equals(subtypeLocale.getCountry(), locale.getCountry())) {
                    continue;
                }
            } else {
@@ -260,8 +260,8 @@ final class SubtypeUtils {
        boolean partialMatchFound = false;
        InputMethodSubtype applicableSubtype = null;
        InputMethodSubtype firstMatchedModeSubtype = null;
        final int N = subtypes.size();
        for (int i = 0; i < N; ++i) {
        final int numSubtypes = subtypes.size();
        for (int i = 0; i < numSubtypes; ++i) {
            InputMethodSubtype subtype = subtypes.get(i);
            final String subtypeLocale = subtype.getLocale();
            final String subtypeLanguage = LocaleUtils.getLanguageFromLocaleString(subtypeLocale);
+2 −2

File changed.

Contains only whitespace changes.

Loading