HALO (1/2)

HALO is Androids one and only multitasking solution.

We explicitly do not go the Samsung/Cornerstone route. This solution is basically an extension of
the regular notificationshade, which is an aggregator for notifications that can be checked out when
time permits. HALO completes it by allowing you to respond to tasks on the spot, trying to be as
unintrusive as possible and flexible in regards to policies (white/black lists).

Features:

- Apps open up in floating state, apps underneath do not pause
- complete SystemUI & Core integration, making HALO feel like a native feature, source/SDK and UI/UX
- HALO has white and blacklists, which for now allow fine control for apps pinging through HALO
- multiple gestures to navigate HALO:
  - double-tap-move: move
  - tap-drag-left/right: task through notifications, finger up launches
  - tap-drag-up: dismiss notification
  - tap-drag-down: put HALO into semi-hidden state
  - swipe while HALO is hidden wakes it up
  - drag-to-X to remove HALO altogether
- comes with as few settings as possible, everything should be self explanatory and intutive,
  users must be informed about the double-tap gestures which is the only catch.

Known issues:

- Integration has been finished for PhoneUI. TabletUI and PIE must be integrated still.
- Packageinstaller must allow HALO through its overlay check or it will disable the install-app button.
- The low level has a few remaining issues:
  - Some apps still go up fullscale (they trick us with services, circumventing the intent flagging)
  - Some 3D games still pause
  - There is one known app that refuses to end on back or touch-outside, that is WeChat
  - The activitystack pause implementation works but is makeshift

To-Do:

- On-screen tutorial at first start up to teach users the gestures
- Fixing all known issues, full integration in the remaining UI's
- Perhaps hybrid engine integration for running floating apps in a decreased size

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Some marginal fixes

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Floating window (1/2)
This is the popup code from Paranoid Android's HALO, which has already been commited. This commit just allows it to be on or off as some users may not want to use this function. We have a better idea on how to use this functionaility which will be seen later.

For now though, this is the messy way of turning it on and off.

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix Floating Window

Change-Id: Icf48df5d6ffbfb8e6b16a632f5135a0fa02dd946
Halo: Add master switch to disable Halo (1/2)

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Fix build
Signed-off-by: Paul Beeler <sparksco@gmail.com>
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.

Signed-off-by: Paul Beeler <sparksco@gmail.com>
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
Revert "Fix Floating Window"

This reverts commit 6d949ea8be51b16994d1ca911cca487203284286.
Revert "Floating window (1/2)"

This reverts commit 639d99f8c43cdb0dccff04032ba4e257bd91cdb0.
Allow theming of lockscreen

Change-Id: I10799482e0b393746b4c9818f94862109fac6006
Frameworks: Advanced low battery indicator options (1/2)

Based on a idea I saw on Liquid and from CR3C0 (thanks guys) which we
modified to an extended version

This commit introduces following new SlimBean modes to indicate low battery

     * 0 = show dialog + play sound (default)
     * 1 = fire notification + play sound
     * 2 = show dialog only
     * 3 = fire notification only
     * 4 = play sound only
     * 5 = none

Due that notification is a unique SlimBean feature some words on it. Notification
behaviour is the same as Pop-up. User can dismiss it manually or it is
dismissed automatically if charger is connected, click on notification opens
PowerUsageSummary. Also you get a status bar ticker message about the notification
and notification is always on first place of list. And last if vibration is enabled
notification vibrates.

Patchsets:
 - codestyle corrections

Patchst
 - add PowerUsageSummary intent

cheers

Change-Id: I84476626b0ff5424454a1132ea4ef77a696070c1

Conflicts:
	packages/SystemUI/src/com/android/systemui/power/PowerUI.java
Update drawables from PA
Signed-off-by: Paul Beeler <sparksco@gmail.com>
HALO cleanup

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Try to fix HALO on Grouper
Signed-off-by: Paul Beeler <sparksco@gmail.com>
Merge branch 'sm-jb-mr1' of git://github.com/SaberMod/android_frameworks_base into sm-jb-mr1
Revert "Try to fix HALO on Grouper"

This reverts commit 892260cc3850852722dd4e88d00b2d00bc9b9ea9.
Don't bring home to the front if we're opening a floating activity
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)

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix Halo not showed at first notifiction drop
Framework: Add Power Widget (Phone)

This commit adds the Power widget for phones.  All toggles should work
except for LTE (disabled for now)

PowerWidget: Make widgets stationary like everything else in the tray

Before patch: widgets move up with the grab bar (and get smashed a bit)
https://dl.dropbox.com/u/1077120/Android/Screenshot_2012-09-13-18-19-39.png

After patch: widgets disappear behind the grab bar, like everything else
https://dl.dropbox.com/u/1077120/Android/Screenshot_2012-09-13-18-23-52.png

Signed-off-by: Paul Beeler <sparksco@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/public.xml
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/values/strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java