KeygaurdSelectorView: Unregister reciever in onPause

Also check if we already have a reciever instance before
creating a new instance

Patch Set 2: Refactor field reciever to mUnlockReciever
           : Add null check to Context#unregisterReciever
Patch Set 3: Add null check to Vibrator#vibrate(int);
Change-Id: Ie9b03b20da29d05a64293ef6b7931393c34796a2
Fix Lockscreen FC/reboot

PS2: register receiver in onResume()

Change-Id: If475f0750bbc408e727eb0d3cf532c936ad418e8
Signed-off-by: Gergely Szell (sethyx) <szell@hu.ibm.com>
HALO: Option to pause the underlying app (1/2)

- adds an option to pause the active app when using HALO
- this is enabled by default for devices with low memory
- (currently: <640MB RAM available to the kernel)
Revert "Revert "Track a typo fix in hidden libcore API.""
No More Will Give Error @winner00
This reverts commit 4e91777f88ad497cedcc1c914f81b2b770ef4304.
Fix theme provider crashing for non-primary user.

PackageManagerService's context is for user 0, so if the theme provider
for other users was invoking the getInstalledThemePackages() method, the
themes provider crashed as it doesn't have the INTERACT_ACROSS_USERS
permission.
Fix that (and simplify code) by making getInstalledThemePackages()
return the installed themes for the current user, which was probably the
intent anyway.

Change-Id: I02002cee005b74128f3b2f7cc7a93b9b8514f1f3
Reworked transparent layer
When a halo'ed window is opened, the transparent layer will be always visible. It will manage the background dim.
This fixes some apps dimming its sandboxed processes (like chrome).

LayerActivity manages its own lifecycle. When it's focused after paused it finishes itself.

System processes (identified by "android" pkg in SystemUI and system uid in Activity) don't use the layer and still use their own background. This
has been kept this way to not interfere with their activity.
LayerActivity: Corrected lifecycle
Should contemplate the case that the activity gets stopped
Fix little derp causing visual bug

To reproduce, disable halo, and press "clear all notifications" button

Change-Id: Ice7ab62229e27db53ef51fd5df55dbcd0a86358b
Bug fix on installd with SELinux enabled kernel.

setfilecon is not required on libsymlinks when target
doesn't exist. A bootloop is caused without this
change.

Change-Id: I96dbd4b1f47a752bfcaf6016c81fd43083c4a6e1
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Clarify ViewStub.setVisibility() documentation to state that it works after inflation.

Change-Id: I8414b7002af1a51a10db95758e36c471b51e6355
Signed-off-by: Tim Hutt <tdhutt@gmail.com>
Squashed commit of GPS changes from CodeAurora

GpsLocationProvider: ipv6 support

AGPS calls to accept ipv6 addresses

Change-Id: If9187b8fd9e0ba22cd01722d5c04aabccebad38b

GPS Provider changes

Added support to delete aiding data test feature.
Added more data catagories, to now at the total of 21

Change-Id: Icb15d21b8204323021c47eac5249cde128e38246

GPS provider - AGPS Dual APN support

To support either SUPL or any WWAN connection - allow connction
type at open request API; FW's support to dual AGPS connections

Change-Id: Iecb07f31a99353f75c1a0c000bb6e39ef007f6bf

Supporting IPv4v6 and IPv6 bearer types for ATL

Change-Id: Ife8c72d9975ac58b9e4091cb95ad5a9763e01c3f

gps: determine ip protocol type from telephony.db

Instead of determining the ip protocol type from the
type of ip address we have, the ip protocol type is
looked up in telephony.db based on the carrier and apn.

Change-Id: Ib0d76354515fb44f570668d5a4a42cccfa6fe78a
CRs-Fixed: 376537

gps: get apn when supl is already active

When supl is already active, get the apn and bearer and
try to connect, instead of reporting failure.
CRs-fixed: 401408

Change-Id: I2eed11e0a34a55d1b62d37f0a6c97b1f3f2fecae

gps: allow xta data over default mobile connection

If the default mobile data connection is up and
connected, use that connection to download xta data.

Change-Id: Ic5ff5422ac9baf83ac923faeb1f8b4fc9186c184
CRs-fixed: 399721

GpsLocationProvider: Support type wifi in i/F request.

Add support in GpsLocationProvider for wifi type for
i/F request.

Change-Id: I44463e72857c06ae24626b8f3cd482ddac7c278b

Conflicts:

	services/java/com/android/server/location/GpsLocationProvider.java

gps: adding net_raw gid for IPC permission

for AFW to have permission to call loc api

Change-Id: Ifc7451659431fa1c1998f5d75bfa5f2018a5d054

gps: fixed singleshot session that doesn't stop

When a single shot location is requested and a
location is returned, the location request is
not stopped and so it continues even when the
requestor has stopped listening. This can cause
gps tracking to continue in the backgroud and eat
up battery.

This is fixed by stoping the provider if there
are no more update record associated with it
when a location is returned.

Change-Id: Ie437732ff06231a46724843af30e21ca3a1694ab

gps: return dummy apn instead of null

This change was missed during merge, which
can cause exception(crash) if apn is returned
as null.

Change-Id: I15160c8f2f512cc75bbe1b7b7ef4695c201112d8

Conflicts:
	core/java/com/android/internal/os/ZygoteInit.java
Fix WPS configuration method of BSS enrollee.

Remove keypad from WPS configuration method of BSS enrollee
becuase JB UI does NOT support keypad, only supports pbc and
display.

Change-Id: I9ab6f1514805e8307b46e38261f1c657568aeb59
Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
Remove config_wifi_p2p_support from config.xml.

"config_wifi_p2p_support" is no longer used.
It was replaced with PackageManager.FEATURE_WIFI_DIRECT.

Change-Id: Ib57c5246b2ad218e65b4cbbb77fd37c04b5d9682
Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
Frameworks: GlowPad Torch (NavRing)

Secure/Insecure can both use this one.

PS2: Derp
PS3: Swapping to ints for ONE setting
PS5: GlowPadTorchHelper
PS6: Don't initate if FaceUnlock Active
     (Camera in use)
PS7: Rebase
PS?: More CleanUP

Change-Id: Ic5df8ff74c52350fbad25a64671322fbd4f9a0f5

Conflicts:
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
Framework: Collapse Shade TogglePref

Change-Id: I2fddec83602b284266631bdff722aa93a2d10c30

Conflicts:
	core/java/android/provider/Settings.java
NavRing: Longpress Logic

Again, this matches shortpress logic.
    (And now matches longpress logic
    since this was merged on Lockscreen)

Vibrates on Longpress...
    Remove finger to launch.

Change-Id: Ia7f8bb2580643930511fd12764f4a41873ef64d2
Revert "Squashed commit of GPS changes from CodeAurora"

This reverts commit 07bcd6fa9ef289aff641278e174cf192e3e66507.
Revert "Remove config_wifi_p2p_support from config.xml."

This reverts commit cbe90a904818896381789b61fd104a403fee381b.
Merge branch 'jb2' of github.com:CarbonDev/android_frameworks_base into jb2

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java
	services/java/com/android/server/am/ActivityStack.java