Merge "Use ArrayList constructor directly"

main
Tadashi G. Takaoka 2014-04-22 21:54:00 +00:00 committed by Android (Google) Code Review
commit 5179608e19
1 changed files with 1 additions and 2 deletions

View File

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