StorageManager: fix android.process.media process stop while plug a discontinuous partitioned SD Card

While get volume state, throw an IllegalArgumentException, catch
this exception in StorageManager and return null to MtpService to
avoid process stoping.

Change-Id: Iebb5c38e375d3f54505d9b9d64fcd0f02a2b60c1
Author: Li Gang <gang.g.li@intel.com>
Signed-off-by: Li Gang <gang.g.li@intel.com>
Signed-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: 47459
Fix appwidgets not updating

Previously there was a bug where if an appwidget's update caused a
TransactionTooLargeException then the AppWidgetServiceImpl.Host's
callbacks were completely disabled, for all widgets.

The fix still allows a DeadObjectException or other RemoteException
to disable the host callbacks, as that would be caused by a bad host.

Fixes issue 28216 on the public tracker
https://code.google.com/p/android/issues/detail?id=28216

Change-Id: I5c5d5939d7211ed23cca69e6674de730b51b0f3e
Signed-off-by: Kevin Barry <kevin@teslacoilsw.com>
Fix Fix Fix
Fix Fix Fix
ActivityManager: memoize for performance

isHighEndGfx and isLargeRam are frequently called upon.. isLargeRam very
frequently within the ActivityStack. these aren't going to change after
they're calculated the first time so subject them to a basic memoization.
FTW.

Change-Id: I176089f99ac6c6e4074cb2fde502c729986ea701
Fix DataInputStream leaks

Fix fixes
-In viewstateserializer, try to close before throwing or returning, and throw early if inputstream is null
-other stuff

Change-Id: I7f3b16057582566b82a85841829ff6ed11cd570e
potential GraphRunner leak in camera effects

if the camera FCs while recording effects.. *poof* a tiny leak is born.
so.. we close mRunner onDestroy.

Change-Id: I6a7983f120a03137f545a3cd9bb07ff51a9cd2d7
The VM handles blocking SIGPIPE.

We don't need this any more.

Bug: 10211309
Change-Id: I8be0071d50296974e3861f8af9d2bae4f5678d5a
activity manager tweak-a-roonie

Change-Id: Ic511257e8154610288019c52fb41cc6bf551ebd3
fix cursor leaks in F_B

my previous commit was submitted before i was finished.  Here is an updated version.

PS2: missing bracket

Change-Id: I9d8048e49695cdac7ded086cd49ee6eb99e518cc
Use scaled font size for no recent apps text

Change-Id: Ib200928db09bcdd6661de5e450e2fc9c1b5566cf
SystemUI: Fix missing top task in recent panel.

If preloadRecentTasksList was not called or was called too
late and RecentsActivty already started and last top activity has
excludeFromRecents flag setted it might be missing
from recent application list.

Change-Id: Idf7153824805ceea9fcaf04ac645b73a5e93a4d9
SystemUI: Add missing recycle calls (fix lint warning)

Change-Id: Ic3462ceb8d85e4ec2aee833d4327c4b81f5eac5a
Missing break in switch statement

Change-Id: I1b7e7a94df8d39e162050911e31e510d2ce5447e
Fix to NullPointerException when activity is relaunched

When ChooseTypeAndAccountActivity is relaunched and resumed
by ActivityManager a call is made to onActivityResult without
first triggering onResume. This leads to mAccounts object
still being null.

Fixed by properly setting mAccounts object if it is null prior
to use after function onCreate has been called.

Change-Id: Ife7e1e052c473970d923fa43ee6189eb62a1113b
Fix for NullPointerException in HTML5VideoViewProxy

There is a missing null check of mHTML5VideoView.

Change-Id: Ic49ad02703717c3b76da4371e80abfdebff90873
Treat default value that wasn't found as empty value.

Fixes http://code.google.com/p/android/issues/detail?id=33220

Change-Id: If22e8b245f688d922c168aa54c8acf743c0644d7
GC triggering performance optimizations

Credits to team CM.

Change-Id: Id491a095f2faaf1e05fb44525063254bcff0a2bc