diff --git a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java index d0fd125164371..85cc841379cfb 100644 --- a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java +++ b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java @@ -175,7 +175,7 @@ public class InputMethodSubtypeSwitchingController { } private final TreeMap> mSortedImmis = - new TreeMap>( + new TreeMap<>( new Comparator() { @Override public int compare(InputMethodInfo imi1, InputMethodInfo imi2) { @@ -194,8 +194,7 @@ public class InputMethodSubtypeSwitchingController { public List getSortedInputMethodAndSubtypeList( boolean includeAuxiliarySubtypes, boolean isScreenLocked) { - final ArrayList imList = - new ArrayList(); + final ArrayList imList = new ArrayList<>(); final HashMap> immis = mSettings.getExplicitlyOrImplicitlyEnabledInputMethodsAndSubtypeListLocked( mContext); @@ -215,7 +214,7 @@ public class InputMethodSubtypeSwitchingController { continue; } List explicitlyOrImplicitlyEnabledSubtypeList = immis.get(imi); - HashSet enabledSubtypeSet = new HashSet(); + HashSet enabledSubtypeSet = new HashSet<>(); for (InputMethodSubtype subtype : explicitlyOrImplicitlyEnabledSubtypeList) { enabledSubtypeSet.add(String.valueOf(subtype.hashCode())); }