Add SIP User-Agent header to dialogs

Allow users of the SIP API to specify the User-Agent when using the SIP API. This allows those building applications with the API to identify their clients on the server side.

Change-Id: I65c4afb543d4f727d8d34b0e4097dc15e5060683
Signed-off-by: Justin Milam <jmilam@bandwidth.com>

Conflicts:
	voip/java/android/net/sip/SipProfile.java
	voip/java/com/android/server/sip/SipHelper.java
	voip/java/com/android/server/sip/SipSessionGroup.java
Call to equals() comparing different types

I have found this bug with the FindBugs tool

Change-Id: I99c5baf1565e51fd895778bd06757d42e959ba5d
Signed-off-by: László Dávid <laszlo.david@gmail.com>
services: Fix the bug in NFC shutdown logic

nfcOff should be checked for NFC shutdown instead of radioOff,
which is used for radio status.

Change-Id: Iafd620dc89ae8bed7855e313676527d4de32cb7c
Telephony: Introduce config item for Hot Swap support

When a Uicc Card is inserted or removed, Android pops up a prompt
to the user to reboot the device. This prompt is unnecessary if the
modem supports Hot Swapping of cards.

Introduce a new config item to indicate if the modem supports
hotswapping. Frameworks can then check this before propmting the
user.

Bug: 9661862
Change-Id: I0f2c3134525aa2301fd667d0a1819f4419eecae0
telephony: Fix typo in SignalStrength/CellSignalStrengthLte.java

getLteSignalStrenght() -> getLteSignalStrength()

Change-Id: I4288557b3c4bcb4bacfe00109f6b2d94b6301d7e
Fix 'input rotationevent' sometimes not working issue

Observers exist for both Settings.System.USER_ROTATION and
Settings.System.ACCELEROMETER_ROTATION config values, and
updateSettings() may get wrong rotation status if these two values are
set separately. Use "mLock" to protect this situation and make sure they
are set together.

Change-Id: Ic89e6f14b45ee839c518e135096ae18d27f0a809
Signed-off-by: Carton He <carton.he@marvell.com>
Add argument to binder call to check key types

Before there was only one key type supported, so we didn't need to query
a key type. Now there is DSA, EC, and RSA, so there needs to be another
argument.

(cherry picked from commit b91773bce1126d28a93f73fbef18f3a79245f24e)

Bug: 10600582
Change-Id: I5d2be3c514ff7404a90df76dc263484c5f226e6f
Fix typo - issue 57633

Removes one of the "the" words which
erroneously appeared twice in text.

Change-Id: I4304620417517bf1ca8cd2814903923b607864ef
Signed-off-by: Manuel R. Ciosici <manuelrciosici@gmail.com>
Make ActivityManagerService.systemReady thread safe

During boot of the framework, two threads execute code in
ActivityManagerService and ActivityStack, respectively. At one point
in time, the latter thread checks the internal state of the first
thread, but if for some reason that thread has stalled for an
unexpected amount of time, the state has not been updated (yet).

An example of the above is when one of the services started from
SystemServer (eg AppWidgetService) takes unexpectedly long to start.
This causes the framework to boot without broadcasting
BOOT_COMPLETED, which in turn has ramifications for the entire
system.

Change-Id: I14b5f6fcb320be01596a2e04db3f724a43f4fbe1
Don't prevent notification updates in DOS protection.

The NotificationManagerService limits the number of
notifications per package+user to 50. Once that limit is
reached, it will refuse new notifications. However, it was
also erroneously refusing updates to existing notifications.

Bug: 5821364
Change-Id: I3aa4be9ad4b288e4a22bf7a64f67521695dfb579
Introduce lookup variables for AudioFormat defaults.

Introduce new hidden public variables of what audio format, channel
out config and channel in config to use when *_DEFAULT is selected.
This lookup is later done in AudioRecord and AudioTrack.
Added handling of defaults in AudioRecord and AudioTrack
getMinBufferSize which earlier returned an error instead the buffer
size needed for the specified default(s).

Change-Id: Iaa96375838a4cf67faee61843310995e987f2d3b
hwui: Fix build in ISO C++11 mode

