Merge "Avoid allocating buffer every time getThumbnail is called." into gingerbread