From 7025964d1230e4fc064658e1911fea9aab3def68 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Thu, 10 Dec 2015 01:04:06 -0800 Subject: [PATCH] Apply Java 7 diamond operator. This is a mechanical refactoring to apply Java 7 diamond operators in InputMethodSubtypeSwitchingController.java. Bug: 22859862 Change-Id: If80df0bcf0b1485c43d55ff51cab69c8ae211eb2 --- .../inputmethod/InputMethodSubtypeSwitchingController.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java index d0fd12516437..85cc841379cf 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())); } -- 2.11.0