Fix ViewRootImpl to find missing focus using D-pad.

By using D-pad, no-focus in non touch mode is rare but legal in a case like below.

1. The first request to get focus for a new activity is handled in the first
   performTraversals() call when activity is not ready for a complete view hierarchy.
   So there might be no focusable yet.
2. If the activity has some menus, ActionMenuView can be attached to the view hierarchy
   in the PhoneWindow.preparePanel() soon.
   So there can be focusables but still not focused.

Fixed ViewRootImpl.deliverKeyEventPostIme() to handle this case to resurrect a focus
if there are focusables.

How to reproduce:
(1) Open "API Demos" application -> Views -> Search View
(2) Select "Action Bar" item using the D-pad
(3) Try to focus the Search View, using the D-pad.

Change-Id: Ic379774f0307f168f0ed775d0f6a9078ac5c9713
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>
Fixed typo and space.

Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
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>
Make AudioGroup.add locale safe

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

Change-Id: Ifb477ca590f630747e09e38ac2246d284b5c5bfc
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
return value of String.replace() is ignored.

Change-Id: Id7330e1ffc9f429b22f153d8e644fa7c64354173
Signed-off-by: You Kim <you.kim72@gmail.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
Fix bugs regarding IllegalStateException during moving position in cursorwindow.

"startPos + addedRows < requiredPos" could miss a row in boundary position.
Because of the fluctuating row size, "startPos + addedRows < requiredPos" expression could miss a row in boundary position.
For example, simply speaking,
if window capacity = 120 and requiredPos = 120,
"fillWindow" needs to be newly called and "starPos" is 80 for the window.
Unfortunately 120th row is bigger than the rest size of the window,
the row for requiredPos is not in the window.
Then, startPos has to be newly set and the 120th row has to be included in the window.
But by the expression above "startPos + addedRows < requiredPos",
the row for requiredPos is regarded as included in the window.
In that case, by "mCurrentRowID = Long.valueOf(getLong(mRowIdColumnIndex));" statment in AbstractCursor,
IllegalStateException is thrown.

This patch contains modification of the expression as "startPos + addedRows <= requiredPos".

Change-Id: Iaee75241e495949b0a624b836843da18d0bcb98d
Potential NPE in SQLiteConnection

Change-Id: I4d768bda5ea2fccb4a7c6ce7a5f074bf41563eac
Signed-off-by: Sylvain Becuwe <sylvain.becuwe@gmail.com>
Keep native callbacks when primary SQLiteConnection is recreated

When a database was ATTACHed/DETACHed to a database that had Write-Ahead
Logging enabled, the primary SQLConnection was recreated but the
registered native callbacks were not restored.

Change-Id: I8787fee78e68197ae472e05cc694d11381defa71
fix hover events consume issue

View#onHoverEvent() would always consume hover events over the view
if an application window has the clickable view/widget on it.
That's happened even if accessibility/talkback is disabled.
So those events will not dispatch to activity#onGenericMotionEvent().

The onHoverEvent method should return a real consumed state.

Change-Id: I9cac13b82866e5cdda0b03befb0de752a0a2e741