Fix issue with hardware keys KEY ACTION comparisons.

Menu unlock now works properly.

Patchset 2: Switched detection of onscreen keyboard input to KeyCharacterMap.VIRTUAL_KEYBOARD

Change-Id: I092258fc20789a12123e319ed2dca25c55bb9f0c
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.

Change-Id: I093227f539050a6bad8e6e8d9f533eff7bddd0d6
SystemUI: Make the HSPA+ drawables more consistent with the HSPA drawables

Though the older HSPA+ drawables are sharper, that makes them look
out of place in comparison with the HSPA drawables.

Change-Id: I76313ae0125b3a8fda928b240f33715e48f77867
Fix symbols

the one who did could be lucky I didn't saw on review lmao

corrected

cheers

Change-Id: I21e06e0afceac947571aa96aaa167a30d288e33b
add QuietHours quick settings tile (Frameworks)

Patch set 2: added license text and added "quiet hours off" string
Change-Id: I5676c0b356de47a7aac783b4c13ac2010557d75c
Keyboard light: Fix the physical keyboard not light when it's visiable.

Change-Id: I595afd3cb6b422a17ae0f6ec20aa51979db13810
Sensors could be disabled by any application

In the SensorManager API unregisterListener any application could
unregister any sensor. This lets any application disable a sensor
which another application is using.
This fix restricts the applications to only be able to unregister
a sensor it has previously registered to.

Change-Id: Ief926dd29f480dd97626160810dff87a8d3ac8dc
Removed offensive music genre

The genre is a bad joke, not a real thing.

See http://en.wikipedia.org/wiki/Negerpunk

Change-Id: I073c89e286ef4b8f9d678e1b137c657b26066099
Clarify ViewStub.setVisibility() documentation to state that it works after inflation.

Change-Id: I8414b7002af1a51a10db95758e36c471b51e6355
Signed-off-by: Tim Hutt <tdhutt@gmail.com>
It's 2012. We're always WITH_JIT.

Change-Id: Ia3d1a1b1df06816f2cfa3879ec669b34c62cf9b9
Correct executable bit for source files

Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
Bug fix on installd with SELinux enabled kernel.

setfilecon is not required on libsymlinks when target
doesn't exist. A bootloop is caused without this
change.

Change-Id: I96dbd4b1f47a752bfcaf6016c81fd43083c4a6e1
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Free resources in correct order in ResStringPool::uninit

mOwnedData contains the mHeader data structure

Change-Id: I0ae9ba3a0d18fc3f368c629501fadebce8807198
Switch keystore to binder

Change-Id: I9fa1fc05068bee1eed3f618fb32f70cf3d4c05d4
Re-read shortcut labels if the language has changed

The shortcut label isn't updated to the current language
if the phone's language has changed.

The problem was that the shortcut label is stored in a
static variable which is set once and kept throughout the
life time of the process.

Change-Id: I89c5875fbf28fb82e073166c472ca205d28674fb
Fixed typo and space.

Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
Move NTP updates outside locks

When the ServerThread handles ACTION_SHUTDOWN intent it sometimes get
stuck on mStatsLock in NetworkStatsService.java.
0  com.android.server.net.NetworkStatsService$5.onReceive()
1  android.app.LoadedApk$ReceiverDispatcher$Args.run()
2  android.os.Handler.handleCallback()
3  android.os.Handler.dispatchMessage()
4  android.os.Looper.loop()
5  com.android.server.ServerThread.run()
This happens when the NetworkStats thread is already holding the
mStatsLock while updating NTP.
0  libcore.io.Posix.getaddrinfo()
1  libcore.io.ForwardingOs.getaddrinfo()
2  java.net.InetAddress.lookupHostByName()
3  java.net.InetAddress.getAllByNameImpl()
4  java.net.InetAddress.getByName()
5  android.net.SntpClient.requestTime()
6  android.util.NtpTrustedTime.forceRefresh()
7  com.android.server.net.NetworkStatsService.performPoll()
8  com.android.server.net.NetworkStatsService.access$100()
9  com.android.server.net.NetworkStatsService$2.onReceive()
10 android.app.LoadedApk$ReceiverDispatcher$Args.run()
11 android.os.Handler.handleCallback()
12 android.os.Handler.dispatchMessage()
13 android.os.Looper.loop()
14 android.os.HandlerThread.run()
Since the NTP update consists of several socket operations it may get
stuck long enough to trigger a System Server Watchdog even though the
socket timeout is set to 20 second.
Further, the NTP update doesn't actually need to be performed inside
the locks and an attempt to change this was made earlier, but the code
wasn't actually moved outside the locks.

Change-Id: Ib37a2b8c2d51a01adb7ff01764f82309433703f0
Make transactGetSockaddr locale safe

Explicitly use Locale.US transactGetSockaddr to avoid
unexpected results in some locales.

Change-Id: If8316e543e21e133dc0c821cc390a2b55fe6fcdf
Fix AndroidHttpClient documentation error.

AndroidHttpClient doesn't let the user add HttpRequestInterceptor classes.

Bug: http://code.google.com/p/android/issues/detail?id=37294
Change-Id: I66f6581fa321dc16ddfe35c8f4242bc31f79bdfa
Change the text color of timer in MediaController

The color of timer and backgroud in MediaController
are too closer to distinguish.

Change-Id: Id60ecbc26233857c7ef291ef891c9d4720309dfa
Signed-off-by: Roger Chen <cxr514033970@gmail.com>