fix possible buffer overrun and memory leak

Use snprintf instead of sprintf and fclose() before return.

Change-Id: I3ed193464cc0dc90e9935ae19162667ad367628b
Update Dalvik process state through VMRuntime.

We now update Dalvik's process state through VMRuntime when the
process state changes in ActivityThread. This is used to determine
when to do trimming and will be used to determine when to do
compaction in the near future.

Bug: 8981901

Change-Id: I5eea272ba4ec2d1ed789b058d6457cb3c1fcf777
Parse UUID string with Long.parseLong

Integer.parseInt throws an NPE for values greater than 0x7fffffff.
Fix inconsistency in LoggingPrintStream.

LoggingPrintStream prints "null" for null strings from
print(String) but throws an NPE from println(String).

Fix this by delegating to the underlying builder (and avoiding
the "fast" path when the input String == null)

bug: https://code.google.com/p/android/issues/detail?id=63380
Change-Id: I89c5c12db6ed5af8037d46f67369b38c5b4cbc9f
Reimplement ZipFileRO in terms of libziparchive.

This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).

This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.

One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).

bug: 10193060

Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
Merge "Update Dalvik process state through VMRuntime."
Merge "Fix inconsistency in LoggingPrintStream."
Merge "fix possible buffer overrun and memory leak"
Merge "Reimplement ZipFileRO in terms of libziparchive."
Add libutils dependency for libandroidfw host build.

Change-Id: I7fe0bb466f0b1cdbfef8934da2231ad20f05b648
Merge "Add libutils dependency for libandroidfw host build."
Merge "Parse UUID string with Long.parseLong"
Don't try to set service.bootanim.exit

init has never allowed the bootanimation code to
set service.bootanim.exit, and has always generated the
dmesg error message

  <3>[   17.644615] init: sys_prop: permission denied uid:1003  name:service.bootanim.exit

Since setting this property has no effect and never worked, delete
the code which tries to do it.

Change-Id: Idacc5467d85479a8cf974702af8895011be585ea
Merge "Don't try to set service.bootanim.exit"
Merge branch 'master' of https://android.googlesource.com/platform/frameworks/base into HEAD