Fix occasionally flickering music control widget.

The problem was seemingly related to the player abandoning audio focus
while the playback state was still set to 'playing'. In that case, the
transport control was removed from the keyguard host because it had no
listener anymore, but later was re-added due to isMusicPlaying() still
returning true. Re-adding it lead to it re-registering with audio
service, which cleared the display due to nothing being connected, which
lead to the detachment listener being called again, which in turned
closed the loop.

While this may be a sign of a buggy player app (it should stop its
playback prior to abandoning audio focus), this situation still should
be handled gracefully. Fix the problem by simply reporting no music
being played while no remote control client is connected.

Change-Id: Id6834d38bc6faa3b6455ac66b413443f85606785
Revert "Auto-close if you swipe away the last notification."

This reverts commit 8cc36e572876f3bb9197f0109db3042466e5f917.

It didn't work as advertised anyway: It only worked if there are no
persistent notifications, and it also closes the notification area if
the notification is closed by the app itself.

Change-Id: I16f0fb6cf41d20c3a3bd4278446edab780c1fc77
systemui: Add CONNECTIVITY_INTERNAL permission

* SystemUI needs to be able to list interfaces if tethering is in use
   and we ask for a second tethering path to be set up (BT+USB, etc).
* Add permission to stop exceptions in the framework and enable
   tethering thru multiple paths.

Change-Id: I75b08a87f14c40b7f7c6a24d5bc4163ef86c3a01
Merge branch 'cm-10.1' of git://github.com/CyanogenMod/android_frameworks_base into cm-10.1
Fix occasionally flickering music control widget.

The problem was seemingly related to the player abandoning audio focus
while the playback state was still set to 'playing'. In that case, the
transport control was removed from the keyguard host because it had no
listener anymore, but later was re-added due to isMusicPlaying() still
returning true. Re-adding it lead to it re-registering with audio
service, which cleared the display due to nothing being connected, which
lead to the detachment listener being called again, which in turned
closed the loop.

While this may be a sign of a buggy player app (it should stop its
playback prior to abandoning audio focus), this situation still should
be handled gracefully. Fix the problem by simply reporting no music
being played while no remote control client is connected.

Change-Id: Id6834d38bc6faa3b6455ac66b413443f85606785
AutoHide Statusbar

Ported from https://github.com/SlimRoms/frameworks_base/commit/3982e50efb490f01a01c74bc6b190ecddf7c1480
and taken from https://github.com/BeerGang/android_frameworks_base/commit/b81079f2adcc816a976798ffbf78e91e26ef7e03

Change-Id: Icaace6c54d60cad82bd24bb40fba90969ab18b5f

Conflicts:

	core/java/android/app/Activity.java
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Frameworks: Specify notification types for Auto Hide statusbar (1/2)

Allows users to choose between "non-permanent only" and "all notifications" in the autohide
the statusbar when there are no notifications check.

- cleanup a bit
- reduce method and provider settings call

Change-Id: I1f793df1ab702e89cdfeee8faa915ff13a3cc782

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Frameworks: take notification size into account + cleanup

take notification size as well into account for qs swipe down
feature due it can take effect if the user dismiss a non permanent
one during a permanent one is present. CM bug

as well cleanup redundant code

Change-Id: Ie90ea286719d4a883f717fd546efc59eeb5d4990

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Merge "Fix occasionally flickering music control widget." into cm-10.1
Swiping on the top of full screen apps shows status bar for 10 seconds

Change-Id: Idfb4df4e36a2777993f5b724c34ce938d64b5554
Add Statusbar Quick Peek [2/2]

Adds the ability to peek at the statusbar when hidden
by swiping down from the top edge of the screen.

Change-Id: Icd9591488b212f3a38c74c1efb2a7315af40c15c
Merge branch 'cm-10.1' of git://github.com/CyanogenMod/android_frameworks_base into cm-10.1
Merge remote-tracking branch 'temasek/cm-10.1' into cm-10.1