Check and fail early if requested wallpaper size exceeds maximum texture size.

This fixes an issue where OpenGL initialization succeeds but buffer allocation fails because the requested wallpaper size
is too large (or otherwise unsupported) by the graphics hardware. This fixes an issue where SystemUI crashes constantly
on the PandaBoard when connected to a full HD display. Tested only on PandaBoard, no access to alternative hardware.
Signed-off-by: Wim Vander Schelden <wim.vander.schelden@philips.com>

Change-Id: I8d2e1ae9fd9772977c4e365f23f2f58bbca3787c
jni: remove obsolete flag from makefile

Change-Id: Ia7e67694a736745333e9d36396b8cb6194fd26ec
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Use getRelativeDayString in getRelativeTimeSpanString.

The bug we're fixing here is that languages that don't
distinguish the "one" case grammatically (such as Japanese)
would say the equivalent of "In 1 day" rather than "Tomorrow"
because of the misuse of getQuantityString.

This has the side-effect of switching us over to the CLDR
strings for relative day names, which have consistent capitalization;
the Android donottranslate-cldr.xml strings varied even within
a language, so although this is a change, it seems like a step
in the right direction.

In a future change, we should actually push all relative
day formatting down into icu4c.

Bug: 7098707
Change-Id: Ia2f9af3d18c441d6093dd5da7956a3d0130e5b06
Revert "use utf8_length() instead of local function, isValidUtf8()"
This reverts commit 1a8b6c2

Reason for revert: utf8_length handles a slightly different range than
the checkjni code, so it's possible for a given string to pass the
utf8_length check, but then fail the jni  check.

Change-Id: I81e15c95edd8f89782d8ad9025e68502b9340f22
"[+>" more icon was never shown in PhoneStatusBar

"[+>" more icon was never show in status bar because
the member variable for this icon was not initialized
from resources. This fix enables "[+>" icon to appear
in status bar when the number of indications in status
bar becomes large.

Bug: 8368569
Change-Id: Ieb3412eed831052d69c0cf63c9b4230c38171e4a
Fix NPE when pasting non-text from Clipboard

When copying a link from a bookmark and then pasting it into
a textfield a NullPointerException will occur.
A ClipData.Item is not guaranteed to always contain a text string
and therefore getText() can be set to null.

Using method coerceToText() instead of getText() makes sure that
a text string is always returned.

Change-Id: I81343c0371835a3a7a52045dcd1760e69e59a967
Fix resource leak: When call MediaMetadataRetriever.setDataSource or getFrameAtTime should ensure call release in finally to avoid resource leak
                   Patch set 2: Remove unnecessary white spaces

Change-Id: I49a7f2fb99dc8b9560e7c17421125356e45a87ac
Fix potential deadlock between LockScreen and WindowManagerService

If LockScreen is enhanced using SurfaceView/GLSurfaceView,
deadlock problem between LockScreen and WindowManagerService
can occur because of IWindow.resized() callback.
And it must lead to watchdog and reset.

IWindow.resized() callback is one-way function so calling resized()
callback of a remote IWindow object is never blocked.
However, calling resized() callback of a local IWindow object
(LockScreen is running on the same system_server process)
is always blocked until resized() callback returns.
Because resized() callback of SurfaceView/GLSurfaceView can lead to
WindowManagerService.relayoutWindow() call, deadlock can occur
between relayoutWindow() and performLayoutAndPlaceSurfacesLockedInner().
(Both functions need locking mWindowMap)

So this patch simulate one-way call when calling resized() callback
of a local IWindow object.

Change-Id: I2a6a5c74ed22d8e6b7a3bea3424ff2879d227105
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Fix Photosphere/Camera FCs

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.

On TF101 (and probably other devices) the camera HAL doesn't handle
FLASH_MODE & SCENE_MODE and so it sends the required RuntimeException
for these, which makes Photosphere FC the Camera app.

=> Fix: check device capabilities & ignore these 2 parameters if the device doesn't support them.

Fix based on following Team EOS patch: https://review.teameos.org/#/c/1598/

Change-Id: Idd80299802e9213a3c40414ace3d516d39f47783
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: Ifcd3eed8938570604e2c7ba7600eecdba8c9b191
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>