Fix rotation issue when using config_lidOpenRotation

=> only use the config_lidOpenRotation condition if docked.
Because when undocked now the LID is considered "OPEN" and the config_lidOpenRotation is being used at all time if >=0
Only the asus tablets are using that option, so it should be pretty safe to go with that.
It shouldn't change the previous behaviour.

It was working before we integrate the lidpatch into the TF101 kernel,
most likely because the lid was considered "CLOSED" when undocked.
Now with the lidpatch, the logic is inverted compared to before.

config_lidOpenRotation is still needed to have the proper
orientation when docked and prevent the screen from rotating,
so we shouldn't discard that option on devices with docks.

Change-Id: Ia7f9ed79b04dd91440d883c2f53e839258dacb02

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Add dock special key functions support

Missing: Notifications & brightness+/-
Credits: Donald Munn

Change-Id: I669be1ef6eead96354bdaa587f4c35ae90a431c5

Conflicts:

	core/res/res/values/symbols.xml
Add dock battery support

Change-Id: I6571c409da721bdfc4360d89383c2abd592b2b99

Conflicts:

	core/java/android/os/BatteryManager.java
	services/jni/com_android_server_BatteryService.cpp
Add Brightness+/- function support for dock keys

Change-Id: Ib9d9b04c9a2bb9fd2bf2052ad984590b918d5406
tf101: Fix Photosphere FC

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.
On TF101 the camera HAL doesn't handle FLASH_MODE & SCENE_MODE
and so it sends the required RuntimeException for these which makes PS to FC

=> check device capabilities & ignore these 2 parameters if the device doesn't support them.

Change-Id: I4848f6f144c5b1f56238b7d3893020483f434dbd

Conflicts:

	core/java/android/hardware/Camera.java
Fix system crash when changing dock keyboard layout

(ctrl+space shortcut)
http://code.google.com/p/teameos/issues/detail?id=259

That should prevent the crash and allow the feature to work
Can see about adding the Toast later on maybe.

Change-Id: I53e8b35be1695b2d8957e07e93f916fcb4c6e475
Fix clock digit cut on lock screen for large tablet

Change-Id: I06877163864d5def8241dfef3276081a45940c64

Conflicts:

	core/res/res/values-sw720dp/dimens.xml
Fix autorotation sensor loop being reactivated even when off

The sensor loop was reactivated even if turned off after a wake up
=> consider it disabled also if !mEnabled
+ turn debug mode on in case there's another issue.

Since the current autorotation sensor loop is generating 3-4% cpu eating,
we really need a way to turn it off for good for the moment.
System_server now seems to stay at 0.0% cpu with this change & autorotation off on TF101

Change-Id: I5ed3c95809f6d789222819466dacc625ac2d9f1d
Decrease lag generated by autorotation on

There are different issues from what I understand:

1) Discarding of events too close to each others is broken
as mAccelerationTimestampNanos is conditionned by isAccelerating()
on TF101 no events are discarded anymore, and so it creates an update every ~50ms
filing up the android notification message queue quite a bit for nothing and so generating lag.
2) isAccelerating seems incorrect to me too, the code means more that it's accelerating "out of range" and should be discarded in that case.

=> Discard the sample if outOfRange and don't condition the update of mAccelerationTimestampNanos that way next time we come back "too soon"
the sample will be properly discarded.

3) with events being discarded properly on the WindowOrientationListener
the SensorManager can now update every 20ms instead of 50ms
but that is definitely overkill.
=> add SystemProperty sensor.loop.minms with a default value of 50ms to throttle the notifications.
That way the thread sleeps properly instead of sending events as fast as it can.

(increasing up to 100ms can be ok depending if you want faster response or not.)
This can be positionned on a per device prop too.

4) Add 2 SystemProperties:
one on the SystemSensor side: sensor.magnitude.threshold with a default 0 value(doesn't change the behavior)
one on the WindowOrientationListener: orientation.magnitude.threshold with a 200 (0.2G) default value
These allows to discard the sample if it is too close to STANDARD_GRAVITY (ie not accelerating much)
These can be set on a per device or use the default values.
On the TF101 200 works most of the time. But weirdly when docked the reported gravity seems to have an additionnal offsert of -0.2
maybe some magnetic interference from the dock...

For the moment the 0.2G threshold is positionned on the Orientation code.
Once the cpp sensor poll crazy loop is solved it could be better to use the sensor.magnitude.threshold instead.

That should take care of most of the lag generated by autorotation.

PatchSet2: position default SystemProperties values to do nothing.

Change-Id: I093227f539050a6bad8e6e8d9f533eff7bddd0d6
Add config to allow to decrease suggested wallpaper size

Current suggested wallpaper size is big on TF101
and it is responsible for some launcher scroll lag.
This will allow to make the wallpaper behave a bit and reduce the lag.

Conflicts:

	core/res/res/values/symbols.xml

Change-Id: I162436d4ed9196b6f516c202ca362abc755f9010
Add CTRL + MENU shortcut to bring Recent Apps

Since the Home long press is a bit borked with the search feature.
Might as well grab another good key combination.

CTRL + MENU should be quite handy on TF :)

Change-Id: I1347f9f0d0ee31124230e91896c922e49c63ca4c
Modify BatteryController to be generic + add Dock Battery support

Change-Id: I19475cc03ab27edb0a0e7fbb58c0f1a8b5ac2368

Conflicts:

	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
Add hard keyboard layouts for live switching

(adds the working layouts from EOSCC)

Change-Id: I235870633ab6f17061f476220b283c4d871be7d7
config: add missing hasTouchpad bool

Change-Id: I01c3ab36d47a63a182aa840e9a671afaf5873b43
SystemUI: fix merge fail

Change-Id: If85b39e8b594c410ce1c29c908a12f172d9e95c5
SystemUI: add style for battery/dock battery text

Change-Id: Iaf4c1619efc92786449e9a5ae164f749d55a871b
TEMP: commeomment EOS code

* need to re-visit and correctly implement this code!

Change-Id: I7e67b1b2b913d14a1d50e2f3ee13e3df80e95ee4
Revert "config: add missing hasTouchpad bool"

This reverts commit c660767722b9ab0ada09a8a4b9702263fa3df1f4.
Revert "Add config to allow to decrease suggested wallpaper size"

This reverts commit bda943a732645fadd2f1a63847266a565183bded.
Fix naming convention merge derps, mostly old EOSConstants

Change-Id: Ie42a3215e322f16a9798936d4bf451786de15448