remove unnecessary switchUser call

If userId doesn't change, no need to do switchuser.or it will
introduce some tweak for gps modules in quick off/on because
they need cost time in off/on.

Change-Id: Ie5e408dc8be69c8a63a18bcb2cfe478cef4d70e6
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Do not show Home behind full screen activity

When ensureActivitiesVisibleLocked goes through foreground activity
stack and reaches non-fullscreen activity, it sets showHomeBehindStack
variable to true.

If there is a fullscreen activity behind, showHomeBehindStack remains
unchanged, which causes Home application to be displayed anyway.
In this case user will see a fullscreen activity and Home activity
simultaneously.

To fix the issue we set showHomeBehindStack to false when we reach
fullscreen activity in the activity stack.

This was made visible by the following commit:
446ef1de8d373c1b017df8d19ebf9a47811fb402

Change-Id: I535c1283a4e26f5cf606375b837d4b7195324af0
Solve three memory leaks related to PatchCache

A Patch can be fairly large, holding bitmap data, but
is also frequently leaked which adds to the severity.
The feature is used in many important processes such
as Home, SystemUI and Chrome.

The following leaks are solved:

1. The Patch itself was not always freed.
PatchCache::removeDeferred() can mark patches to be
cared for by PatchCache::clearGarbage(). But
mCache.remove() would only destroy the container
and the pointer, not the Patch object itself.

2. The vertices stored in the Patch at Patch::createMesh()
would always leak. The empty/default destructor in Patch
would not properly destroy "vertices" since it's just a
pointer.

3. A BufferBlock that's added to the mFreeBlocks
in PatchCache could leak. The leak happened when a
patch later needed the entire free block, because the
object was removed from the list but never deleted
in PatchCache::setupMesh().

Change-Id: I41e60824479230b67426fc546d3dbff294c8891f
show connected devices or name of single device on Bluetooth Tile

Patchset 4: Add ACL listener to trace back connected/disconnected bt devices
            CleanUp
Patchset 5: Rebased
Patchset 6: Move ACL listener to BluetoothController

Change-Id: Ic9dda4f9123bc541753332df759cbd8534ab2e10
Revert "Fixed a typo in notifyWakeLockReleasedLocked so wakelocks get released
and Awake bar in History details is ok for now"

This reverts commit 6ed0361430d80cec9ef42ddaba5bf16c70f83404.

Change-Id: Ic0ae563d75db27a0b364f7b69f9c89bc5c8312ec
Revert "Suspend Actions & Wakelock Blocker (1/3)"

This reverts commit c19bd6bdac2c18e70437f75f415d3a856f0bce28.

Change-Id: I00007c6e4f0f8285bde6f045a331cdc6d06b921a
[1/3] Base: Battery Saver mode

Vanir-ized by me:P

PS2: Ditched brightness change since it`s useless and added data
and WI-FI on/off
PS3: derp fixes

introduce battery saver mode
this based from what user want or what user do to saving the battery life
this include:
1. Automatically switch mobile network into what user choice and also disable mobile data IF wifi connected to an AP
2. Automatically switch mobile network and disable mobile data IF battery low (battery level can configure)
3. Reduce screen brightness based low battery (this feature will disabled if Auto brightness mode enabled)
4. Not changing network IF on Call or Usb tether enabled or WifiAP enabled
5. Not changing network IF there is Download/upload progress
6. Support For Both GSM and CDMA devices (need someone to test for CDMA devices)
7. every condition has an option :D
8. Restore all network configuration if Smart Radio disabled
9. Add Time Range to start Smart Radio

Change-Id: I9d86ef1425228e11cadd85d37c5b6e8b20e50fb0
Signed-off-by: Dan Trifan <jimsth@gmail.com>
battery saver mode updates

better handling of boot process

PS1: fix bracket derps

Change-Id: Ic154382b40841c0cffd9a0bacecd23374ce6f075
Signed-off-by: Dan Trifan <jimsth@gmail.com>
battery saver mode: updates and LTE/4G fixes

4G options should work now.

thanx to Yanuar Harry<ai.the.smarties.physics@gmail.com>

Change-Id: I1a3146952e76022267f3b71aaffbfdc3e2d9b565
Signed-off-by: Dan Trifan <jimsth@gmail.com>
battery saver mode: a bit of a revamp

credits to Yanuar Harry
<ai.the.smarties.physics@gmail.com>

Change-Id: I22e45d652a1823698927d72f88daa9ad8bf55737
Signed-off-by: Dan Trifan <jimsth@gmail.com>
battery saver mode: updates (1/2)

credits to Yanuar Harry<ai.the.smarties.physics@gmail.com>

Change-Id: I5516e6293b052dc8da17f3ad30e848200ea3e6f5
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Fwb: Wakelock Blocker (1/2)

Change-Id: I155c14b1dc999020d88b5866b9d0abd0172a54e6
systemui: fix qs tiles layout height in landscape mode

Change-Id: Ic7d0e9c98490995ba5e0923f6de86f54287f99d0
JIRA: CYAN-3589
Issue: https://jira.cyanogenmod.org/browse/CYAN-3589
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Merge remote-tracking branch 'upstream/pac-4.4' into pac-4.4