TextToSpeech memory leak

The callback object needs to be out of the class so that it won't
get a strong reference on the TextToSpeech object because it leads
to a memory leak due to the fact that the callback's lifecycle is
linked to the server and not to the TextToSpeech and then, keeps it
from being GCed.

Change-Id: I9cd5c7726d7cf2f60d6e25cc5caa87ad825e8f83
Author: Jean-Christophe PINCE <jean-christophe.pince@intel.com>
Signed-off-by: Jean-Christophe PINCE <jean-christophe.pince@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: 57869
Update the JNI spec link, and remove a dead link.

Also remove the duplicate copy of this file. There's a redirect in place
from the old location.

Bug: http://code.google.com/p/android/issues/detail?id=41623
Change-Id: I521b640fdef17c98582171d97214486d16e774e4
NsdService: Clear client info after resolution request is serviced.

Currently, the client requests tracked in mClientIds for resolution
requests isn't cleared at all and causes failues of additional registration
and discovery requests once the number of requests reaches MAX_LIMIT. In
addition, bubble up unhandled native events to default state of nsd state
machine.

Change-Id: Ief14e0fff644aa2698fcddd71f538820f802be58
Set "isdrm" info in Mediastore

The mediascanner member mIsDrm was never set
according to the drmframework canHandle call.
This subsequently caused that the isdrm column
in mediastore was never set, and was defaulted
to false for all files.
mIsDrm is now set according to drmframework
canHandle result for each files that is scanned.

Change-Id: Id557d921c4e3e3dfc35da56b69471f4bd6b3c8bf
Handle errors from AudioEffect::queryNumberEffects

There may be cases where queryNumberEffects fails leading
to the usage of the uninitialized numEffects.

Change-Id: If6d46987021ff6f0c9a2123d8714ff5fdf9ced45
Fix starting window memory leak

If starting window is added to arrays like mViews in
WindowManagerImpl.java, but not accepted by WindowManagerService,
we leak starting windows. To avoid leaking, remove the view
from WindowManager.

Change-Id: I4d98b883e9dfaf5e71bdece385643ba1b59b2633