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
Layoutlib Create: Find dependencies.

Usage: layoutlib_create --list-deps /path/to/layoutlib.jar

Prints:
- all classes found in the Jar and the types they use (the dependencies).
- all the dependencies missing from the Jar and what uses them.

Change-Id: I8b2674df127e1494feed7a653282e88e4d2f5494
Parcel compRequired flag correctly.

This should fix a couple of cases (e.g. SET_UP_MENU responses for Dual
SIM adapters) whether a command response would be rejected due to a
compRequired flag mismatch between the command sent to the Stk app and
the response received from it.

The problem was:
- STK service received command without compRequired flag set
- it passes it to the STK app, which sees compRequired set
- STK app passes back the response with the user selection
- STK service gets the response, which has compRequired set
- it discards the response, as the command details don't match
  (CatService.java:646)
Adding test cases for getInstalledPackages

There was an earlier fix for a case where the binder
heap would run out of space when calling the
getInstalledPackages. This could happen when there were
a lot of installed packages.

This change adds some test cases to verify that fix.

Change-Id: I8e0c5f674bf2098adcff6d40893f94162961031f
Increasing ringtone volume option (1/3)

- Extend volume preference to be able to intercept volume changes
- Add settings to provider

Change-Id: Iec36c1ea0c9cc389e0c752d74a80694d62055fd1
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
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
Rise MAX_RETRIES_ON_AUTHENTICATION_FAILURE to 4