Use median instead of mean for sampling border luma

Using median of the luma for all border pixels
gives a more accurate indication of dominant
background color to use during the screen
rotation animation than does using the average.

fixes: 150056201
Test: Existing tests pass
Also can visually see the change in Google
Photos app where you have a bright image on
the black background. Now background stays
as black instead of being gray.

Change-Id: I87bc87930aff48f90f271fc1783e70caf61dc7f4
3 files changed