camera: remove 768x432 as a valid preview resolution

Video camera code will choose 768x432 as the preview resolution for
non-720p display devices when HD video recording resolution is selected
otherwise.

Change-Id: I5366831bf8576c8911da7f23883443178034365b
Camera: Fix CTS testPreviewPictureSizesCombination.

CRs-fixed: 346704

(cherry picked from commit 921dcbf654e2a1ac3ed585b15c917576814d87c0)
(cherry picked from commit 677870b791069b3b8e9aa347d6666e6f4c9581f5)

Change-Id: I6ec20790a8812dc2cae9933b29989a2f63450b16
msm8960-common: move recovery files to common where possible

Change-Id: I54c7afe2b541e1b24eb95c2384001c6f5d6a0758
Merge "msm8960-common: move recovery files to common where possible" into cm-10.1
Add CDMA/GSM phone debug message, mAid, mUSIM and mSetPreferredNetwork to HTC8960RIL

These three variables are not set in HTC8960RIL, causing preferred network to always revert to WCDMA preferred. (e.g. evita LTE not enabled on boot)
Add them back (like in QualcommSharedRIL), and also add missing debug message too.

Essentially port of http://review.cyanogenmod.org/#/c/22987 and http://review.cyanogenmod.org/#/c/29556/ to HTC8960RIL.

Change-Id: Iad43a300bc2dfffae201153d5009a756cebb4e32
msm8960: update headers to match kernel

Change-Id: Iff6e9513fa98cacaf77cbbe60f0da9d6603ea576
msm8960: use roboto for recovery font

Change-Id: I881a0e4ce6864d92ae5506d07987e685fc88eebd
msm8960-common: camera: enable needsEarlyVideoSize

Send video-size parameter to HAL before recording begins to ensure that
video size lines up with preview size so memory allocations line up
correctly.

Change-Id: Idf1f52a8aadaf7232bfbadb6ee6464e0ee0c7d70
Camera: Set and get proper video size key as described in the application file.

CRs-Fixed: 343259

(cherry picked from commit 98bb823f9d2171a8d9d8331bbc3aa9972598a7a5)

Change-Id: I59b8e5d28c04baf9f0b6eef512988f5f5662c505
HAL: return pretained preview buffer to surface when preview window changed or camera disconnected.

When preview is paused due to taking snapshot, preview buffer is retained.
However, if UI changes preview window or disconnect, previous preview buffer is
not valid any more, so we need to put it back. Next time when preview is
started, it will act as a clean start of preview and get preview buffer
from display.

CR-fixed: 342926

Change-Id: I45b4580fedf523264285d0179260f13127e95bc5
Camera:Preview buffer length correction in YV12 mode also.

CRs-fixed: 343289
(cherry picked from commit 0d4758953a0c925c60f5f117bef6f719daaa9de3)

Change-Id: Ifb0a39294132db806a622eafef63931eebacf3ca
Camera: Compare correct buffer size with the 4k aligned buffer size.

Preview width and height received in peview callback were incorrect,
causing mmap failures. Instead of fetching width and height in
every preview callback, stored the preview buffer size value
while preview buffer allocation.

Change-Id: I8a5387777760d0cdec514f0adec31de105956785
CRs-Fixed: 341634
HAL: fix memory leak for preview buffers

During camera hardware release, preview buffers hold during taking picture
need to return back to surface if they are not done yet.

CRs-fixed: 344896

Change-Id: I1817fb42446049276d33bf7a3fbfac80a1a9c105

Conflicts:

	QCameraHWI_Preview.cpp
Camera: Fix for ZSL/Burst mode JPEG memory leak

This change fixes the memory leaks
during ZSL/Burst mode in the omx
layer.

Change-Id: Ia6c557c7db9572cc3e6c4dabddb65c5a0bf6d189
CRs-fixed: 349015
(cherry picked from commit 17c0940805dcc3ba5840eada8a3a026c0d501136)
HAL: fix memory leak for preview buffers and add error handling

During camera hardware release, preview buffers hold during taking picture
need to return back to surface if they are not done yet.

Change-Id: I3533d43eb0aa4a9f6c0c8eb222702772eae27d1a
(cherry picked from commit 083cbdda6e88218cd7b8c4583c02ef1bae3e0bc6)
(cherry picked from commit 236c33ac4bf8ae350c4838a5168cdc2e9603d01a)
camera: Clean, write-back, cache for preview and video buffers.

Write-back preview and video buffers to main memory before they
are delivered to display and video encoder respectively.

Change-Id: I748a23a2b1ade1163d6ec09623090ad4d043a441
msm: camera: invalidate cached buffers before sending to hardware

Since the buffers are now allocated in cached mode they
need to be cache-invalidated before hardware writes new
data into them. This prevents the CPU from reading stale data
from the cache. Also, if hardware reads a CPU modified buffer, the
data needs to be cache-cleaned or written back before hardware
reads from it. An example here is gemini reading a post-processed
buffer for JPEG encoding.

Change-Id: I8b4598f7984b8292bcc7ed1cc8d7ac03dd7365a8
msm8960-common: reenable LED settings overlay

Enables the ability to use Torch through lockscreen button action

Change-Id: Iff7f6596dd712163d61f03c3d5d39fb5a43211da
msm8960-common: remove deprecated location provider packages

Remove old commented out define
New location provider packages defind in vendor/cm

Change-Id: I487b03ad730a5af0e23802d81bcfaee86c6c4c17
msm8960-common: disable gtod optimizations to fix long-press

Change-Id: I43576f940724536644904deb1bc2b235f409d2ea