Merge "Avoid using interface member, use concrete collection class instead"
This commit is contained in:
commit
82793f2f85
1 changed files with 4 additions and 3 deletions
|
@ -316,8 +316,8 @@ public class Keyboard {
|
||||||
|
|
||||||
private int mMaxHeightCount = 0;
|
private int mMaxHeightCount = 0;
|
||||||
private int mMaxWidthCount = 0;
|
private int mMaxWidthCount = 0;
|
||||||
private final Map<Integer, Integer> mHeightHistogram = new HashMap<Integer, Integer>();
|
private final HashMap<Integer, Integer> mHeightHistogram = new HashMap<Integer, Integer>();
|
||||||
private final Map<Integer, Integer> mWidthHistogram = new HashMap<Integer, Integer>();
|
private final HashMap<Integer, Integer> mWidthHistogram = new HashMap<Integer, Integer>();
|
||||||
|
|
||||||
private void clearHistogram() {
|
private void clearHistogram() {
|
||||||
mMostCommonKeyHeight = 0;
|
mMostCommonKeyHeight = 0;
|
||||||
|
@ -329,7 +329,8 @@ public class Keyboard {
|
||||||
mWidthHistogram.clear();
|
mWidthHistogram.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int updateHistogramCounter(Map<Integer, Integer> histogram, Integer key) {
|
private static int updateHistogramCounter(HashMap<Integer, Integer> histogram,
|
||||||
|
Integer key) {
|
||||||
final int count = (histogram.containsKey(key) ? histogram.get(key) : 0) + 1;
|
final int count = (histogram.containsKey(key) ? histogram.get(key) : 0) + 1;
|
||||||
histogram.put(key, count);
|
histogram.put(key, count);
|
||||||
return count;
|
return count;
|
||||||
|
|
Loading…
Reference in a new issue