extmediaplayer: miscellaneous fix

Fix for issue 20936 reported by KW.

Change-Id: I512657696d99bbe64edfffa0ad7c687651a31acc
Fix memory leak in nativeDecodeFileDescriptor

Fix memory leak in nativeDecodeFileDescriptor:
SkFILEStream::kCallerRetains_Ownership is used to keep
life cycle of file in Java,so fclose is not called when
destruct SkFILEStream because ownership not belong to
native here, while when file is closed in Java, close
is called instead of fclose,that means buffer allocated
by malloc in fseek, when create SkFrontBufferedStream
with this filestream, will not be freed, because this
buffer will only be freedin fclose.
To fix this issue: duplicate this fd, and use
SkFILEStream::kCallerPasses_Ownership for SkFILEStream,
means Java and native manage file life cycle separately.
CRs-Fixed: 718738

Change-Id: I1c664551ab8d381db2e1f948a2207bc6fb7a11f9
AudioService: Fix monitorRotation for landscape applications

Current implmntation only sends rotation updates on orientation
changes, so does not handle direct 0<->180 or 90<->270 transitions.

Update rotation based on an OrientationEventListener instead of
Intent.ACTION_CONFIGURATION_CHANGED

Bug 17606902

Change-Id: I01dfcd1c587f5b2e8a96365c2389782ad77936ef

Conflicts:
	media/java/android/media/AudioService.java
lowmemorykiller: Overwrite LMK parameters for low-tier devices

LMK parameters calculated by default algorithm were not optimal for
low-tier devices. Values mentioned here were well tested and
evaluated w.r.t memory and performance for such setups.

Change-Id: I40ed92d204aae6e758028ea1e9bd4ec7226dbe2b

lowmemorykiller: fine-tune LMK parameters for low-tier devices

LMK parameters for low-tier devices are fine-tuned for better
concurrency. Values mentioned here were well tested and
evaluated w.r.t memory and performance for such setups.

Change-Id: I0d547f1ec84863bbaedb68d9aba1ff7aef057e42
Support full size application screenshots

Add optional width and height parameters for
ease of capturing entire application screenshots

Change-Id: I6d154f6b33bfb8ec90e3757a40382c1dc6feaad3