Merge "Ports second part of the chunking code from gmscore to AOSP."