@Override
    @SuppressWarnings("unchecked")
    public T acquire() {
      if (mPoolSize > 0) {
        final int lastPooledIndex = mPoolSize - 1;
        T instance = (T) mPool[lastPooledIndex];
        mPool[lastPooledIndex] = null;
        mPoolSize--;
        return instance;
      }
      return null;
    }
Creates a new instance.

@param maxPoolSize The max pool size.
@throws IllegalArgumentException If the max pool size is less than zero.
systemlib/src/main/java/android/util/Pools.java