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
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
Merge tag 'android-4.3_r2.2' into HEAD

Android 4.3 release 2.2
Settings: Add Blacklist storage
Separate Change Encryption Password Entry (2 of 2)

This permits the use of a different (hopefully longer and more complex!) encryption password,
while using a simpler (and easier to type) lockscreen password. Resolves Android bug 29468

Requires Settings change to give a UI for this

Change-Id: I7e96024476d8eb9ebbc043853c3ed962a15e5089
SettingsProvider: Add ADB_NOTIFY key
add "Turn Wi-Fi off" action to the "open networks available" notification

Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	core/res/res/values/strings.xml
	services/java/com/android/server/WifiService.java

PS2: Adapt to 4.3 changes
PS3: Adapt more to 4.3

Change-Id: Idaed26320a2ff2e6ada448fa6deb95a76d2b86d2
SystemUI: Pull down QS if x > 70% width

From nebkat
Adapted to apply on top of 4.3 AOSP

Change-Id: Iefcd41ac382ec850a1839d3c8a5916f440874502
Framework: Forward port Power menu config
By DvTonder

Change-Id: I4836ddf43e82e254aefa3933a1e30fd652f08f90

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java

Change-Id: I6ee1b8786df1969dd8c1dc98ea3587872a01a369
Merge "SystemUI: Pull down QS if x > 70% width" into android-4.3
Merge "Framework: Forward port Power menu config By DvTonder" into android-4.3
Framework: Add Advanced reboot (2 of 2)
By DvTonder

This commit responds to a setting in Development settings for including
options in the power menu for rebooting into recovery or bootloader. It
is defauled to off.

When enabled, the Advanced reboot options will only be available once the
device is unlocked.

Change-Id: I675f31de1f82c344c7923e953fd4a6e26dd036da
Framework: Show the Advanced reboot menu only for the primary user

Change-Id: I73f82eade26f268e2b4608fa23cabcf0bb8fc862
Forward port CM Screen Security settings (Part 2 of 2)
by Robert Burns (burnsra)

Patch Set 1:	Quick Unlock
Patch Set 2:	Lockscreen Vibrate
Patch Set 3:	Slide Lock Delay
Patch Set 4:	Menu Unlock
Patch Set 5:    Rebase
Patch Set 6:    Home Unlock

Change-Id: Ibb325b092bebc0f27f187d55c0df30f4552c8dde
QuickSettings: Invert long click and click actions

Change-Id: I49acc7d3c473debd33b2491f4dde15d185f59c52
Settings: add HEADSET_CONNECT_PLAYER key

Change-Id: I1250d44fdde7f6d508ac6e49c4c6bb85c9f66233
QS: Add loading when toggling state, and longpress brightness

Change-Id: Ifa133e15259b45da4c625ce47b3f12209bcd1b94
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