Use ArrayList constructor directly

This is a follow up of I85a0b18d2d.

Change-Id: Ia7a642bb6e0015242d6e046019b3973226a0add2
main
Tadashi G. Takaoka 2014-04-22 14:36:38 -07:00
parent 616b84c93e
commit 965621574d
1 changed files with 1 additions and 2 deletions

View File

@ -213,8 +213,7 @@ public class DynamicGridKeyboard extends Keyboard {
if (mCachedGridKeys != null) { if (mCachedGridKeys != null) {
return mCachedGridKeys; return mCachedGridKeys;
} }
final ArrayList<Key> cachedKeys = CollectionUtils.newArrayList(mGridKeys.size()); final ArrayList<Key> cachedKeys = new ArrayList<Key>(mGridKeys);
cachedKeys.addAll(mGridKeys);
mCachedGridKeys = Collections.unmodifiableList(cachedKeys); mCachedGridKeys = Collections.unmodifiableList(cachedKeys);
return mCachedGridKeys; return mCachedGridKeys;
} }