Adds documentation to CdmaCellLocation get lat/long methods

Adds better documentation to the getBaseStationLatitude() and
getBaseStationLongitude() methods to indicate the units for latitude
and longitude in CdmaCellLocation. Unlike the Android Location API
methods, latitude and longitude in CdmaCellLocation are not in decimal
degrees but instead in 0.25 seconds due to a more obscure 3GPP standard
underlying the Telephony API.  The current Javadocs on the Android
developer page (http://goo.gl/hvWo6) do not indicate the units for
latitude and longitude in CdmaCellLocation, making it very difficult
for developers to interpret the output of these methods, especially
since 0.25 seconds is not a commonly used unit for latitude and longitude
in application-level code.  This patch adds clear documentation to
these methods so developers can clearly understand the units for
latitude and longitude without having to dig through the Android
platform source code.

Change-Id: I259bfe3b68e3999804877821680fb99a22937651
Signed-off-by: Sean Barbeau <sjbarbeau@gmail.com>
Improved documentation (clarify on issue 8727)

Signed-off-by: Jacob Nordfalk <jacob.nordfalk@gmail.com>
Change-Id: I2bea866542c95eb0558004a64c9a2fd74aeff35b
ApplicationThread: Check interface before invoking scheduleLowMemory

Change-Id: I51317386e1729366d19f7e3a1747b05170b9305a
SystemServer: Looper's getMainLooper to return ServerThread

Fix to ensure Context.getMainLooper and Looper.getMainLooper
returns ServerThread for system_server. Currently, Looper's
getMainLooper returns null.

Change-Id: I5324a1cc00e27a79ba97836a9377a584e6f76b15
Fix Force Close when enable airplane mode

In GSMPhone handler for message EVENT_RADIO_OFF_OR_NOT_AVAILABLE,
the for loop was trying to remove all pending MMI code starting
from the index 0 of the ArrayList mPendingMMIs. When mPendingMMIs
has more than 1 item in the list, after the 1st one in the list was
removed, the rest in the list were shifted. The 2nd one became 1st.
Assume the list size is 2, if now the for loop goes to index 1,
access to mPendingMMIs.get(1) will result a null pointer access,
and cause a Force Close.

To fix it, make the for loop to begin with the last one in the
ArrayList mPendingMMIs.

Change-Id: I3e60086186851b1d6c10fefdb086aa0ae3e16048
Adds utility method to convert 0.25 secs to decimal degrees

This patch adds a utility method that converts latitude and longitude
in quarter seconds units to decimal degrees units.  The Telephony API
returns CDMA base station latitude and longitude in quarter seconds
due to a 3GPP telecom standard, while the Android Location API, and
the vast majority of application-level code, uses decimal degrees.

For example, to measure the distance from the user's current location
to the base station using the Location API Location.distanceBetween()
method (http://goo.gl/YjO8O), the base station lat and long would need
to be converted to decimal degrees first.

Since most application developers will likely never use lat/long information
in quarter seconds units, and instead will need this information in decimal
degrees, this utility method will frequently be used by anyone querying
base station location data from CdmaCellLocation.

Sample values to test conversion:

0.25 seconds: lat = 399491, long = -1189145
is equivalent to
decimal degrees: lat = 27.742430555555554, long = -82.57951388888888

Change-Id: If03e741f5035a37519f50d4fb2fb3e3eef2505da
Signed-off-by: Sean Barbeau <sjbarbeau@gmail.com>
DO NOT MERGE Add API for file origin policy.

Bug: 6212665

Add hidden websettings api for configuring file origin policy.

Change-Id: I261ba6369fe606ca76f87c6a00d1168b44bcf1ab
Avoid memory leak in the Shutdown confirmation dialog.

How to reproduce:
1) Lock the screen.
2) Open the Phone options menu by long pressing the power
   button.
3) Tap "Power off" to display the confirmation dialog.
4) Repeat step 2 and 3 a few times (without closing the
   confirmation dialog.

Each time the confirmation dialog is displayed, a new
instance is created. A stack of confirmation dialogs are
created on the screen.

This is fixed by making sure the previous dialog is
dismissed before launching a new dialog.

Change-Id: I6b6c61ccc56364b66eed3528019f761e75bbe268
Merge "Fix Force Close when enable airplane mode"
Merge "Avoid memory leak in the Shutdown confirmation dialog."
stagefright aacenc: Move system headers before local headers

This avoids issues with the encoder's own definition of __inline,
which conflicts with headers brought in by string.h in glibc.

Change-Id: I9e3fbf8d892529940ea67a46e67a9abe71d9c5fa
Merge "stagefright aacenc: Move system headers before local headers"
Merge "Adds documentation to CdmaCellLocation get lat/long methods"
Merge "ApplicationThread: Check interface before invoking scheduleLowMemory"
Merge "Adds utility method to convert 0.25 secs to decimal degrees"
Merge "Improved documentation (clarify on issue 8727)"
Merge "SystemServer: Looper's getMainLooper to return ServerThread"
Merge "DO NOT MERGE Add API for file origin policy."