Enable Copy/Paste in Google Talk

Thanks to TeamBAMF: http://www.teambamf.net/topic/4465-modhowto-enable-copypaste-for-google-talk/

Change-Id: Icf20b68fc6fb9eef4c9fbe848c7fa803cead5038
show SELECT ALL icon with text in landscape mode

Though set config_allowActionMenuItemTextWithIcon as true,
icon for the "SELECT ALL" menu on ActionBar is not shown as staring
in landscape mode.
To fix it, use "SELECT ALL" icon in onCreateActionMode() to show the
icon and text together.

To show or hide text is decided by updateTextButtonVisibility() of
core/java/com/android/internal/view/menu/ActionMenuItemView.java

STEPS TO REPRODUCE: (please be specific)
1. launch Browser/Chrome and go to google.com
2. rotate to landscape mode
3. long press on URL address

Bug: 8073761
Change-Id: Ie0e0aa45f0dff609ed8c03e4423b163bad5452ed
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
Another optimization of glyph cache uploads

Previously, cache textures were updated whenever mCurrentCacheTexuture was changed.
Since updating cache textures needs glTexSubImage2D call, frequent changing
of mCurrentCacheTexture (which can easily happen when an app uses lots of unique glyphs
even with precaching) caused many glTexSubImage2D calls and bad framerates.
This patch optimized isssueDrawCommand function. Consequently, changing mCurrentCacheTexture doesn't
cause glTexSubImage2D call any more and it will improve font rendering performance.

Change-Id: Id19d959fa0e69eeb2a39f83a57e311d7394586b2
Signed-off-by: Sangkyu Lee <geteuid@gmail.com>
resolver list is not cleared on rebuild

Refactoring ResolverActivity.java

Change-Id: I84e6420ff98ddcafd27a52b041ddb1c50e7d7362
Signed-off-by: You Kim <you.kim72@gmail.com>
Try go-negotiation when invocation request is deferred.

Devices setting persistent_reconnect to 0 in wpa_supplicant returns "information is currently unable" error.
In that case, the connection establishment was always failed when the other device does NOT handle the invitation request.
So, try go-negotiation for interoperability.

Change-Id: Ia30a1c63d1bb4acc186a71248fb0aa5ea7edc627
Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
AsyncChannel to support remote death notification and post a
disconnect message to the source handler.

Change-Id: I7368cb466d9e33f7da8095ef2de25fc70f13d47e
Fix EventLog string class problem in onOptionMenuSelected

EventLog function can handle string,integer class and long class. (in android_util_EventLog.cpp)
If menu title string are used bold tag(like <b>test</b>), it'll be android.text.SpannedString.
In onOptionMenuSelected, it is using item.getTitleCondensed() function for writing event log.
therefore any android activity using tag menu string(like <b></b>) can be crashed by IllegalArgumentException.

I found this crash on GMS Application.
change locale chinese -> launch Google+ -> hangout -> menu key -> Invite(expressed chinese) click -> Google+ crash

Change-Id: I0437be81699925e29bf4510eb615ef2424432763
convert jint to uint32_t.

This works around a compiler bug, and is probably more
correct anyway.

Change-Id: I1c49064bd64c31dafae560e416c665de0449f245
return value of String.replace() is ignored.

Change-Id: Id7330e1ffc9f429b22f153d8e644fa7c64354173
Signed-off-by: You Kim <you.kim72@gmail.com>
Ensure running mTouchModeReset when AbsListView is detached

mTouchModeReset should be executed when AbsListView is detached from window.
If not, when the AbsListView is re-attaced to window,
the child can retain a pressed state.

You can see this problem easily when you double-touch an item of
option menu very quickly.

Change-Id: I5aaa1fd5b95847efb2f5f1b5ec7cabe8eb85b237
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter

Fix for Issue ID 18316. Make isEmpty() return false when getCount() returns a non-zero value. So that the list cannot be considered empty when a header or footer is present.

https://code.google.com/p/android/issues/detail?id=18316

Change-Id: Ib69201e9d5ef3efcbb68ea298b8cc8ca6e027246
Signed-off-by: Emma Sajic <esajic@effectivelateralsolutions.co.uk>
Add return after NULL check in JetPlayer

When pointer lpJet is NULL, it should return.

Change-Id: Ia0471173b57da8f9bf22b3a19479aa5b3c4a5acb
NsdService: Clear client info after resolution request is serviced.

Currently, the client requests tracked in mClientIds for resolution
requests isn't cleared at all and causes failues of additional registration
and discovery requests once the number of requests reaches MAX_LIMIT. In
addition, bubble up unhandled native events to default state of nsd state
machine.

Change-Id: Ief14e0fff644aa2698fcddd71f538820f802be58
Set "isdrm" info in Mediastore

The mediascanner member mIsDrm was never set
according to the drmframework canHandle call.
This subsequently caused that the isdrm column
in mediastore was never set, and was defaulted
to false for all files.
mIsDrm is now set according to drmframework
canHandle result for each files that is scanned.

Change-Id: Id557d921c4e3e3dfc35da56b69471f4bd6b3c8bf
Fix NullpointException problem in onMenuItemSelected

If both title and condensed title is null,
item.getTitleCondensed() could be return null value
in onMenuItemSelected. therefore need to check
whether retun value is null or not.

Change-Id: Ib08f52b949a794aa7bd6cc25414041e820f62969
Change default intent

Older JB releases have a bug handling persistence invocation. One work
around right now is to have the newer release (with persistence)
use  a lower intent value to allow older release to operate in group
owner mode.

Change-Id: I7ffb66081a352929a6f421e5d6141f592be7d472
Fix unexpected rotation change when re-enabling auto-rotate

getProposedRotation() method returns old value when re-enabling
auto-rotate option. So you can see unexpected rotation change
with the following steps.

settings -> display -> enable auto-rotate
-> rotate device to landscape -> disable auto-rotate
-> rotate device to portrait -> enable auto-rotate

This patch makes mSensorEventListener reset before it is registered again.

Bug: 7964531

Change-Id: I6a8d287bbd9809ef31de67c54efb885e9a4fd76f
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
avoid multiple-"0" to exceed the length of upper bound

Limits number of "0"s not to exceed length of maximum number allowed
for the NumberPicker.

Steps to reproduce:
1. Settings -> Date & time -> uncheck "Automatic date & time"
2. Select "Set time"
3. Select Time Area on Set time dialog
4. insert 00000000 via NumberPicker

Bug: 8073759
Change-Id: I0f3f5303d9a4b559217adb436f244407a23e58c0
add reply.writeNoException() for quick response

In case of SET_ACTIVITY_CONTROLLER_TRANSACTION, there is no reply transaction.
So makes same to other transactions.

Change-Id: I3b9527682662a12f78cc96b6084904f18178fee7