Make incoming call screen style configurable (1/3)

Change-Id: I12e108e11afcc87cd0ed717dbc6f8a2a2c0f1743

Conflicts:
	core/java/android/provider/Settings.java
Add NULL pointer check for canvas in GLES20RenderLayer

The canvas member in GLES20RenderLayer is possibly NULL
when some lower level OpenGL API leads to some error.
Such error includes something like insufficient memory
for texture creation. Once the NULL pointer of
canvas is encountered in start API, it should be
correctly detected. A NULL pointer is returned by
start API to indicate failure of canvas creation,
which should be further processed by callers.

Change-Id: Iddfdda0f577a4a01fc0e729b12ccffa4479e60ae
Signed-off-by: Allen Shen <ashen@nvidia.com>
[HWUI] Infinite recursion in PathTessellator::recursiveQuadraticBezierVertices()

Symptom: In some cases like the distance between the calculating point is very
         small, the recursion may not terminate.
         If the calculated dx and dy are 0, d is 0 too. Then the termination
         condition(d*d < TH*TH*(dx*dx*sq + dy*dy*sq)) will never be met.
         Infinite recursion will cause stack-overflow.

Solution: We added one more threshold to terminate the recursion when d is very
          small (possibly 0).

Change-Id: I7d27a72811109766766f8f8cc5d8d88e75db7f60
Optimize drawBitmapMesh using TRIANGLE_STRIP

Draw BitmapMesh using STRIP instead of TRIANGLES.
Depending on where the bottleneck is located in the pipeline,
there is a potential for saving two-thirds of the time spent rendering.
The speedup is due to avoiding redundant operations,
i.e., mapping each vertex four times to texture and color attribute,
sending each vertex twice to the GPU, vertex processing of GPU ...

In this patch:
1. Refactoring mesh using Strip.
2. Batch triangles by adding extra vertexs at the start and end of rows.
3. Optimize computing positions of texture and color attribute.

Benchmark: Drawing Bitmap(1152x768 px) with 200x200 meshes
Performance: ~46% improvements (from 26.4 fps to 38.7 fps)
Memory: Reduce 80800 vertices with xy, uv, rgba data.

Change-Id: I08c5c20d981d88528ce7b02012feefae468d6ec4
Signed-off-by: kui.zheng <kui.zheng@arm.com>
Wifi: Fix 2 ip addresses issue

Invoking the function clearInterfaceAddresses to clear
the initial IP first when change the "IP Settings"
for the select AP.

Change-Id: I38f6614e66cc3cf8d84e03c19d2d4badb1b16108
CRs-Fixed: 683307
Framework: add the scan_id parameter of the command SCAN

if a hidden AP is disabled by framework, wpa_supplicant will never
scan it, so add this parameter to tell wpa_supplicant to scan it.
This parameter contain all ID that should be scan.

CRs-Fixed: 685236
Change-Id: I1a70b2641eff0d1af78b09eeabb0ac84f115d8c6
HOVER: Fix status bar icon size

Thanks to Lo Huot

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I59d7a0d8712a5d0f7aa3dc12d9bc3e9884f69f98
ProximityWake : Add support for checking proximity when waking device

Change-Id: Ia5ff446d88435773acccc7467e66009000dc20cb

Conflicts:
	core/java/android/os/IPowerManager.aidl
	core/java/android/provider/Settings.java
	services/java/com/android/server/power/PowerManagerService.java
Framework : Fix proximity wakeup reference

Change-Id: Ia40ca6fbf6e37fbb3996f2384f725c30b88c2131
Themes: Whitelist animations

Change-Id: I981a8e4741cf03d8649bc4828e597d1a7035e080
Load original drawable if cached icon throws NotFoundException

If for some reason we get a NotFoundException while trying to retrieve
a cached icon we will attempt to load the original.

Change-Id: I36a708d3e653fed12e88fe93c6d0a7f8e46726c9
WallpaperCropper: fix lockscreen wallpaper "Set wallpaper" string

The string is wrong and does not reflect the correct action the user is
about to apply.

Change-Id: I91eba87a38546563d6cf88138a0ed07219ec794f
Signed-off-by: Roman Birg <roman@cyngn.com>
Be sure to shutdown the proximity sensor after display wake

This fixes:
http://review.cyanogenmod.org/#/c/66657/

Change-Id: I1768f13cb48c3e056d0e137642690fc3d650c4ab
InputWrapper: opt out early if session == null

Change-Id: If111195ba6425ad6b8663601566f9f260738ec77
Restore untrusted glStencilMask value on resume after functor

Fixes an issue where the stencil buffer is corrupted
(used in overdraw debugging, path clipping) when used in
conjunction with a HW accelerated WebView.

bug:15023700
bug:16465551

Change-Id: If201b503931380f7107a34e9a9a2f877a50f72b1
[Bitmap] Add null pointer protection in Bitmap_sameAs()

Symptom: SkBitmap::getAddr(int, int) may return NULL due to unrecognized config
(ex: kRLE_Index8_Config). This will cause memcmp method to crash. Since bm0 and
bm1 both have pixel data() (have passed NULL == getPixels() check), those 2
bitmaps should be valid (only unrecognized), we return JNI_FALSE to warn user
those 2 unrecognized config bitmaps may be different.

Change-Id: I6970c27de412110a3035d0a783112c4cd3ebc35b
Don't assume languages are 2 letter codes.

Also, note that this method never worked. Locale
settings were stored with underscores (like Locale.toString)
but matched against AssetManager.getLocales() which
returned language-tag like output.

bug: 10090157
Change-Id: I36ffea6e39ff7d1907b2787f8fd4545c24d326a8
Add new Card Unavailable reason for SIM power down in APM.

REASON_APM_SIM_POWER_DOWN value added to CardUnavailableReason enum.
This is to indicate card absent event received when SIM is powered
down in APM.

Change-Id: I985e06d629715ebc0489a2fb19e908ab652bfeeb
CRs-Fixed: 661325
Filter spam notifications

Change-Id: Ibf2377cd7491c7e0e9e9c9657e9e65eef1876ee3
Automatic translation import

Change-Id: I0edfeab43d64a29fef069702d542ebd6540075bb