Make sure log calls can't be confused with C++11 string literals

Change-Id: I1d458e92e690f6f2b922a05494db8c01da54e460
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Remove ArpPeer; dead code from Google TV.

Change-Id: I595a6b6f52ab513a008e0fd861e98bc4488a1999
Telephony: fix typo

Change-Id: Ic13235744fca561cff4d49ae5c799420c30a3840
fix wrong transparent computation when background is transparent

1. when a view is set to be WILL_NOT_DRAW, it would check if the background is
null or not, to change mPrivateFlags follow rules:
    a) background is null, add the flag PFLAG_SKIP_DRAW
    b) background is valid, remove PFLAG_SKIP_DRAW and add PFLAG_ONLY_DRAWS_BACKGROUND
so when flag has PFLAG_ONLY_DRAWS_BACKGROUND, it must exclude PFLAG_SKIP_DRAW.

For transparent region computation, the function gatherTransparentRegion check
"non-PFLAG_SKIP_DRAW" case firstly, but it's wrong for PFLAG_ONLY_DRAWS_BACKGROUND
case,since it always has no PFLAG_SKIP_DRAW, it will always match the "if" part and
never go to the "else if" part, and always be taken as a non-transparent region
without checking background properties, which is wrong behavior.

So check PFLAG_SKIP_DRAW and PFLAG_ONLY_DRAWS_BACKGROUND here at the same time to
get the correct transparent computation.

2. In applyDrawableToTransparentRegion, getTransparentRegion of Drawable returns null
sometimes if subclass not implemented, so add opacity check here to make sure get the
correct transparent region.

3. Visibility change can also influence transparent region computation, so request
layout here to make sure the correct result.

Change-Id: I0978e022add002b94541b14c149ec8990e728ac7
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Reviewed-on: http://android.intel.com:8080/130698
Reviewed-by: Yao, Yong <yong.yao@intel.com>
Tested-by: Chen, HuaqiangX <huaqiangx.chen@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 120472
[BatteryStatsImpl] Avoid memory corruption due to Parcel Recycling

While processing batterystatsfile, in present code there is a race where a parcel
might be recycled while it is being written to disk in another thread.

The write process is done in 2 steps:
- write into a Parcel (memory block)
- then write this Parcel to disk using Journaled API.
The Journaled API ensures robustness against file-system issues due to power cut.
The writing is done in batch using a thread running commitPendingDataToDisk().
This function writes the parcel to disk but this parcel is a global variable
initialized by writeLocked(). If the writing takes too long time and two write
threads are launched, the parcel is freed by the second writeLocked() call;
which could cause the memory corruption.

Hence, change global Parcel variable by a Parcel parameter to commitPendingDataToDisk()
and only this function will be allowed to recycle the parcel.

Change-Id: Ifecb2dd132a75334c821df2269b974db93f9a892
Author: Pavan Kumar S <pavan.kumar.s@intel.com>
Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com>
Singed-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: 47466, 19426

Conflicts:
	core/java/com/android/internal/os/BatteryStatsImpl.java
Fix Issue 59989

Case typo in documentation for <application> tag

Signed-off-by: Paul Quei <paulquei@gmail.com>

On the page http://developer.android.com/guide/topics/manifest/application-element.html,
in the "ATTRIBUTES" section,
the heading "android:allowbackup" should be
"android:allowBackup" (ie. upper case "B").

Change-Id: I7cab16729ea2ffc653bc449009ff983a05f6e867
Telephony: Add Managed Roaming Intent.

Introduce new intent with name ACTION_MANAGED_ROAMING_IND.
This intent is used to inform "location reject" status information
to applications.

Change-Id: I30faf9b575162e7cde9b27dab5fe6e63ac1f4c1a
Delete unnecessary switchUser call

If userId doesn't change, no need to do switchuser.or it will
fastly disable and enable gps in it.For some gps modules, enable
immediately after disable won't work well.

Change-Id: I1638745677c0f8dc0ce7e4712e654cba06cdf7f7
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Add config option to control setting of CSS

Change-Id: Id397222e7a1eb082b3ffd71a056ef648c4cde18d