Lockscreen Targets : Make multi-user compatible

Use getStringForUser instead of getString since the framework always run as root user (0)
Navbar : Fix left over glow

Invalidate all buttons, to avoid nearby glow interference
Fix starting window memory leak

If starting window is added to arrays like mViews in
WindowManagerImpl.java, but not accepted by WindowManagerService,
we leak starting windows. To avoid leaking, remove the view
from WindowManager.

Change-Id: I4d98b883e9dfaf5e71bdece385643ba1b59b2633
Function uri.getAuthority is called twice. Minor doc corrections.

Function uri.getAuthority was called twice in methods acquireProvider
and acquireExistingProvider was called twice although a parameter
representing the value had existed. The second call to the function is
changed to the parameter. The parameter's modifier changed to final.
Minor corrections in function descriptions in the file.

Signed-off-by: Yury Zhauniarovich <y.zhalnerovich@gmail.com>
Change-Id: Id003aa38c17d644357873c41a8f5ec455e46a4b7
bootanim: Don't cache textures if they're expected to use a lot of VRAM

bootanimation cached all the textures generated until the animation
was completed.
For Hi-res animations with lots of frames (like the new CM9 anim on
xhdpi devices), this implied using large amounts of video RAM, more
than most devices actually have available, causing the animation to
stall (and in some cases, gralloc to lock up); so if an animation is
expected to use a lot of RAM (rough estimation based on frame size
and number of frames), disable cache entirely and generate the textures
on demand

Change-Id: I157e5cdde2aab1d82d980d77cbedd9f127c83a1d

Conflicts:

	cmds/bootanimation/BootAnimation.cpp
bootanimation: performance enhancements

This patch implements two simple performance enhancements, which
might benefit devices. They are completely opt-in by setting
the following variables.

  * TARGET_BOOTANIMATION_PRELOAD: will preload the bootanimation
    zip to memory; this is handy on devices where the storage
    might be slow. By preloading it, we get quick access to the
    zip file, and the animation doesn't stutter.

  * TARGET_BOOTANIMATION_TEXTURE_CACHE: allows maintainers to
    force texture cache on/off.

Also fixes the sign warnings related to int / size_t comparison

Change-Id: Ie92d1b0aa90b43ba39c368a2a33657a60c3a64b5

Conflicts:

	cmds/bootanimation/BootAnimation.cpp
bootanimation: fix usage of LOGW

Change-Id: I1d59df9f44f414d80058a532644cbbb40e22c701
add prebuilts for extra camera effects

Signed-off-by: Roman Birg <romanbirg@gmail.com>
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
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
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
DateView: Use Intent.ACTION_LOCALE_CHANGED to refresh notification bar clock

Add the Intent.ACTION_LOCALE_CHANGED to DateView BroadcastReceiver for detect when the
user change the locale. Otherwise, the notification bar clock is not refreshed until
the next tick or time changed occurs.

Change-Id: Ic8830fbabf24b62b60a6d3babe5e211f14948d08
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
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.
Enable multi-user support for volume_link_notification
Suppress String resources build warnings

warnings suppressed are:
aapt: warning: **** string '%s' has no default or required localization for
aapt: warning: string '%s' has no default translation in

Patch Set 2: move ifdef and only suppress warnings for packages that
             define NO_DEFAULT_TRANSLATION_WARNINGS and/or
             NO_LOCALIZATION_WARNING

Patch Set 3: by default do not show warnings unless
             SHOW_DEFAULT_TRANSLATION_WARNINGS and/or
             SHOW_LOCALIZATION_WARNINGS

Change-Id: I50ef2a623959a1cc53053b446328df8e34cc99e8
ActivityManagerService: stay away from zombie content providers

When the lowmemorykiller kills a content provider in an unfortunate
moment, an innocent client app can become attached to a zombie provider
and be unconditionally killed moments after, when the dead provider is
being removed.
Prevent this race by addition of isAlive function to Process.java that
determines whether a process is still running and is not only a zombie,
add a check of the state of the provider process to getContentProviderImpl.

Change-Id: Id753b8dab103e4b447c4138468938ca9f5cb857d
ContentProviderRecord: Remove external process reference when finalized

ContentProviderRecords is removed from provider map by activity manager service
when the process hosting the content providers terminates and this causes GC
to free the content provider records but the reference to external process
using the content provider isn't cleared. Fix is to clear the reference and
unlink for death notification.

Change-Id: I67fd10cee57b02257792d0c9b4569fe11dea7648