Allow expanded desktop to be configurable in settings
Signed-off-by: Paul Beeler <sparksco@gmail.com>
Framework: Power menu config
Signed-off-by: Paul Beeler <sparksco@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
PackageManager: fix app lib migration for device with /datadata

For devices using /datadata, dataPathString will point
to /datadata while nativeLibraryDir will point to /data/data.
Thus, compare to /data/data directly to avoid problems.

Change-Id: I11149cf9cc5a573cc85513e12d3569b514f5ffb5
Option to show status bar in expanded desktop mode (2/2)

This commit allows the user to keep the status bar visible during expanded desktop mode.

Patch-set 1: clarify variable names.

Change-Id: Icb20971f8f86cb2ecf90f6226c1d5d18a60f5c84
Signed-off-by: Michael A. Alcorn <airalcorn2@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Added support for multiple navigation key bars

System UI was build with the assumption that there is only one
navigation bar at a time, and that this bar is managed by
Phone UI, Tablet UI or TV UI.

This commit adds simple call back facilities at BaseStatusBar
for both, navigation key hints and menu key visibility change
events. These call backs are wired up in Phone UI, Tablet UI
and the TV UI stub.

This allows us to have more than on navigation key bar
in the UI and define those navigation bars directly
in BaseStatusBar, where it is available for all UIs.

Patch Set 2:
* CyanogenMod Code Style
* Added documentation.
* One interface for all
* Added setDisabledFlags() to the list

Change-Id: Id4de440e21c2f5c78b5e185030f9c5e0f7e6bef7
Bringing basic pie controls. (1/2)

Based on the multiple navigation key bar patch, this commit adds
basic pie controls. The implementation is inspired
by Paranoid Android but is completely rewritten.
The aim was to get as little intersection with existing code as
possible and provide a farily easy interface to extent these
controls by new slices (inherited from PieSlice).

The pie controls are only active when expanded screen is turned on.

Based on this commit there is another one that adds more optimizations
for Phone UI to pie controls. And there is a seperate commit for
the settings app, too.

Patch Set 2:
* Better Code Style.
* Some simplifications in PieSysInfo.java

Patch Set 3:
* Fixed NPE when pie controls are completely deactivated
* Preserve state of menu button

Patch Set 4:
* Fix display of Wifi SSID
* Some cleanup and coding style changes

Patch Set 5:
* Fix NPE when not connected to Wifi
* Remove AM/PM from time display (overlayed the other info)
* Fix menu button handling

Patch Set 6:
* Remove trailing whitespace in 12 hour time format

Patch Set 7:
* Tune colors
* Improve battery level and operator printout
* Remove some unused imports

Patch Set 8:
* Some refactoring on pie trigger management
* Copyright fix
* Make debug on PieLayout less noisy

Patch Set 9:
* Fix NPE one devices with no GSM/CDMA/LTE
* New color proposal
* Haptic feedback now respects system setting

Patch Set 10:
* Factor out haptic feedback into separate method

Patch Set 11:
* Prepare for "always on"
* David's color scheme

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Add pie control optimizations for Phone UI.

This commit brings some pie control tweaks to the Phone UI. These
tweaks make the pie controls react to several conditions that are
are special to the Phone UI. That means that this piece of code
is more deeply embedded within the SystemUI code.

This mostly adds the foloowing behaviour, that is Phone UI
dependent:
* Disable BOTTOM trigger when notification area is expanded
* Disable LEFT and RIGHT trigger when a keyguard is active
* Enable search light feature

Patch Set 3:
* Better Code Style.
* setDisabledFlags now belongs to navigation bar callbacks

Patch Set 5:
* Removed duplicated .observe()

Patch Set 10:
* Fixed unintended trigger activation

Patch Set 13:
* Searchlight opens directly on the bottom (on the lock screen)

Patch Set 15:
* Fix conflict/rebase

Change-Id: I551745b69791adca75190c54282be19d85db75a9

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

Signed-off-by: Paul Beeler <sparksco@gmail.com>
SystemUI: Remove the dark pixel artifacts from the back arrow drawable

The arrow had some mostly transparent pixels that made it look
kind of like the device had defective pixels. Found by Cyril Mottier.

Change-Id: Ia78453868ebe7e3291d01c96b9beafc78ea3cdcc
Fix up expanded desktop behaviour.

