Made a few logcat spammers STFU

Change-Id: Ic09f162211c81c025ac625ddfcabe2d2b02e1da3
Revert "fix potential memory leak"

This reverts commit bc268b9014f211910e412a7fda96b6394ff2badc

Change-Id: I07f49bd0cfecc43bc761d2b0635c9915a8e30272
Use proper AbsListView
Fix array index oob in Matrix3f.loadRotate().

https://code.google.com/p/android/issues/detail?id=42860

Change-Id: Idbf18576da3ad5b84b4209147dad34cc2f9044d2
One more fix for incorrect indices.

Change-Id: I283f2f09cd0a17eefed4a763b08df856bbae76b3
Fix potential deadlock between LockScreen and WindowManagerService

If LockScreen is enhanced using SurfaceView/GLSurfaceView,
deadlock problem between LockScreen and WindowManagerService
can occur because of IWindow.resized() callback.
And it must lead to watchdog and reset.

IWindow.resized() callback is one-way function so calling resized()
callback of a remote IWindow object is never blocked.
However, calling resized() callback of a local IWindow object
(LockScreen is running on the same system_server process)
is always blocked until resized() callback returns.
Because resized() callback of SurfaceView/GLSurfaceView can lead to
WindowManagerService.relayoutWindow() call, deadlock can occur
between relayoutWindow() and performLayoutAndPlaceSurfacesLockedInner().
(Both functions need locking mWindowMap)

So this patch simulate one-way call when calling resized() callback
of a local IWindow object.

Change-Id: I2a6a5c74ed22d8e6b7a3bea3424ff2879d227105
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
[webkit]Change the thread priority

Change the values used to dynamically modify thread priority to
improve scrolling and pinc to zoom use cases.

Change-Id: I861b3042079058fdd614390c563f23d3cab3acd9

Conflicts:
	core/java/android/webkit/WebViewCore.java
removing ineffective code in WifiService.java

no need to use wrapper class Long.
I think this looks like typo.
However, this fix will give us more space.

WifiService.class 33646 -> 33541.

Change-Id: Ia3a57285170315a9563c6ccf687424fe95ccc2df
Fix NullpointerException in MediaMetadataRetriever

According to the API documentation and the ICS implementation
the setDataSource(String) method throws an
IllegalArgumentException if path is null. In JB a
NullpointerException is thrown instead. This fix restores
the earlier behaviour.

Change-Id: Ic47baadf91076acc227d92d84f6b8d1d6ecd0c03
Remove unnecessary reference in PackageManagerService

Change-Id: I55f40b8ded69e10bb940a7c84117c5ff1b988d8e
Signed-off-by: You Kim <you.kim72@gmail.com>
Fix leak in videoEditor_renderMediaItemPreviewFrame

This change makes sure that the pString is released
even if any of the error paths are taken later.

Change-Id: I533f8254cb853767a21571cddb1c130f8efde2b4
Remove possible leak in AudioGroup.cpp

Change-Id: I4d1c16d91fe069ff9cbdc6b4f33651ee5e57fd2d
Signed-off-by: You Kim <you.kim72@gmail.com>
Fixed a leaked partial wakelock in AbstractThreadedSyncAdapter.

This fix ensures that onFinished() is always called in a syncClient
even if the application lacks the READ_SYNC_SETTINGS permission.

Change-Id: I944717e71ceae06a665f8a3b1199b41d73e12da4
Remove duplicate code in Editor.java

Eliminate duplicates by calling resumeBlink()/suspendBlink().

Change-Id: Ia19ae1bf1a5c981700aa20be67ed9d557e2bfc56
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Remove possible leak when exception occurred.

nameUtf8 is not released after exception.
In addtion, Fix code going down after ThrowException.

Change-Id: Id46e8ed55acd98e982ae532f7da2c0c48847f010
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
Free resources in correct order in ResStringPool::uninit

mOwnedData contains the mHeader data structure

Change-Id: I0ae9ba3a0d18fc3f368c629501fadebce8807198
Update thumbnail when file is updated

When a file is updated, even if it's different content but the same
file name, the thumbnail file is not updated. We need to renew the
thumbnail for another content that uses an existing file name.
"Media.MINI_THUMB_MAGIC" should be set to 0 to trigger creation/re-creation
of thumbnail in MediaProvider.

Change-Id: Iaf5a0ea0c1069a0d7b3b47ee89c2357793278c17
Re-read shortcut labels if the language has changed

The shortcut label isn't updated to the current language
if the phone's language has changed.

The problem was that the shortcut label is stored in a
static variable which is set once and kept throughout the
life time of the process.

Change-Id: I89c5875fbf28fb82e073166c472ca205d28674fb
Move NTP updates outside locks

When the ServerThread handles ACTION_SHUTDOWN intent it sometimes get
stuck on mStatsLock in NetworkStatsService.java.
0  com.android.server.net.NetworkStatsService$5.onReceive()
1  android.app.LoadedApk$ReceiverDispatcher$Args.run()
2  android.os.Handler.handleCallback()
3  android.os.Handler.dispatchMessage()
4  android.os.Looper.loop()
5  com.android.server.ServerThread.run()
This happens when the NetworkStats thread is already holding the
mStatsLock while updating NTP.
0  libcore.io.Posix.getaddrinfo()
1  libcore.io.ForwardingOs.getaddrinfo()
2  java.net.InetAddress.lookupHostByName()
3  java.net.InetAddress.getAllByNameImpl()
4  java.net.InetAddress.getByName()
5  android.net.SntpClient.requestTime()
6  android.util.NtpTrustedTime.forceRefresh()
7  com.android.server.net.NetworkStatsService.performPoll()
8  com.android.server.net.NetworkStatsService.access$100()
9  com.android.server.net.NetworkStatsService$2.onReceive()
10 android.app.LoadedApk$ReceiverDispatcher$Args.run()
11 android.os.Handler.handleCallback()
12 android.os.Handler.dispatchMessage()
13 android.os.Looper.loop()
14 android.os.HandlerThread.run()
Since the NTP update consists of several socket operations it may get
stuck long enough to trigger a System Server Watchdog even though the
socket timeout is set to 20 second.
Further, the NTP update doesn't actually need to be performed inside
the locks and an attempt to change this was made earlier, but the code
wasn't actually moved outside the locks.

Change-Id: Ib37a2b8c2d51a01adb7ff01764f82309433703f0