Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +2 −4 Original line number Diff line number Diff line Loading @@ -130,10 +130,6 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.content.PackageMonitor; import com.android.internal.inputmethod.IInputContentUriToken; import com.android.internal.inputmethod.IInputMethodPrivilegedOperations; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import com.android.internal.inputmethod.InputMethodUtils; import com.android.internal.inputmethod.InputMethodUtils.InputMethodSettings; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; import com.android.internal.os.HandlerCaller; Loading @@ -153,6 +149,8 @@ import com.android.internal.view.InputMethodClient; import com.android.server.EventLogTags; import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import com.android.server.inputmethod.InputMethodUtils.InputMethodSettings; import com.android.server.statusbar.StatusBarManagerService; import com.android.server.wm.WindowManagerInternal; Loading core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java→services/core/java/com/android/server/inputmethod/InputMethodSubtypeSwitchingController.java +6 −8 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; package com.android.server.inputmethod; import android.annotation.Nullable; import android.content.Context; Loading @@ -27,7 +27,7 @@ import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodSubtype; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.inputmethod.InputMethodUtils.InputMethodSettings; import com.android.server.inputmethod.InputMethodUtils.InputMethodSettings; import java.util.ArrayList; import java.util.Collections; Loading @@ -41,13 +41,11 @@ import java.util.TreeMap; /** * InputMethodSubtypeSwitchingController controls the switching behavior of the subtypes. * <p> * This class is designed to be used from and only from * {@link com.android.server.InputMethodManagerService} by using * {@link com.android.server.InputMethodManagerService#mMethodMap} as a global lock. * </p> * * <p>This class is designed to be used from and only from {@link InputMethodManagerService} by * using {@link InputMethodManagerService#mMethodMap} as a global lock.</p> */ public class InputMethodSubtypeSwitchingController { final class InputMethodSubtypeSwitchingController { private static final String TAG = InputMethodSubtypeSwitchingController.class.getSimpleName(); private static final boolean DEBUG = false; private static final int NOT_A_SUBTYPE_ID = InputMethodUtils.NOT_A_SUBTYPE_ID; Loading core/java/com/android/internal/inputmethod/InputMethodUtils.java→services/core/java/com/android/server/inputmethod/InputMethodUtils.java +8 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; package com.android.server.inputmethod; import static android.view.inputmethod.InputMethodManager.CONTROL_WINDOW_IS_TEXT_EDITOR; import static android.view.inputmethod.InputMethodManager.CONTROL_WINDOW_VIEW_HAS_FOCUS; Loading Loading @@ -53,10 +53,14 @@ import java.util.List; import java.util.Locale; /** * InputMethodManagerUtils contains some static methods that provides IME informations. * This methods are supposed to be used in both the framework and the Settings application. * This class provides random static utility methods for {@link InputMethodManagerService} and its * utility classes. * * <p>This class is intentionally package-private. Utility methods here are tightly coupled with * implementation details in {@link InputMethodManagerService}. Hence this class is not suitable * for other components to directly use.</p> */ public class InputMethodUtils { final class InputMethodUtils { public static final boolean DEBUG = false; public static final int NOT_A_SUBTYPE_ID = -1; public static final String SUBTYPE_MODE_ANY = null; Loading core/java/com/android/internal/inputmethod/LocaleUtils.java→services/core/java/com/android/server/inputmethod/LocaleUtils.java +2 −7 Original line number Diff line number Diff line Loading @@ -14,9 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; import com.android.internal.annotations.VisibleForTesting; package com.android.server.inputmethod; import android.annotation.IntRange; import android.annotation.NonNull; Loading @@ -31,9 +29,7 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; public final class LocaleUtils { @VisibleForTesting final class LocaleUtils { public interface LocaleExtractor<T> { @Nullable Locale get(@Nullable T source); Loading Loading @@ -149,7 +145,6 @@ public final class LocaleUtils { * @param dest Destination into which the filtered items will be added. * @param <T> Type of the data items. */ @VisibleForTesting public static <T> void filterByLanguage( @NonNull List<T> sources, @NonNull LocaleExtractor<T> extractor, Loading core/tests/coretests/src/com/android/internal/inputmethod/InputMethodSubtypeSwitchingControllerTest.java→services/tests/servicestests/src/com/android/server/inputmethod/InputMethodSubtypeSwitchingControllerTest.java +6 −6 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; package com.android.server.inputmethod; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; Loading @@ -23,15 +23,15 @@ import static org.junit.Assert.assertTrue; import android.content.pm.ApplicationInfo; import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.ControllerImpl; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import com.android.internal.inputmethod.InputMethodUtils; import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ControllerImpl; import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +2 −4 Original line number Diff line number Diff line Loading @@ -130,10 +130,6 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.content.PackageMonitor; import com.android.internal.inputmethod.IInputContentUriToken; import com.android.internal.inputmethod.IInputMethodPrivilegedOperations; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import com.android.internal.inputmethod.InputMethodUtils; import com.android.internal.inputmethod.InputMethodUtils.InputMethodSettings; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; import com.android.internal.os.HandlerCaller; Loading @@ -153,6 +149,8 @@ import com.android.internal.view.InputMethodClient; import com.android.server.EventLogTags; import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import com.android.server.inputmethod.InputMethodUtils.InputMethodSettings; import com.android.server.statusbar.StatusBarManagerService; import com.android.server.wm.WindowManagerInternal; Loading
core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java→services/core/java/com/android/server/inputmethod/InputMethodSubtypeSwitchingController.java +6 −8 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; package com.android.server.inputmethod; import android.annotation.Nullable; import android.content.Context; Loading @@ -27,7 +27,7 @@ import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodSubtype; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.inputmethod.InputMethodUtils.InputMethodSettings; import com.android.server.inputmethod.InputMethodUtils.InputMethodSettings; import java.util.ArrayList; import java.util.Collections; Loading @@ -41,13 +41,11 @@ import java.util.TreeMap; /** * InputMethodSubtypeSwitchingController controls the switching behavior of the subtypes. * <p> * This class is designed to be used from and only from * {@link com.android.server.InputMethodManagerService} by using * {@link com.android.server.InputMethodManagerService#mMethodMap} as a global lock. * </p> * * <p>This class is designed to be used from and only from {@link InputMethodManagerService} by * using {@link InputMethodManagerService#mMethodMap} as a global lock.</p> */ public class InputMethodSubtypeSwitchingController { final class InputMethodSubtypeSwitchingController { private static final String TAG = InputMethodSubtypeSwitchingController.class.getSimpleName(); private static final boolean DEBUG = false; private static final int NOT_A_SUBTYPE_ID = InputMethodUtils.NOT_A_SUBTYPE_ID; Loading
core/java/com/android/internal/inputmethod/InputMethodUtils.java→services/core/java/com/android/server/inputmethod/InputMethodUtils.java +8 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; package com.android.server.inputmethod; import static android.view.inputmethod.InputMethodManager.CONTROL_WINDOW_IS_TEXT_EDITOR; import static android.view.inputmethod.InputMethodManager.CONTROL_WINDOW_VIEW_HAS_FOCUS; Loading Loading @@ -53,10 +53,14 @@ import java.util.List; import java.util.Locale; /** * InputMethodManagerUtils contains some static methods that provides IME informations. * This methods are supposed to be used in both the framework and the Settings application. * This class provides random static utility methods for {@link InputMethodManagerService} and its * utility classes. * * <p>This class is intentionally package-private. Utility methods here are tightly coupled with * implementation details in {@link InputMethodManagerService}. Hence this class is not suitable * for other components to directly use.</p> */ public class InputMethodUtils { final class InputMethodUtils { public static final boolean DEBUG = false; public static final int NOT_A_SUBTYPE_ID = -1; public static final String SUBTYPE_MODE_ANY = null; Loading
core/java/com/android/internal/inputmethod/LocaleUtils.java→services/core/java/com/android/server/inputmethod/LocaleUtils.java +2 −7 Original line number Diff line number Diff line Loading @@ -14,9 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; import com.android.internal.annotations.VisibleForTesting; package com.android.server.inputmethod; import android.annotation.IntRange; import android.annotation.NonNull; Loading @@ -31,9 +29,7 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; public final class LocaleUtils { @VisibleForTesting final class LocaleUtils { public interface LocaleExtractor<T> { @Nullable Locale get(@Nullable T source); Loading Loading @@ -149,7 +145,6 @@ public final class LocaleUtils { * @param dest Destination into which the filtered items will be added. * @param <T> Type of the data items. */ @VisibleForTesting public static <T> void filterByLanguage( @NonNull List<T> sources, @NonNull LocaleExtractor<T> extractor, Loading
core/tests/coretests/src/com/android/internal/inputmethod/InputMethodSubtypeSwitchingControllerTest.java→services/tests/servicestests/src/com/android/server/inputmethod/InputMethodSubtypeSwitchingControllerTest.java +6 −6 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.inputmethod; package com.android.server.inputmethod; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; Loading @@ -23,15 +23,15 @@ import static org.junit.Assert.assertTrue; import android.content.pm.ApplicationInfo; import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.ControllerImpl; import com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import com.android.internal.inputmethod.InputMethodUtils; import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ControllerImpl; import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem; import org.junit.Test; import org.junit.runner.RunWith; Loading