Use hostname verifier directly instead of instance DO NOT MERGE

Instead of local instance of the default HostnameVerifier, use it
directly from HttpsURLConnection. This avoids class preloading creating
an instance of it before it's necessary.

(cherry picked from commit 928ee1e48fa89302d02fdf8a8a2c7315d7195e7c)

Bug: 9984058
Change-Id: I79d8a934bfc390e4cd503fd592e21bc4e5446a7d
In isMobileOk don't execute finally if mobile data is not supported.

Move the early return outside the try {} finally so we don't call
setEnableFailFastMobileData(DctContants.DISABLED). Otherwise
referencing counting is wrong and an exception is thrown in DcTrackerBase.

Bug: 10304904
Change-Id: I5ba5121e473bada9f3daa8d6f3d3577cec8212fc
DO NOT MERGE: MDST is not ready until connected to DcTracker.

When the system becomes loaded the PhoneApp can be delayed
significantly and a call to setEnableFailFastMobileData may not
occur because the channel between the MobileDataStateTracker (MDST)
and DcTracker (DCT) is not connected.

Solution: Add a isReady to MDST and isMobileDataStateTrackerReady to
ConnectivityService and call it from isMobileOk.

Bug: 10351868
Change-Id: I92f9d58121b88186b636cd71c2fd2ef9a28f7cf6
Add support for handling mobile provisioning networks.

When a sim is new or it has expired it needs to be provisioned
with the carrier. Basically provisioning is associating a sim with
a user account. When a sim isn't provisioned then operators will
restrict access to the network and only allow certain addresses
or services to be used.

This set of changes allows two types of provisioning networks to be
recognized. The first is a network that causes all DNS lookups to be
redirected to a different address than was intended. This is exemplified
by how T-Mobile works.

The second technique uses a special apn for provisioning. An example is
AT&T where lwaactivate is the provisioning apn and broadband is the
normal apn. We first try broadband and if we are unable to connect we
try lwaactivate. When we see the activate we identify it as special and
the ApnContext.isProvisioningApn will return true.

In the future our plan is to create a new network type that can be added
to the apn list, but for now it identified by name.

Here is a list of significant changes:

 - CaptivePortalTracker now only test WiFi networks instead of all networks
 - checkMobileProvisioning checks for provisioning networks and doesn't
   try to ping.
 - IConnectivityManager.aidl changes:
   * getProvisioningOrActiveNetworkInfo was added to and used by Manage
     mobile plan in WirelessSettings so even when there is no active
     network it will still allow provisioning. Otherwise it would report
     no internet connection.
   * setSignInErrorNotificationVisible is used by both
     CaptiviePortalTracker and checkMobileProvisioning so they use the
     same code for the notifications.
   * checkMobileProvisioning was simplified to have only a timeout as
     returning the result is now harder as we abort simultaneous call
     otherwise we'd could get into loops because we now check every time
     we connect to mobile.
 - Enhanced MDST to handle the provisioning network.
 - Added CONNECTED_TO_PROVISIONING_NETWORK to NetworkInfo to make a new
   state so we don't announce to the world we're connected.
 - TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN
   is sent by the low level data connection code to notify Connectivity
   Service that a provisioning apn has connected. This allows CS to
   handle the connection differently than a normal connection.

Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
Do not change NetworkInfo.DetailedState.

I'd changed DetailedState to force ConnectivityService to treat
provisioning apn's specially. In particular so that they wouldn't
be identified they were fully connected until the provisioning
actually started. The problem is that DetailedState is a public enum
that has a CTS test and just changing the CTS to allow for the new
state (CONNECTED_TO_PROVISIONING_NETWORK) was inappropriate.

Instead I've added a new mIsConnectedToProvisioningNetwork variable
and used the DetailedState.SUSPENDED as the intermediate state.

Bug: 10620248
Change-Id: Id4a842398cad67455541ce629959351c27d83639
Do not always call setIsConnectedToProvisioningNetwork(false)

Previously I was calling setIsConnectedToProvisioningNetwork(false) always,
but all MDST's receive every broadcast. Thus we could over write an MDST's
mNetworkInfo.mIsConnectedToProvisioningNetwork to false, unless the MDST
that was set to true was last, i.e the code was order dependent.

