Make trimToSize public

Change-Id: I2d6334ffd207262ce6258fad4b5fcc49e2700ea8