(DO NOT MERGE) Fix pub issue #58043: Copy crash in Android 4.3...

...when clipboard listener attached

We need to clear the calling identity before dispatching change
notifications.  Also make this more robust, so that in the face
of any failure we will clean up the broadcast state.

Integrated from master.

Change-Id: I05e1f76ffd486439535631fe4062dabe94bd2ccf
Allow the user to block notifications for foreground services.

Stepping carefully around the fix in change Idc788527, we
perform security (and AppOps, and therefore user block)
checks against the uid passed to enqueueNotificationInternal
rather than the Binder caller.

Bug: 9502541
Change-Id: I91745db92823381df75721c1b8f11013a7fa4ecc
Add version identifier to app ops.

All old versions drop their modes except for the notification op
(which is the only one there is currently a user-visible control for).

Change-Id: I9e09cebe63e9ea81f2adc01aef7d1a5a59f57a56
Revert "Add version identifier to app ops."

This reverts commit 483a6bbfc118409b9c46b226cf0aa6afdc4d9159.

Change-Id: I91d6b8b8d1789089bf9764e734f7fe59d03151a2
Add new app ops method to reset all op modes.

Change-Id: I5ee6764de8dc31d812e5a788914ab0099bbef4c0
Fix issue #10226007: Reset apps restores most of the changed settings...

...to original but not all modified ones

Very stupid mistakes in messing up the iteration when pruning op
entries.

Change-Id: Ie536b9095f797fcd2b86c9a386a72746796430d1
add back Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event

Thanks Winner00...I am an idiot lol merge in native broke it due it got lost

This reverts commit e93b821209613952e34b181b8544ff8304e72e39.

Change-Id: I3e2b6ba209a894f7fd467f682dc0d922f4a661fc
Change kill message
Lower back to kill time
Faster glow time
Tweak LTE signal bars
Use hostname verifier directly instead of instance DO NOT MERGE

Instead of local instance of the default HostnameVerifier, use it
directly from HttpsURLConnection. This avoids class preloading creating
an instance of it before it's necessary.

(cherry picked from commit 928ee1e48fa89302d02fdf8a8a2c7315d7195e7c)

Bug: 9984058
Change-Id: I79d8a934bfc390e4cd503fd592e21bc4e5446a7d
Change back to kill message....again
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
frameworks/base: vectorize Bitmap operations

Enable gcc vectorizing optimizations for Bitmap operations within
libandroid_runtime.so.  Adds -ftree-vectorize -mvectorize-with-neon-quad
-fprefetch-loop-arrays to functions and compiles Bitmap.cpp in ARM mode
(necessary to enable vectorizing optimizations) for appropriate targets.

Change-Id: I12defef6f47adf41af849df6e750097f5906d92d

Conflicts:
	core/jni/Android.mk
Vectorize bitmap operations on A15 too

 * Commit a2e20761b5ad646ce3f08ed24995799dd81acee0 enables GCC
   vectorization for bitmap operations on Krait. Enable it on A15 also.

Change-Id: I1f733f5311376deb78782931ea2b83a8d12c2171
Generalize vectorization of Bitmap operation

 * All NEON-capable processors can support this.

Change-Id: I13d448e5864ea804f66cd1bbb93360cb8c0f0806

Conflicts:
	core/jni/Android.mk