raise max keygaurd widgets from 5 to 20

Change-Id: If7ec6ef850cd43db2dc79e0780e48644d326999b
Fixed mistaken reference to "LTE".
Bug 7637224

Change-Id: I9c78fe6edd1182f8132cc5db9ecedbb69681b473
Fix graphics corruption caused by non-uniqueness of a resource address

Some caches(PatchCache, TextureCache, PathCache) for HWUI uses deferred
removal for their cache entries even though actual resource objects
are already freed by ResourceCache.
For this reason, the uniqueness of a resource address is not guaranteed
in specific cases. (When malloc() and free() are called very frequently,
malloc() can return the same address.)

For example, it can be possible that a cache have two cache entries
for two different resources but the same memory address.
(Of course one of the resources is already freed.)
It also can be possible mGarbage vector in PatchCache has duplicated
addresses and this can lead to duplicated free blocks in the free
block list and graphics corruption.

So this patch makes sure resource objects are freed after the resources
are removed from the caches to guarantee the uniqueness of a resource
address.

Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Fix a JNI local reference leak in MediaDrm

A reference leak was found in the subtitle usecase that also
applies to android_media_MediaDrm.cpp
(Code taken from the similar fix in android_media_MediaPlayer.cpp)

Change-Id: Icc4b25e4adc9a600ff4ac99a7a8478bb55a6e348
Enhancement for OnInfo callback on DRM Framework

In DRM framework, plugins can transmit DrmInfoEvent to Java layer.
Although DrmInfoEvent has several entries, current implementation
can only convey integer and String. This change enables plugins
uto propagate a hashmap to Java layer. The hashmap can have
one or more Strings and one byte array as value.

Changes are made by Sony Corporation.

Change-Id: Ibfb21823ce2dee8fd64c6d92291b65d821363926
Fix visibility of multiple non-fullscreen activities.

Issue detail:
Assume X, Y are non-fullscreen activities.
 a.Home starts an activity X in task A in application stack.
 b.X starts an activity Y in <task A> or <new task B>
 c.Activity X will be invisible.

How to fix:
Because the function "isActivityOverHome" means an activity is able to see home.
But there may have many non-fullscreen activities between the top non-fullscreen activity and home.
If flag "behindFullscreen" is set, those middle activities will be invisible.
So it should only take care from who is adjacent to home.
Then check two flags frontOfTask(task root) and mOnTopOfHome for constraining the condition.

Change-Id: I60bcea304976414e44835a0a38675aae365e9e19
Revert "Enhancement for OnInfo callback on DRM Framework"

This reverts commit 0f2a17157d463a080ba71f5494eb91d5f977f6f7.
Fix: Lockscreen Blur Rotation

Credits to David L.-W (David96)
https://github.com/AOSPAL/android_frameworks_base/commit/f80b748

Modifications made to address the issues noted in original commit

Change-Id: I721e7f8554433b903209da5587ac1dfcd83420cd

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Fix PhoneStatusBar taint that could cause a race condition when rotating an expanded window

Change-Id: I22c36d8bc064bc9dc8f1018449062c037e0e2cfc

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
improve code for bitmap handling in notification backgrounds

this fixes all the lazy coding in the notification background feature.
it also makes sure to not unnecessarily instantiate Display class every rotation event
and conditionally runs the background alpha method only when it's set > 0

-VanirAOSP

thanks guys

Change-Id: I89bf3c0db0336047510747a7e920a3b8d90cdbab
Re-initialize error after attach

If flag for error after attach is not reinitialized, it may cause
NullPointerException on subsequent onAttachedWindow if error text
was reset to null.

Change-Id: I8976c28a6ca71017e5c4b3f29d4eeeb2eda48c38
Close sockets on wpa_supplicant termination.

Framework does not close the sockets on supplicant
termination, leading to leakage of file descriptors.

Thus close the socket on supplicant termination.

Change-Id: I50aefc6d60b3794288564f403a42258442e224df
CRs-Fixed: 576276
frameworks/base: add app launch timeline instrumentation

Displayed Activity is often being used to measure application
launch times. However Displayed Activity only accounts for a
subset of the app launch. This additional instrumentation will
allow for more accurate measurements of applications launch
times.

Change-Id: Ic0bc6f0110c3ecbbce9eccd9357818a8a898475e
Fix memory leak in PatchCache

Patch object should be deleted when removing its corresponding
cache entry from PatchCache.

Change-Id: I8dfd7f557f6e5c6e9a9c04ba915372790e6f34f5
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Only send storage intents after boot complete

It is not possible to send a broadcast before the system
boot is completed. If you do it anyway you will get an
IllegalStateException: Cannot broadcast before boot completed.

If a memory card is inserted or removed while the phone is
booting up, there is a risk that the MountService will try to
broadcast a storage intent too early, and cause the device
to crash.

This commit removes this risk by delaying the broadcasts
until boot is completed.

Change-Id: Ied36a13d235df37c9788e45a35de40d919ae0cd0
Cursor leakage due to cancellation signal

If a query call was cancelled, the cursor adaptor might leak. The
adaptor is now closed if any exception is thrown during query.

Change-Id: Ic4c2edeaf2fcef56b4ef59484a36d3233aa12dbc
[1/3] Frameworks: Add Network Tiles & Lightbulb Tile

      Add an LTE tile and a 2G/3G mobile network tile.

      The LTE tile requires that at least one (1) of the following configs
      be present in the device's build.prop in order to show:
          telephony.lteOnCdmaDevice=1
          telephony.lteOnGsmDevice=1

      The 2G/3G tile toggles between 3G Only, 2G Only and 2G/3G.

      If LTE is turned on the 2G/3G tile is disabled (shows unknown).
      The reverse is also true, turning on the 2G/3G tile disables LTE tile.

PS1  : Network tiles (LTE & 2G/3G)
PS2-3: Clean up
PS4  : Add Lightbulb tile
PS5  : Add lightbulb icons & permissions
PS6  : Check for LTE support only after device boot completes

Linked commits:
      frameworks/opt/telephony
      packages/services/Telephony

Change-Id: Id64c061227efd557416de312c4e5972725c29e71

Conflicts:
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
Fix fatal exception due to missing looper for current thread.

While creating handler for the thread, there was fatal exception getting
thrown because the present thread does not have a looper. So passing the
applications looper to be used , while creating the handler to avoid this
exception.

Change-Id: Id2e3ed61f5691c8319eb7bc20ad970eb6758e765
(cherry picked from commit f5d1769b4357fb8d86fc31f7115b55b567a20ed1)
(cherry picked from commit d0a7c5833b90fe4d8fe8f968b53a7028720ffd8c)
Unbreak market restore SOME MORE.

Revert "enable market restore"

This reverts commit b47d3665c3d1d086fcd87d7e03a4543d6eb20999.

Change-Id: Ifaeef4391bd9be6cf5926c01f81e9b5103da8d23

Conflicts:
	packages/SettingsProvider/res/values/defaults.xml
Update expandable volume panel icon

These match the new kitkat style Settings icon used everywhere else

Change-Id: I5429e0838bb73a07e93b5ea417bff2c06c745a71