Fix for NULL pointer exception issue in
ChooseTypeAndAccountActivity.java which is causing android
runtime error which eventually blocking monkey events.

Change-Id: I36afb79eb69a5acdc4c1805dcb6b8c6434899c2e
Signed-off-by: Kiran Kumar Raparthy <krapar@codeaurora.org>
Mixed delete/delete[].

Error found via valgrind.
Fix requery behaviour of MemoryCursor.

As we can't restore the contents of the cursor window, we need to keep
it on deactivation so we can restore it on requery().

Change-Id: I06f688bbe9120c307bdc3ddbc3833416becdec82
Frameworks: N.C.

Change-Id: I7861a5eb38cfc8786e1707a30d9545188478ed35
Bugfix : Quick pulldown sometimes flips when it should not

When your Quick Settings Panel is set to

Quick pulldown : right

Sometimes (very intermittently) the tray flips (to Quick Settings) as you pull it down from the right side.

This is happening because the pull down happened so fast you can see the top 0-10 pixels of the tray,
and because it was showing the notifications, not the Quick Settiings

However the user expects the tray not to flip, but to just be on the Quck Settings.

The new code simply checks to see that the Event was a pull down event and that the event started in the top status bar.
If this is the case, then the quick panel is swapped to (without flip)

Special Thanks to my daughter Jenny fo painstakingly reproducing this bug.
KeyChain: return null instead of throw

The API documentation says it will return null if the key isn't found.
We get null back from the keystore daemon when it can't retrieve the
data, so just return null back to the API caller.

Change-Id: I42248bd50cbc5f76864bd762aae3faab1c50529d
remove some lag launching apps and improve scrolling

Change-Id: I5f14c87d261e9855ea1272a0e3964cef42361ad0
Finally fix incorrect flipping to quick settings.

Commit f6685c5ca84a42f5a47bf40827d6229dd998dee4 fixed this for the
two-finger pulldown. It reverted commit
c5e8dca7f11d3c085dd1e98692fcc21f1bcc0f6f in the process, which was
incorrect, but fixed another condition of this problem occuring
nevertheless. The actual problem the latter fix tried to fix was that
the flip decision was dependant on the timing of the view layout:
getMeasuredHeight() returned whatever was set in the last layout, which
might not have happened when hiding the view, so at the time of the next
ACTION_DOWN getMeasuredHeight() returned the height from the time the
panel was last visible.
Fix that problem by using the height scheduled for the next layout, so
we're always up-to-date.

Change-Id: Ib97f34f9aa0a6f28d48b4ec3e16c82a814cda0d0
Frameworks: just rearrange a bit

Change-Id: If947f9efc6af5c0d0ac7ce1d0786443722c148a2
DropBoxManagerService: Decrease DEFAULT_MAX_FILES 1000 to 500
Due to We don't need these a lot

Change-Id: I849b2e0081f10b7a43cb80723bb56dc13a2fcdcb
Set dreams feature disabled by Default

Change-Id: I102715c1b0376a412282031489e2040f71f0d701
BT: Fix memory leak when BT on & off done many times

Solves a memory leak in BatteryStatsService when Bluetooth
is turn on/off. Solution adds missing close of proxy then
Bluetooth is turned off.

Change-Id: I65f9db298459c7c15f6a10c752992f1d38469445
CRs-Fixed: 476145
Wifi: Fix for connection failure between third client and GC.

When third device sends a connection request to the group client, the
existing connection is terminating and also the ongoing connection not
successful.Currently as there is  no use case where third device is
connecting to GC,and the existing onnection getting terminated.This
is addressed by ignoring the new connection request from third client
to GC and the existing connection is intact.

CRs-Fixed: 467049

Change-Id: I486cab9a6286b358b6a8a9ab85b6a7c0977a8a0b
BootReceiver: Skip subdirectories inside tombstones scan

Properly handle (vendor-specific) subdirs under tombstones
directory by skipping over them.

CRs-Fixed: 407529
Change-Id: I0cecd9fa629fad35d62d508ddaf13968c2e46f93
Avoid NPE when stop() is called inside callback

stop can be called inside onMotionChange. Since that mLastAcceleration
is null and it makes NPE when mUpdateRunnable is being excuted next
time.

Change-Id: I7ed276ef63eb7fcb8fcf4dedc53eba0b13fdc539
Signed-off-by: Alan Jeon <skyisle@gmail.com>
Avoid NullPointerException in getHandler()

Change-Id: I32ddfbece78b07ce54de1560be26b5962deff9e9