AppWindow: performance and memory improvements

- create views when showing the AppWindow and mNeedsUpdate is true
- don't recreate views with each app install/update/removal
- remove all views before creating a new instance

Change-Id: Iedf573b77787bacf88d6d0a4a2ff09568dfb43f0
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
NetStats: Don't update stats when screen is off

Also moved registering of broadcast receiver and settings
observer to onAttachedToWindow() and unregistering to
onDetachedFromWindow() to avoid these being leaked.

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkStatsView.java

Change-Id: I077515a0550a8268b2ec4ed09b5bf0f42315733d
Merge "NetStats: Don't update stats when screen is off" into jb-mr2
Network stats: use number formating based on android code

Uses logic from Formatter.formatFileSize

Change-Id: I9008df0e90fbaf8d733cfd853dc1ef6160cf67f5
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Active Display: Add always show pocket mode. [1/2]

Currently pocket mode is either on or off and when no
notifications are available it doesn't turn on.  This
adds an option to allow active display to come on even
when no notifications are available, showing the time
and allowing the user to unlock the device.

PS2:
Add unlock icon to center of the ring.

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java

Change-Id: I14043256e0202b497c0e9f3c64aa796c1b2becac
Fix build

This fixes building SystemUI after merging this: http://gerrit.aokp.co/#/c/13236/

Change-Id: I52ee26c09ff0fd8d6dab88dfb436794e9319d13d
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Volume toggle

Simple tile for volume.

Change-Id: Ia362ee9fe789862da4b57f2a4ab56bcd3a0c1c7d
Signed-off-by: kecinzer <kecinzer@gmail.com>
Merge "AppWindow: performance and memory improvements" into jb-mr2
Replace weekday by date view in statusbar clock

Change-Id: I434858a083270620509489a954a824b84b6a7887

Conflicts:

	packages/SystemUI/res/layout/status_bar.xml
Port "Option to control cursor in text fields using volume keys (1/2)"

Thanks to KonstaT

Change-Id: I78f4a14326f3d30e08431c6bff1a191139db6027
Revert "Replace weekday by date view in statusbar clock"

This reverts commit ae49ef8f9aef47ae865cc8718a59466489978032.
[WIP] Multi-window

This is a big work in progress, which currently has some bugs,
but begins to look okay.

You can already multitask a little bit, by using the
app switcher and long-pressing an icon, then select "Add to
Split View".
Last window touched gets the key focus.

Still are some issues with rotation handling - touch an app
after rotation to make it relayout.

Enjoy :)

Change-Id: I4a03a84539fd3ac1273f0d3503fe8fafcd16be26

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Revert "p2p: Fix for discovery failure until AP is connected in WFD client."

This reverts commit e5003a2a286aef9226907e9326e8e5f2188a214c.
Replace weekday by date view in statusbar clock

Change-Id: I434858a083270620509489a954a824b84b6a7887

Conflicts:

	packages/SystemUI/res/layout/status_bar.xml