From ce96959518bcc3accf30e2149c898ef9eec9c74c Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 13 Mar 2012 22:20:34 +0900 Subject: [PATCH] Avoid using interface member, use concrete collection class instead Change-Id: I8b647e8c260aec58c557ce07f3a2d8987c24d7be --- java/src/com/android/inputmethod/keyboard/Keyboard.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java index a726878c2..100550512 100644 --- a/java/src/com/android/inputmethod/keyboard/Keyboard.java +++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java @@ -309,8 +309,8 @@ public class Keyboard { private int mMaxHeightCount = 0; private int mMaxWidthCount = 0; - private final Map mHeightHistogram = new HashMap(); - private final Map mWidthHistogram = new HashMap(); + private final HashMap mHeightHistogram = new HashMap(); + private final HashMap mWidthHistogram = new HashMap(); private void clearHistogram() { mMostCommonKeyHeight = 0; @@ -322,7 +322,8 @@ public class Keyboard { mWidthHistogram.clear(); } - private static int updateHistogramCounter(Map histogram, Integer key) { + private static int updateHistogramCounter(HashMap histogram, + Integer key) { final int count = (histogram.containsKey(key) ? histogram.get(key) : 0) + 1; histogram.put(key, count); return count;