Hide QS Panel Toggle [1/2]

Patchset 2:
- rebase

Patchset 3
- correct hidden value call
- no need to call it in NotifPanelView also...call it from PhoneStatBar
- add controll on all places where needed to hide and prevend SystemUI FC
- disable hide function for tablet and largescreens
- change behaviour on the fly without systemUI restart
- some minor stuff

Patchset 4
- slim up the code

Patchset 5+6+7
fever could do sometimes strange things, last one I prommise

cheers

Lars

Change-Id: I079583060fe51015372bd6303aff474652914aea

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Make the pull down 70-30 vs 80-20, a bit more room to pull down QS with one finger

Change-Id: If109306f421a24de5c09ce125c4f8fd829d732b7
Frameworks: Quick Settings pulldown without notifications (1/2)

If no notifications are present option to pulldown quick settings
directly. This options respects stock behaviour as well as left and
right edge quick pulldown.

Change-Id: I83435a4ffaab7199d29de51c8a1ab9e0429f8765
Bugfix : Quick pulldown sometimes flips when it should not

When your Quick Settings Panel is set to

Quick pulldown : right

Sometimes (very intermittently) the tray flips (to Quick Settings) as you pull it down from the right side.

This is happening because the pull down happened so fast you can see the top 0-10 pixels of the tray,
and because it was showing the notifications, not the Quick Settiings

However the user expects the tray not to flip, but to just be on the Quck Settings.

The new code simply checks to see that the Event was a pull down event and that the event started in the top status bar.
If this is the case, then the quick panel is swapped to (without flip)

Special Thanks to my daughter Jenny fo painstakingly reproducing this bug.

Change-Id: I8fdbedb1aa6d4fd672bd4cb58b7c99557469ab62
Fix the flipping animation sometimes being played when pulling the quick
settings with two fingers.

Commit c5e8dca7f11d3c085dd1e98692fcc21f1bcc0f6f already tried to fix
this before, but was incomplete (and incorrect). The actual issue is
that on the first pointer down event, a 'peek' animation runs and
expands the notification panel by some pixels (on mako: 160). This
amount of pixels is significantly larger than the handle height (on
mako: 72). Depending on the timing between peek animation and the second
pointer down event, the flip animation would play (if animation already
revealed more than 72 pixels) or not.

Fix that by not playing the flip animation if only peeking, as the
actual panel content is not visible at that point anyway. Also remove
the previous incomplete fix in the process.

Change-Id: I8997dc7b70143940a519f41da29ffd4d738d8d0c
Finally fix incorrect flipping to quick settings.

Commit f6685c5ca84a42f5a47bf40827d6229dd998dee4 fixed this for the
two-finger pulldown. It reverted commit
c5e8dca7f11d3c085dd1e98692fcc21f1bcc0f6f in the process, which was
incorrect, but fixed another condition of this problem occuring
nevertheless. The actual problem the latter fix tried to fix was that
the flip decision was dependant on the timing of the view layout:
getMeasuredHeight() returned whatever was set in the last layout, which
might not have happened when hiding the view, so at the time of the next
ACTION_DOWN getMeasuredHeight() returned the height from the time the
panel was last visible.
Fix that problem by using the height scheduled for the next layout, so
we're always up-to-date.

Change-Id: Ib97f34f9aa0a6f28d48b4ec3e16c82a814cda0d0
Frameworks: Specify notification types for QS quick pulldown check (1/2)

Allows users to choose between "non-permanent only", and "all notifications" in "Quick pulldown without notifications" check.

Change-Id: I910a901bb2de6f9f829f169c573a3038c40d7f40

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java