Introduce mAffineCalibration for location calibration

The variable mAffineCalibration describes the affine transformation
that should be applied to the raw X/Y location in order to get it
into a calibrated state.

Change-Id: I5f0cd381df99fae577f230818cdb084637e13ec6
Add padding to the bottom of frame

The MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
sample rows of Y and 8 each of Cb and Cr.

The original implement of Yuv420SpToJpegEncoder::compress didn't add padding to the frame buffer
when height and width aren't aligned with 16 pixel. It will cause illegal memory violation and core dump.

Please refer to external/jpeg/libjpeg.doc

Change-Id: Iddb9d1c79716b8532de0c894e7b12d83a171a6fa
Author: Elaine Wang<elaine.wang@intel.com>
Signed-off-by: Elaine Wang<elaine.wang@intel.com>
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 47824, 18528, 19092, 19696

Conflicts:
	core/jni/android/graphics/YuvToJpegEncoder.cpp
frameworks/base: Fix for the race in Wallpaperservice

Wallpaperservice has a race among message handler of
DO_DETACH and service's onDestroy. In certain cases,
the engine kept track in mActiveEngines is removed by
message handler of DO_DETACH and service's onDestroy
doesn't get a entry in mActivieEngines and isn't able
to invoke detach. This keeps the broadcast receiver,
mReceiver active and is unregistered by the framework
and a corresponding leak is reported.

  Later, the message handler of DO_DETACH continues
and invokes detach on mEngine, which attempts to
unregister mReceiver and framework throws an exception
"Receiver not registered: android.service.wallpaper.
WallpaperService$Engine$1@40874580" and causes the
framework to reboot.

  In case of system_server, WindownManagerPolicy and
android.server.ServerThread contest for access of
shared members, mActiveEngines and mEgine. Fix is to
protect the critical section via synchronized block.

Change-Id: Ice79cb8344fb54bcc6e9f76f4b143daac2608d7b
telephony: Support for LTE/GSM mode

Add network mode LTE/GSM to preferred network type
for Metrico A-GPS test

Bug: 10139007
Change-Id: Ieebdf29c9a9c82dfd6274d6afb238ff8ad982575