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
MediaCodec: docs: Clarify that audio/mp4a-latm is plain AAC, not in LATM

The mime type name is unfortunate since it implies that the data
should be provided as a LATM bitstream, which it should not.

Change-Id: I3c997025342e3298729db2bfaeace9fcac001af9
Fixed the problem ime invisible status despite being the icon that appears in the statusbar.

[Reproduce the Path]
Precondition : Set "Auto-rotate screen" option to ENABLE

Calendar App lunch -> Rotate device to "Landscape" -> Touch "+" button(Add new Schedule)
-> Check the ime icons of the Status bar

Ime invisible status despite being the icon that appears in the statusbar.
Displays an icon in the status bar when the ime was actually visible state is modified to check.

Change-Id: If103ab909c5bfa6391eb51a696fb8b8f0b18808c
EthernetDataTracker: Set network available on connected

This change fixes state mismatch found in the bugs below,
and makes the code look consistent with disconnect().

In startMonitoring(), reconnect() is called before mNMService.registerObserver().
Then dhcpThread.run() could finish without getting interfaceLinkStateChanged() callback.
In such a case, mNetworkInfo has connected but not-available state - which is contradictory.

Bug: 8113933, 8291000, 8291039
Change-Id: I29d74f8d09dcffb97d6c9f8198811bca046fef0c
Bug fix for building the hover target list

lastHoverTarget should be updated even though lastHoverTarget is not null.
If not, the hover target list cannot have more than one hover target.

Change-Id: I21b49e8cbf3657321b2f1f2c20a3bdeb7f07bd48
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Properly rotate full [-pi, +pi] orientation range if available

The code currently in place assumes that orientation has a range
of [-pi/2, +pi/2] as may be found with a touch digitizer. However,
when used with a digitzer that can report the full [-pi, +pi] range
of orientations (e.g. a stylus) the calculations here are incorrect.

This patch checks if the post-rotation value is out of range for
the axis, and wraps it back around.

Change-Id: I03a22f7bf9526a5d995df1a18430d6dd24c6d6ee
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
change "next" to "done" in minute IME option under 24-hour format

We don't need "next" button under 24-hour format any more.
So, we changed from "next" button to "done" in IME option
when setting minute under 24-hour format

Change-Id: Ic9b1673248183060ba7279b63648a85dc39ca3b9
Save off the seinfo value with packages.list.

Patch adds the seinfo label per package to the file.
This is of particular interest to the run-as program
which uses the seinfo tag to correctly label the
app security context before running the shell.

Change-Id: I9d7ea47c920b1bc09a19008345ed7fd0aa426e87
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
It helps to catch the right exception.

Bug: 7238149
Change-Id: I7b60ec44d1d1d5ece8a871cb089f811b611f4a4a
Clarify the documentation of SparseArray.indexOfValue.

Bug: https://code.google.com/p/android/issues/detail?id=53297
Change-Id: I28725a2d03d4c11948bfe4fb90d730c86bf41481
Correct executable bit for source files [Take 2]

Change Ieb51bafb46c895a21d2e83696f5a901ba752b2c5 left out some
files, this fixes them.

Change-Id: Ia949a8581668836ea0251602e048f09c852f5169
Add data validation on seinfo labels.

Ensure that policy contains a clean seinfo
string. Where clean means no whitespace characters.

Change-Id: I814411cbc8d16eaed99a1389f5487529e36e617b
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Add ability to install credentials as other UID

We need the ability to install from the system UID to wifi UID
to explicitly bind WiFi credentials to the WiFi profile. This adds the
ability for Wifi Settings to invoke installation of a PKCS12 file for
the wifi UID.

Bug: 8183258
Change-Id: I652b7e6fa93deda6d6d310be33f224e5a356c787
Merge "Add data validation on seinfo labels."
Merge "Correct executable bit for source files [Take 2]"
Merge "Add ability to install credentials as other UID"
Merge "Save off the seinfo value with packages.list."
AndroidKeyStore: add Builder for param spec

Change-Id: I13403197e1ac7ac607efa10979eb73bde0135a2a
Merge "AndroidKeyStore: add Builder for param spec"