avoid crashing system serer process

Context#unregisterReceiver will throw IllegalArgumentException
if the receiver has already unregistered.

In GlobalAction class, when SilentModeAction is changed, it will
close the dialog with some delay. So there is a possibility
that it would unregistere again for the same receiver if a user
changes slient mode againand again. System must not crash in such
a case.

Change-Id: I33662feb48a770d39a8413901ec77ac1acd16bc7
Free resources in correct order in ResStringPool::uninit

mOwnedData contains the mHeader data structure

Change-Id: I0ae9ba3a0d18fc3f368c629501fadebce8807198
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
Fixed typo and space.

Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
Make transactGetSockaddr locale safe

Explicitly use Locale.US transactGetSockaddr to avoid
unexpected results in some locales.

Change-Id: If8316e543e21e133dc0c821cc390a2b55fe6fcdf
Change the text color of timer in MediaController

The color of timer and backgroud in MediaController
are too closer to distinguish.

Change-Id: Id60ecbc26233857c7ef291ef891c9d4720309dfa
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Make AudioGroup.add locale safe

Explicitly use Locale.US in AudioGroup.add to avoid
unexpected results in some locales.

Change-Id: Ifb477ca590f630747e09e38ac2246d284b5c5bfc
AsyncChannel to support remote death notification and post a
disconnect message to the source handler.

Change-Id: I7368cb466d9e33f7da8095ef2de25fc70f13d47e
Fix EventLog string class problem in onOptionMenuSelected

EventLog function can handle string,integer class and long class. (in android_util_EventLog.cpp)
If menu title string are used bold tag(like <b>test</b>), it'll be android.text.SpannedString.
In onOptionMenuSelected, it is using item.getTitleCondensed() function for writing event log.
therefore any android activity using tag menu string(like <b></b>) can be crashed by IllegalArgumentException.

I found this crash on GMS Application.
change locale chinese -> launch Google+ -> hangout -> menu key -> Invite(expressed chinese) click -> Google+ crash

Change-Id: I0437be81699925e29bf4510eb615ef2424432763
convert jint to uint32_t.

This works around a compiler bug, and is probably more
correct anyway.

Change-Id: I1c49064bd64c31dafae560e416c665de0449f245
return value of String.replace() is ignored.

Change-Id: Id7330e1ffc9f429b22f153d8e644fa7c64354173
Signed-off-by: You Kim <you.kim72@gmail.com>
Ensure running mTouchModeReset when AbsListView is detached

mTouchModeReset should be executed when AbsListView is detached from window.
If not, when the AbsListView is re-attaced to window,
the child can retain a pressed state.

You can see this problem easily when you double-touch an item of
option menu very quickly.

Change-Id: I5aaa1fd5b95847efb2f5f1b5ec7cabe8eb85b237
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Remove unnecessary locking for screen broadcasts.

The actual handling occurs in updateScreenOn() on the other side of a
handler, which acquires the lock correctly.

Change-Id: Ibd359446dba8e88f81d34f1e10a6b5e150348f89
Return error upon attempt to use non-existent APN

startUsingNetworkFeature will ignore errors from
reconnect - causing ConnectivityService to send
faulty information back to requester.

Change-Id: I4e0fcc1addd84da409cdc1eed1a95d25d925e020
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
Leak in ToneGenerator_native_setup

Failure in ToneGenerator::isInit causes a leak.
lpToneGen should be deleted.

Change-Id: I48df7a328fed01be8412d5449ee0753dad3c101f
Fix NullpointException problem in onMenuItemSelected

If both title and condensed title is null,
item.getTitleCondensed() could be return null value
in onMenuItemSelected. therefore need to check
whether retun value is null or not.

Change-Id: Ib08f52b949a794aa7bd6cc25414041e820f62969
Setting the default value for dock audio

There was no default value for parameter "dock_audio_media_enabled"
in global settings and because of that it couldn't be obtained before
Settings app first start and improper actions, such as FORCE_NONE
sending to AudioSystem instead of FORCE_ANALOG_DOCK, were taken.
This patch sets default value to 'true'.

Change-Id: Idbe343519db15f806f3a237e8b39f8420b9edde1
Signed-off-by: Dmytro Dubovyk <dmytro.dubovyk@ti.com>