libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc

Applies GRALLOC_USAGE_ALLOC_MASK to the incoming usage bits before
calling alloc on the gralloc module. This filters out the new flag
GRALLOC_USAGE_FOREIGN_BUFFERS, which is used to send a hint to the
producer, but which does not affect the allocation of buffers.

Bug: 19801661
Change-Id: Ia37a3eddba2e97598e50ac3e10877430adfa9247
(cherry picked from commit b8efdc40039e4900ae2c64fbdfa03906c867ec84)
1 file changed