A tiny optimalization

Change-Id: Ib2cb773ffe5cb579c2b46bd0e6a5a3f2c55d190d
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
Lockscreen: option to use carousel animation when switching widgets (1/2)

This will add the option to use a carousel animation when
switching betweeen the widgets on the lockscreen.

Change-Id: I1ad69810b5f012b56cb047dce47a39c1e8f542a2
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Add lockscreen targets (1/2)

Preview: https://dl.dropbox.com/u/31808461/Pictures/Screenshots/Screenshot_2012-12-05-15-19-35.png

Also moved all the symbols that we added to symbols instead of storing on
public (AOSP 4.2 behavior)

Change-Id: I05b5f6cc169111307f2ef03b5a388848e05b035a
Allow custom icons (1/2)
New icons for Lockscreen targets

Credits to CyanogenMod for the base icons. I resized them to match our targets

Change-Id: I96df63f3b912a17e3aea7501ab6547e2ab76e02a
Decide target size depending on class

If it's a custom icon, we scale it down to 50%, but if is application icon, scale it down to 60%
Fix google layout fail

Landscape lockscreen, good one google
Fix layout alignment
Fixes to lockscreen targets

* Fix tablet / phablet derp
* Fix crash when application uninstalled
* Fix icon sizing on big screens (this needs to be tested)
Allow custom icons from gallery on lockscreen targets (1/2)
Underp lockscreen targets

Nothing big, just fix a memory leak :)

Change-Id: I4584c260af50a9a11d78454aece3dbe7bff446e2
Remove CM's Lockscreen shortcut implementaion

 rebase, use Paranoid's Implementation. I find this cleaner and less-hassle free when the first time Jesus shows it to CM's but Danesh didn't like that idea. I do, so i'm merging this to my custom ROM. Props to Jesus David and his team.

Revert "GlowPadView : Re-enable magneticTargets"

This reverts commit b9d9a1269ff16d3e6be1ed3fdeecbaef3fdade29.

Revert "Patchset update: Lockscreen Shortcuts"

This reverts commit 3db4ea267a7e4555e0d36344103138efac753018.

Revert "Lockscreen Shortcut - Patchset update"

This reverts commit 26eae55763fec6cfbd5f34778c2bd01800b62594.

Change-Id: Ide5d7fe89d27dfe0c43c1c82c9827f7669757415

Revert "Framework : Lockscreen - Customizable shortcuts"

This reverts commit 0ec604bd0381c3a7598255bc1406870c42e4b4f8.

Change-Id: I6610ae613f3acfc0c5f975cb9b522ad6145745ce