Prevent Lockscreen album art from activating FLAG_KEEP_SCREEN_ON

This is a small fix to the showWallpaper method, in which a power
consumption problem has been introduced. This showWallpaper method
toggles the window flag FLAG_SHOW_WALLPAPER, when album art is being
shown in Lockscreen. It is important to set pixel format to
PixelFormat.OPAQUE if flag FLAG_SHOW_WALLPAPER is not being set.

If not, an application that uses window flag FLAG_KEEP_SCREEN_ON
will prevent the keyguard from going to sleep and drain battery.

Change-Id: I1808be28047977ae5ac4dd1168ea25cac8a55a78
Don't attempt to launch disabled activities in smoke test.

Also remove the superfluous runner from manifest.

Change-Id: I194b260d443d9bd4a16f62893bb2f7bcfb7ed40e
remove unnecessary switchUser call

If userId doesn't change, no need to do switchuser.or it will
introduce some tweak for gps modules in quick off/on because
they need cost time in off/on.

Change-Id: Ie5e408dc8be69c8a63a18bcb2cfe478cef4d70e6
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Null pointer exception in FileRotator.java

Sometimes a null pointer exception is thrown when examining files
managed by the file rotator.

The logs from the test show that the Wifi state is changed a large
number of times. On every state change, a write operation is
initiated on the file system. This will eventually result in out
of memory and the call to mBasePath.list() in the maybeRotate(...)
method in FileRotator.java will return null so the iteration will
throw a NullPointerException.

Change-Id: I5d5980d9593bc9ec75281169ca27ee591809903f
NsdService does not clean up after exiting clients

When a client of the NsdService exits, NsdService should
clean up the requests it has sent to the mDNS daemon:
cancel any pending resource-discovery and resource-resolution
queries, and remove any services registered by this client.

If this isn't done, several bad things happen. The daemon will
continue to run unnecessarily, will report service discoveries
that can't be forwarded on to the client, and will continue to
advertise service ports for an application which is no longer
running until the device is rebooted (mDNS pollution).

Bug: 9801184
Change-Id: I0aa7311480322aefcff16f902fbbf34f50985d38
Merge "NsdService does not clean up after exiting clients"
Fix layoutlib build.

Was using private data structures from libcore.

Change-Id: I5bd43190081891659e18b5c871686e6078efcc81
Merge "Fix layoutlib build."
Merge "remove unnecessary switchUser call"
Move options buffers to top scope

It is important that the char buffers for options do
not go out of scope as the mOptions.add() does not copy
the buffer.  This moves all the buffers to the top
level scope of the function to prevent accidental
overwriting when they go out of scope.

Bug: 13448497
Change-Id: I5a97ddd32ff34f237915927906e1e1f833ff036e
Merge "Move options buffers to top scope"
Merge "Don't attempt to launch disabled activities in smoke test."
Pass int32_t for JNI calls to java Input/Output streams.

Passing size_t is problematic on 64 bit platforms where
it's 8 bytes in size. Conversion to int32_t is safe because
the size argument is always clamped to fCapacity, which is
4 bytes wide.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Change-Id: I58558561a4f56451485f1a5fc6cdeda677247071
Merge "Null pointer exception in FileRotator.java"
Insufficient ProcessRecord cleanup when persistent process is killed

When persistent process with Service restarts, ActivityManagerService
does not reset ProcessRecord#hasClientActivites to false
(because ProcessRecord of persistent process is continued using
after killing).

It disturbs updating LRU list in ActivityManagerService, and then,
when new process calls ActivityManagerProxy#publishContentProviders,
SecurityException happens because of no entry in the list.

Bug: 13517358

Change-Id: I46b064f71a4f7025ade1bf117801352a7ab22e6a
Merge "Pass int32_t for JNI calls to java Input/Output streams."
Merge "Insufficient ProcessRecord cleanup when persistent process is killed"
PacProcessor should be 32 bit only.

It depends on external/v8, which isn't ready for 64 bit yet.

Change-Id: Ibc9705665b81d3667826dedd6217f2eb6d451c81
Don't register methods when there's nothing to register.

Change-Id: I6d0233f79bb90089426d702b4076ec5750e82475
Fix 64 bit compile failures in renderscript

Use uintptr_t for pointers (and not uint32_t) and
also don't assume that size_t is 32 bits wide.

Also uses java longs for passing pointers across
JNI boundaries.

Change-Id: Ie52bd8ae967fbddc911eda3a43cc799d53bbce66