The expanded desktop mode had a number of issues:
- It didn't handle multi-user scenarios correctly
- In the keyguard, the status bar was shown while the navigation bar was
  hidden, which was inconsistent to the !keyguard case
- Live wallpaper sizing was incorrect when expanded desktop mode was
  enabled due wallpaper windows not being recalculated correctly after
  enabling expanded desktop

This patch should fix all of those items.

Change-Id: I976ffae3a56d411b00026f86b16efa9743a23293
Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix resource leak: When call MediaMetadataRetriever.setDataSource or getFrameAtTime should ensure call release in finally to avoid resource leak
                   Patch set 2: Remove unnecessary white spaces

Change-Id: I49a7f2fb99dc8b9560e7c17421125356e45a87ac
[HTML5] Implementation of WebSockets (framework).

Added binding to android port for Html5 WebSockets.
Added external API for enabling\disabling from browser.
SSL Web Sockets are not implemented in the current version.

Change-Id: I8b7a42780410cb9f043e1f16570ea50db68e00ea
Revert "makefile changes for gcm javadocs"

This reverts commit 5f9922d7c3bce158e4c7a58929d4075e7c91e32e.
Make system layout fill the window properly on expanded desktop mode.
This commit fixes e.g. the gap on the bottom of the lock screen or the gap on the right side of status bar on landscape mode.
Original CM commit has been modified to respect the customization of the navigation bar height, implemented here: 8cfac621a34e49a223216808b2d8179c692fb92f
Original CM commit use com.android.internal.R.dimen.navigation_bar_height/width to get the navigation bar default dimensions, @rascarlo uses mNavButtonsHeight * DisplayMetrics.DENSITY_DEVICE/DisplayMetrics.DENSITY_DEFAULT

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Navring: Fix shortcut for uninstalled app

Fix NPE when the user uninstalls an app that was assigned to a navring
shortcut before.

Change-Id: I3f02fca73cb30e2edbb35d089ad127b35d8233c0
Power Menu: Update the Expanded Desktop drawable

Also add a proper "off" state.

Patch Set 2-4: Add to symbols.xml
Patch Set 5: Remove the useless extra sw600dp-xhdpi drawable

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix divisions by zero on boot.

Change I976ffae3a56d411b00026f86b16efa9743a23293 introduced a problem
where depending on the rotation settings the WM override display
configuration would be filled with invalid values.
Fix that by correctly checking that the display is ready prior to
setting the override configuration.

Change-Id: Ia3fd7603d9c1212cd32536803b4c12390a798606
Fix pie controls being disabled by launcher gestures.

Some launchers have gestures for expanding/collapsing the status bar
from swipe gestures which call the respective StatusBarService methods
even if the status bar isn't visible due to expanded desktop. Because of
that, the status bar code internally thinks the expansion is carried out
(even if invisible), thus disabling the bottom pie controls in the
process.
Fix that by making PhoneStatusBar aware of it being hidden by expanded
desktop and ignoring the expand call in that case.

Change-Id: If386ca953517d9b5efcb6cb9054f5c5e6a9e0bc4
Tighten enforcement of file modes.

Bug: 8275867
Change-Id: I4da14f2dd0049aca69636999696c1f3c02b3b792
FlingTracker can divide by zero and hang StatusBar in an infinite loop

if 2 events have the same timestamp then FlingTracker in PanelView will divide
by zero causing NaNs. the bug is usually triggered by rapid StatusBar up/down
dragging activity and updateCarrierLabelVisibility can then loop indefinitely
looking at NaNs. the user visible symptom is that StatusBar refuses to pull
down and is burning cpu time.

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I0791c6bea953bf03346185fc6aaf44aaea79aace
Merge Navigation Bar and Pie Controls button config (1/2)

Based on the commit series for pie controls, this commit
makes the Navigation Bar and Pie Controls share
the same button layout. However, there is no button layout
editor for pie controls, which makes the navigation bar
the leading entity when it comes to button layouts.

This commit introduces:
* A common notion of navigation buttons.
  (class NavigationButtons)
* Some setting constants changes.
* Removal of the pie search key, since it is no longer needed.
* Sophisticated key event injection.
* Virtual key sound effect

Change-Id: Id68f8d0b597d7d89c55c3f66f994e632d014f006

Conflicts:
	core/java/android/provider/Settings.java

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