If the provisioning networks value was false instead of true
when handleMobileProvisioningAction was called we wouldn't invoke
mdst.enableMobileProvisioning because network info would be null.

Thus the provisioning network would never transition to CONNECTED and
a default route wouldn't get setup and the browser couldn't access the
website.

Now setIsConnectedToProvisioningNetwork is only set to false when the
apnType matches and we won't indiscriminately change it and are not
order dependent.

Bug: 10853805
Change-Id: I68a4f9bdf5dc18d90f4cdef7a60811f57be67261
Implement language-specific GSUB processing

This patch allows HarfBuzz to select language-specific features based
on the language. It is a fix for bug 7004056.

Change-Id: I63f01b9580250728b900f19f357cefdeb9d36c72
Don't clip keyguard security container children (e.g. glow pad)

BUG: 11112606
Change-Id: I5145004f16dd805161e530b8836cc9c1f177427b
Layoutlib: Update the wifi icon in the status bar.

Issue: https://code.google.com/p/android/issues/detail?id=60993

Change-Id: Ia43ed40b42c79f67dcd5809b827d4fecbc823c25
add accessibility string for location quicksetting

This gives the location quick setting the same ability that all the
other quick settings have: the accessibility text can now be
different from the display text.

Bug: 11010329
Change-Id: I0dee7b6f974b4e1dc314a35e39d907e90dc8dc3c
Fix assorted FastScroller regressions

Fixes the following bugs:
- Don't show preview if text is empty, e.g. whitespace
- Avoid transitioning decor from DRAGGING to DRAGGING
- Restore original font size
- Restore thumb position adjustment for last row

BUG: 11207575
Change-Id: I72fc031d1fd22a41d81e7f52ca0856cf82d1be27
Prune unneeded density resources from APK

When a preferred density is specified, prune all but the
closest matching density when the exact density resource does not
exist.

If a preferred density resource does not exist and a higher density
resource exists, prune all but the resource with the next highest
density relative to the preferred density.

If a preferred density resource does not exist and there is no
higher density resource, prune all but the resource with the next
lowest density relative to the preferred density.

bug:11224465
Change-Id: I99b3950fe3d8116a5625968ed383442315ae8526
Fix stale data in keyguard transport control display

Make sure that caches are cleared at the right times and views have
their data populated correctly. Also fix a caching issue in
RemoteController.

Bug 11218218

Change-Id: Ieb833b5dc440ccd1b82050f12eb7059a4e0a412f
Log view root, input and looper state in bug reports.

Bug: 10948648
Change-Id: I956cce2a0fb516c02f9bbbc021f6238bcb226891
Make dump messages asynchronous.

Prevents the dump actions from being blocked by traversals.

Removed a stale comment on queueOrSendMessage and renamed it to
reflect its current implementation since it no longer has a secondary
queue.  Removed an unnecessary lock as well.

Bug: 10948648
Change-Id: Ic5fcc567212fb9cc07566c12f5f419af13c2b0b1
Clear the caller identity when dumping print system state.

bug:11251806

Change-Id: I295db22f327bc81f911cf638295415689d54fe56
Input method root view should have BOTTOM gravity.

The window had BOTTOM gravity, but the root view was using the
LinearLayout default (START | TOP), meaning an IME with a tall
inputArea could effectively push the navigation bar guard view
off screen.

This change simply uses BOTTOM instead of TOP for the root view.

Bug:11237795
Change-Id: I681c2b1eddac53589e0d168f09a183d67b1e5322
Layoutlib Create: Remove references to non-std Java classes.

Do not add the non-standard Java classes. Updates the references to all
non-standard classes to new classes in
com.android.tools.layoulib.create package. This also treats
java.lang.AutoCloseable which is part of Java 7 similarly so that we can
still run on Java 6.

Change-Id: Iac5b272652e2780c9bb72d19f415d150948ca589
Fix CalendarView to show the right month and year label.

Change-Id: I95431f1054678d4192bd1621c1f69b29268f55e9
Fix DatePicker and Calendar widget in layoutlib.

Issue: https://code.google.com/p/android/issues/detail?id=59732
Change-Id: I281b3fdad88c591281a3645592c84f3e2cb61d09