SUPL early data connection fix

if GPS started before data connection is alive, SUPL will be broken for entire power cycle.

Change-Id: I0486ac5e62a2d4a7da14506e3dd8e78da42f405d
PackageManager: fix app lib migration for device with /datadata

For devices using /datadata, dataPathString will point
to /datadata while nativeLibraryDir will point to /data/data.
Thus, compare to /data/data directly to avoid problems.

Change-Id: I11149cf9cc5a573cc85513e12d3569b514f5ffb5
Add support for allow-permission extension.
This will grant a sharedUserId arbitrary permissions as defined by XML files
in /system/etc/permissions.

Change-Id: I4c0be56173b89621c4cc7ae589715a030931e8d5
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>
PackageManagerService: Fix silly derp after 4.4.3 merge

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Updating ActivityIntentResolver so that queryIntents doesn't return protected applications.

Any calls from System UID(1000) are not filtered

Change-Id: I037cddaf91b6943b8cc837c5b046cf320c4caa5f
Bringup NSRM(network socket request manager).

NSRM is a feature to synchronize app socket requests
to reduce network signalling and there by save some power.

Change-Id: I6f23cc17e29e7ce12a138c747765e6bab8c126d9
Keep keyboard lit until the screen is dimmed

Do not use button timeout for keyboard (which is intrusive on QWERTY
sliders). Keep it lit until the screen dims instead of turning it off
like the buttons after 5 seconds. Also consider setting keyboard
visibility as a user activity.

Conflicts:
	services/java/com/android/server/power/PowerManagerService.java
Enable power menu advanced reboot by default
Fix for default USB debugging in eng builds.

* Start adbd on first launch and accept all connections for eng
* Start adbd on first launch and prompt for userdebug
* Do not start adbd for user.

Change-Id: I26d1ef1bb208cec79d45687aea833a1b3e076b83
wlan: Fix to handle the failure status on supplicant start.

WiFiController shall enter in to StaEnabledState state after the
request to start supplicant irrespective of status being success
or failure.Thus,any new attempts to turn on Wi-Fi later shall
fail as the controller statemachine is expected to be in
APStaDisabledState to start Wi-Fi.
Thus , start the supplicant on a command CMD_WIFI_TOGGLED in the
StaEnabledState if the current WiFi state is neither
WIFI_STATE_ENABLING nor WIFI_STATE_ENABLED.

Change-Id: If4c4913b608411bac334f9c201441aaf36d7675b
CRs-Fixed: 570305
Wifi: Add IBSS supported method

Add method isIbssSupported() to WifiManager and related classes to query wether
the driver supports IBSS mode. The query is answered by wpa_supplicants new
command "get_capability modes".

It will only return a correct result after WIFI_STATE_ENABLED has been
reached.

Change-Id: I93aa2fdff94cd897c91ec3beb7e58940d1de7b72

Conflicts:
	wifi/java/android/net/wifi/WifiStateMachine.java
Wifi: Get the list of supported channels

Get the list of supported channels/frequencies from wpa_supplicant and provide
them thru WifiManager.getSupportedChannels();

One channel is represented thru the class WifiChannel which includes channel
number, frequency in MHz and a flag if IBSS mode is allowed on this channel.

Like isIbssSupported() we can only expect a result after WIFI_STATE_ENABLED has
been reached.

Change-Id: I9fc34642b9a0047f6871b180a3a7a69d47b7e2ff
Session: Add a shortcut in detecting if a window that contains the wallpaper is null or not

originally, a null window would be detected in WindowManagerService, an exception would be thrown, and then that would be caught in Session

Change-Id: Ib937d029bb7a27dac15ff38ecf3b4fbb51bc417c
transition animation scale tweak
Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java
Fix calculation of next DateChangedEvent time

Calendar.HOUR indicates the hour of the morning or afternoon. In the
morning this is no problem, but if this method is called after noon, it
will schedule the alarm for 12:00 the next day instead of 00:00.

Change-Id: Ibce239a6c7a41df85cf0c6ca3f45871a581eb7d9
alarm: add JNI interface for clearing alarm

Add the JNI for clearing cancelled alarm, otherwise kernel driver
would know nothing about the alarm status. E.g. power-off alarm
would not be really cleared in alarm driver even it is cancelled
in the apps/framework.

Change-Id: I1250b3778de8961ba2a89d8ea8fa29d729bbc4e8

Conflicts:
	services/jni/com_android_server_AlarmManagerService.cpp
BluetoothManagerService: fix enabling/disabling BT from Quictsettings under second user,

Change-Id: I8173559b2c734968ef4a8d86fddaa3a73d5c2b1e
Bluetooth:Settings:Handled ACTION_STATE_CHANGED intent at boot time

BluetoothAdapter.ACTION_STATE_CHANGED intent is added to foreground
activity to handle BT sync issue with  Power widget at the boot time

Change-Id: Ib26cb4630c711587da789dc920aa66ded97a9a3b
CRs-Fixed: 576879
Bluetooth: Unbind only in case of OFF state

In MESSAGE_SAVE_NAME_AND_ADDRESS,BT manager
calls unbindandfinish without checking BT
adapter state which if not OFF, will lead
to improper cleanup. Unbind will get called
but cleanup will not happen.

Change-Id: Ibfc70c51a95f8b80f331090e322ba3ebb88f6c03
CRs-Fixed: 652260