GLSurfaceView: add property to default to RGB565

Some legacy devices (like the Xoom) are not capable of handling
RGB888 surfaces, which is now the default. This results in some
OpenGL apps crashing with "No config chosen" errors.

Set ro.opengles.surface.rgb565=true to go back to the old default
of RGB565 surfaces.

Credit to dreamcwli for the original patch.

Change-Id: I5ad9aa8e98eb6fd554b01022439141fe4a55bd70
NavigationBar : Customization

Includes:

- Allows user to customize navigation bar.
  Features :
   - Choose from 1-6 # of buttons
   - Re-arrange / assign buttons
  Id: Idc9f5f401f15d207504e49de47666bb5510a06ca

- Navbar : Rework logic for determining orientation
  This patch introduces better checks for hybrid ui's.
  This should fix issues of small buttons due to incorrect ui determination
  Thanks Rolf Arne Schulze for testing :)
  Id: If5b61dc4764a98deedb5b801d11451fed2488cba

- Fix layout on N10
- Remove uncessary padding and logic
- Phone fixes
- Phone padding fixes

Change-Id: I8903b85b6ee8581f8564d9dc7b0d40f645d7647a

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
SystemUI: always use transparent notification shade

Devices with less than 512MB of memory have a solid
black notification shade. Remove the isHighEndGfx()
check to force a transparent notification shade on
all devices.

Change-Id: I9a68a2a8b0d36685f8899f3bbed43bb6bccb47b1
NavigationBar: Custom height (1/2)

Ported from http://review.cyanogenmod.org/#/c/23609/

Change-Id: I61aef192ac658f54f86b87d18cce9d7b073004e2

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Custom power_profile
Revert "Remove quick settings background"

This reverts commit 59db20255a57ac9bfbbde0c44677a6a32b5aff69.
Revert "remove bits and graphic for notification_panel_bg."

This reverts commit fea8084da6f788883af9d4c1b4c3036bc98f1426.
Framework: Add Power Widget (Phone)

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

Change-Id: I17669420d9db9a347af182fc398c6426e18534f4

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

Change-Id: Iedded9c4ba89bb5284a8b8cd0e48be8e0cafa01d

Conflicts:
	core/res/res/values/public.xml
	packages/SystemUI/res/values/strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Framework: Forward port Power widget fixes and fix disabling

This commit fixes the ability to disable/hide the power widget on CM10.1, hide
the widget by default and forward ports a few other related fixes:

Author: Danesh
1) Notification Widgets : Fix vibration
The initial value of the array determines how long till the vibration starts,
and second value determines how long to leave it on till.

Since config_virtualKeyVibePattern is in an overlay and we cannot rely on its consitency,
we check the length of the array, and based on it execute the appropriate vibration.

2) NotificationPowerWidget : Snap widgets
Snap widgets in place, rather than allowing partial widgets

3) Framework Track Control : Switch from broadcast to audio service
Ordered broadcast is unreliable. Switch to using the Audio Service's
dispatchMediaKeyWithWakeLockToAudioService as it sends the event to the correct receiver.

4) AutoRotateButton : Minor cleanup
Use setRotationLock to avoid code duplication and staying consistent with framework

Change-Id: I0b5d1853781a7e6541a4a6283e13f8072d9972b3

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Remove power widget background

Change-Id: I314642782525fc441a651cc2b48b227f663dfeed
Modified Quicksettings to act just like Power Widget. Fixed Power Widget Sleep toggle with the help of Danesh M and David van Tonder

The code for QuickSettings has been rewritten using quicksettings.QuickSettings and QuickSettingsController classes.

Patch set 1-15: 	Original commits
Patch set 16:   	Re-arrange button order
Patch set 17-20:	Rewritten toggles

Change-Id: I7dcdca925970d816671e60ee01f393d71ce36581
SystemUI: Open Quick Settings panel if there are no active notifications

This is ported from AOKP and described as follows:

  If there are no notifications that belong to the current user, then automatically
  open the quick settings menu (like the two-finger open). It only ignores the ADB
  icon for now (which is pretty useless) but could be extended to ignore the usb
  mounting one or maybe another?
  Author: Roman Birg <romanbirg@gmail.com> AOKP
  AOKP Github: commit 2eb664a4bc5f93b705eeeaa0847331343bb017cd

The CM version of the commit respects the Power widget enabled settings and will
only display this behaviour if the Power widget is disabled.

Change-Id: Ie0c22167ebc6fd3152335c4148dbb7c65bfce46f
SystemUI: Tweak number of notifications detection method

Change-Id: Ibd46fa5039e1d3062dcdb8f3c4dbd9ec1bdc73b0
QuickSettings: New icons better matching stock

There icons should match the stock feel a bit better
in terms of size, design and color.

Change-Id: I1c8e6af9e48569e1c227c081495f70607cfe6d2b
Framework: Quick Settings customization (Part 2 of 2) WIP!

This commit will alow loading the Quick Settings tiles layout from
a layout that is configured in Settings.

Patchset 3 - Restore Settings tile to AOSP location

Change-Id: Id4e4353dee68b8ca434dfa64d1f88737792a2e28
Revert "SystemUI: Open Quick Settings panel if there are no active notifications"

This reverts commit 0031e6c3a1d6d2796d01430585d8d52d9b876552.

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

Change-Id: I6981416a8aa769663f471f2a536196af7ee7e70d
SystemUI: Pull down QS if x > 70% width

Change-Id: Ic41d331e8f0166484b124e91a8ed8e904ff38edb
QuickSettings : Dismiss keyguard upon ActivityLaunch

Dismiss keyguard if launching activity

Change-Id: I850d719c188faf9e3e06c3944287d817cdacbdd6
QuickSettings : Add torch tile

Patchset 2 : New torch drawables (Björn Lundén)

Change-Id: I0831266d503195ee249a85d0d728bdae321e56cd
QuickSettings : Add longpress for Torch Tile

Add long press capability to torch tile + Fix string mishap

Change-Id: I760c54b9abfe5e549a29b0f06660a6bf84f1d200