Bitmapfun Sample: Change cache memory calculation to use maxMemory()

When calculating memory cache size, use Runtime.maxMemory() instead
of getMemoryClass() which is a more accurate value of available VM
heap size.

Also bump target and build SDK to 17.

Bug: 7988323
Change-Id: I4b94688b3800d958ffbe03ee9a2a620982483d3d
5 files changed