Revert "PackageManager: Fix reconnection logic in Installer."

This reverts commit cef4012fe9e4b5283ff57bea9d5ff98ab9eb1c7e.
Merge "Revert "PackageManager: Fix reconnection logic in Installer."" into kitkat
Merge branch 'kitkat' of https://github.com/AOSPA/android_frameworks_base into kitkat

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java

Change-Id: Ia8d3f8a6100a7aafd007263000446ce8c86c03ad
Framework changes for moving applications to external volume

* Add static functions for retrieving external apps volume information
* Determine external apps volume using the 'externalApps' attribute in
  storage_list.xml
* Allow moving applications to an external volume regardless if the
  internal storage is emulated or not
* Check if app moving is disabled

Thanks to Pierre-Hugues Husson for identifying an issue causing the
SD card state to be incorrect (ie. SD card appearing unmounted when a
USB drive is unplugged)

Change-Id: I5561c2cf3f558b729c89663852173a532994a47a
UsbDebuggingManager : Handle race condition when toggling rapidly

When toggling adb enable/disable rapidly, you can have the situation where the thread's
run() gets invoked but mAdbEnabled is already set to false, hence listenToSocket() never even
gets invoked in which case mOutputStream/mSocket are both null. This patchset adds checks
around that.

Change-Id: Iba56e7409435e22d690432fa663bc0a04a1a447d
Add a HAF access permission

This is signature protected, and extremely dangerous since it
grants system GID.

Change-Id: I2528813de9341187f18ef708e7251b4e5e4003a3
PhoneWindowManager: Changes for WFD.

- WFD now sends WIFI_DISPLAY_VIDEO intent to set UI orientation.
- PhoneWindowManager to listen for WFD intents.
- Display on WFD should be same as seen on the HDMI, so set the
  orientation to HDMI orientation

Change-Id: Id4d26526a858bd302dec5fc6e699e8b01afc2709

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Add link control support

Add support for link control while sending
multiple messages.

Change-Id: I1e9009d2ba24512d03186a11a34dfddf484c2b8e
CRs-Fixed: 608922
Set empty string to the property if value is null

Issue is if the received value is null, then while
preparing complete property value for MSIM the null
value is converting to "null" string. Fix the issue
by adding null check to the received value.

Change-Id: Ib7a8ea5ce5b1341df6155ec34c25a016eb4ec667
CRs-Fixed: 622695
Add string resource for UICC storage

This will add one more string resource for the devices
which has UICC support in settings->storage option.

Change-Id: I19a5813749f51aec841769aa8d21792716d033a7
Telephony(MSIM): Avoid NullPointerException

Wifi group and Mobile group variable can be null
during SystemUI startup or onDetachWindow.

Change-Id: Ia97fef9d7ed730b78e8cd9579d6e1d002cc9082f
CRs-Fixed: 643031
Validity Period support for MO SMS in 3gpp

Add Telephony framework support for Validity Period in 3gpp
for MO SMS

Change-Id: Iee7358ca1971441f0567e428b587562294fe29bb
CRs-Fixed: 627981
Add support for default data subscription setting.

Default data subscription setting holds the default preference for data
subscription. It will be updated when user changes data preference,
sub deactivated or card removal.

Current set preferred data subscription API does not update the default
data subscription preference. This change is to handle temporary DDS switch
by apps like MMS.

New APIs to update and retrieve the default data subscription are added.

Change-Id: I495266cff2a5319c57279d9decb77d6a87bbfae8
CRs-Fixed: 642210
MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue().

The jstring "stringValue" was not never freed.
In the case where "str" was NULL the whole cleanup part (see "goto out")
was even skipped.
This patch makes getObjectPropertyValue() behave like
getObjectPropertyList().

Change-Id: I5a7ec3611036f5253a054b00064999bcd1d1c29e
appops: do not prune apps that are not present

Do not prune apps that are not currently present in the device (like sdcards ones). During
booting sdcards are not available but must not be purge from appops, because they are still
present in the android app database.
JIRA: CYAN-2811
Issue: https://jira.cyanogenmod.org/browse/CYAN-2811

Change-Id: I6680cbdf0022812b45d966dffee754399e92accb
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
reduce cookie tracking (3/4): add a way to count cookies

Change-Id: Ibc1c8d3160a89de51531a89c5103b47ba2c2c649
SystemUI: modify AOSP RU translation

Updated a string to say "Cast screen" instead of older "Wireless display"

Change-Id: I10558e36c2ee9f0e53f0de382425a3aceb52cab1
inputdevices: update from aosp (master)

Change-Id: If5fb11c354ea0144cdae1434de4c536302dda5b3
base: remove extra checks

p and p.applicationInfo are always != null (they are checked previously), so below checks
are unnecessaries

Change-Id: I155506512fe8b307f12408bbf3066c07a3504506
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>