Framework/base: Added synchronization block to avoid race condition

Fix for the synchronization issue leading to access of an array
Index out of bounds. Issue occurs due to race condition between
removing the activities of a crashed process from history stack
and resuming a separate activity.

Change-Id: I14bb5834e778c15b674248e46fe93b0ce9f37967
Fix CalendarView to show the month title properly.

Step to reproduce:
Do this test on a Tablet (i.e. do in multi-pane layout)
1. Settings > Date & time > Uncheck the Automatic date & time checkbox.
2. Select 'Set date' and set the month to January and Done.
3. Re-select 'Set date' then you will find no month title just above the calendar.

Change-Id: I2489b454a4526be13f1fbdc61a72edcd6b6942a0
Fix documentation of requestCode parameter.

It's not correct to state requestCode is 'currently not used'. It can be
used to differentiate multiple PendingIntents since a number of Android
versions now. Also, the introduction block of the PendingIntent
documentation explicitly states this as a possible use:
"If you truly need multiple distinct PendingIntent objects active at the same
time [...], then you will need to ensure there is something that is different
about them to associate them with different PendingIntents. This may be
any of the Intent attributes considered by Intent.filterEquals, or
different request code integers supplied [...]"

So fix the documentation inconsistency to make the possible use
immediately clear.

Change-Id: Ia65d7a5ab12c2c3ee1aa1c5107e5ea8fd937b765
Fix wrong log information in DevicePolicyManagerService

When user reset password their password,
if password doesn't match target quality of device,
DPM print a log why can't reset password.
however log message isn't correct information.
in log context, it have to exist current quality
and target quality. this patch can help print correct log.

Change-Id: I5c8fb1c77ddbe1bdbc76e35038c897e2e8efb077
Avoid IllegalArgumentException in Preference.java compareTo()

In some situations the collection.sort() algoritm fails in compareTo()
with a: java.lang.IllegalArgumentException: Comparison method violates
its general contract!, due to a more strict validation of the compare
contract.
This strict validation was introduced in java 1.7.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6804124
This fix should prevent the sorting from crashing.

Change-Id: I64230e7f62f83c99d7a6274964bb2988ae843826
Don't include flags in configuration change if their value hasn't changed.

This makes the check in updateFrom() match the logic in diff().

Change-Id: I3ab4e8460f7fbf985ef55b9514a8aa90d401d486
Fix SELinux get.. methods aborting on invalid address

SELinux get.. JNI need the 'security_context_t tmp' entries set
to NULL, otherwise on error freecon() tries to release uninitialised
memory causing apps to abort with invalid address.
Also fixed getPeerCon ALOGV call as this caused Zyote to abort when
verbose logging set.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Merge "Fix SELinux get.. methods aborting on invalid address"
Update tethering profile for specific operators

Update or add tethering profiles in config.xml.
And also add MOBILE_DUN to config_tether_upstream_types

FR-ORG,SFR
ES-VDF,ORG,Movistar
IT-VDF,TIM
GR-VDF
US-TMO
CA-Rogers,Fido
Isreal-ORG,PC HOT Mobile
HK-CSL,Hutchison
AU-Telstra

Change-Id: Ic3501263679785362bc50a5a4ea3751e7f0c7b21
Signed-off-by: Seonju Oh <seonju.oh@lge.com>
Signed-off-by: Sungmin Choi <sungmin.choi@lge.com>
Merge "Update tethering profile for specific operators"
Merge "Framework/base: Added synchronization block to avoid race condition"
Merge "Fix documentation of requestCode parameter."
Merge "Don't include flags in configuration change if their value hasn't changed."
Merge "Fix CalendarView to show the month title properly."
Merge "Avoid IllegalArgumentException in Preference.java compareTo()"
Merge "Fix wrong log information in DevicePolicyManagerService"
Merge branch 'master' of https://android.googlesource.com/platform/frameworks/base