Persist install sessions, more lifecycle.

To resume install sessions across device boots, persist session
details and read at boot.  Drop sessions older than 3 days, since
they're probably buggy installers.

Add session callback lifecycle around open/close to give home apps
details about active installs.  Also give them a well-known intent
to show session details.

Extend Session to list staged APKs and open them read-only, giving
installers a mechanism to verify delivered bits, for example using
MessageDigest, before committing.

Switch to generating random session IDs instead of sequential.

Defensively resize app icons if too large.  Reject runaway
installers when they have too many active sessions.

Bug: 16514389
Change-Id: I66c2266cb82fc72b1eb980a615566773f4290498
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index afac239..c3ac012 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -61,6 +61,12 @@
     public static final String SECONDARY_ZYGOTE_SOCKET = "zygote_secondary";
 
     /**
+     * Defines the root UID.
+     * @hide
+     */
+    public static final int ROOT_UID = 0;
+
+    /**
      * Defines the UID/GID under which system code runs.
      */
     public static final int SYSTEM_UID = 1000;