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
ApplicationThread: Check interface before invoking scheduleLowMemory

Change-Id: I51317386e1729366d19f7e3a1747b05170b9305a
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>
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
Don't let apps disable the SIM PIN entry screen.

As the user (who controls the app behaviour after all) likely doesn't
see the PIN screen as a lock screen (he likely wants telephony) and the
PIN screen is not shown on a timer-driven basis, it should be treated
specially.

Change-Id: I6b029124311f93fb3ba57efbff85bd64aadfb81a
Don't consider input restricted if keyguard is still disabled.

Change-Id: I00a351311d0933fe326bda33f5c988a6232cca16
Fix issue #13366. Take account of stackFromBottom in
computeVerticalScrollOffset().

Change-Id: I743708ef1ac05e358840f37010de36b7d0c6a346
Signed-off-by: Pieter-Jan Vandormael <ezelspinguin@gmail.com>
Bluetooth: Suppress bluetoothd connection failures while reattempting connection

On Bluetooth enable, the Bluetooth Event Loop attempts to connect to the bluetoothd-
provided BlueZ D-Bus interface.  Due to initialization order/timing, this call may
fail and the Bluetooth Event Loop will reattempt the connection (failing after a
large number of failed attempts).  This commit suppresses D-Bus connection error
logging until the attempts fail.
Bluetooth: Fix OPP connection failing at first attempt

There is a race between SDP query for RFCOMM channel and UUID_INTENT_DELAY
expiration. By increasing the delay, it allows SDP query to succeed(if it's going
to happen), resolving the problem.

CRs-fixed: 225501
Pass additional inputs when spawning apps via the Zygote and add SELinux permission checks.

When spawning an app process, the ActivityManagerService has additional information
about the app package that may be useful in setting a SELinux security context on the
process.  Extend the Process.start() interface to allow passing such information
to the Zygote spawner.  We originally considered using the existing zygoteArgs
argument, but found that those arguments are appended after the class name and
left uninterpreted by ZygoteConnection, merely passed along to the class or wrapper.
Thus we introduce a new seInfo argument for this purpose.

Modify the ZygoteConnection to interpret the new option and convey it to
forkAndSpecialize, as well as passing the nice name as a further input.
Also modify the ZygoteConnection to apply SELinux permission checks on
privileged operations.

Change-Id: I66045ffd33ca9898b1d026882bcc1c5baf3adc17
Initialize mJunkPath to false

Change-Id: Ib48bb1d91736d27f055528c3ba275237ff5ada07
Add the possibility to modify the View focus rect

This change makes it possible for a view to supply a different rectangle than
the drawing rect to be used by the FocusFinder when finding a new view to give
focus to. This is useful if e.g. the total view area is larger than the
interactive area of the view.

The default implementation of getFocusRect() will return  getDrawingRect().
The existing behaviour is only changed if getFocusRect() is overridden by a
subclass of android.view.View

Change-Id: I52dd95c6fa296b744e354217051dcec1bb3c8e92
Another case of extra ">"

Change-Id: I870af9400b49bcbe6195e9c251adf174783e3507