Merge "Updated dialog and toast assets." into honeycomb
diff --git a/api/current.xml b/api/current.xml
index 7e81eb7..4f0898e 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -170972,49 +170972,6 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<method name="bindAllocation"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="va" type="android.renderscript.Allocation">
-</parameter>
-<parameter name="slot" type="int">
-</parameter>
-</method>
-<method name="invoke"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="slot" type="int">
-</parameter>
-</method>
-<method name="invoke"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="slot" type="int">
-</parameter>
-<parameter name="v" type="android.renderscript.FieldPacker">
-</parameter>
-</method>
 <method name="setTimeZone"
  return="void"
  abstract="false"
@@ -171028,122 +170985,6 @@
 <parameter name="timeZone" type="java.lang.String">
 </parameter>
 </method>
-<method name="setVar"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="index" type="int">
-</parameter>
-<parameter name="v" type="float">
-</parameter>
-</method>
-<method name="setVar"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="index" type="int">
-</parameter>
-<parameter name="v" type="double">
-</parameter>
-</method>
-<method name="setVar"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="index" type="int">
-</parameter>
-<parameter name="v" type="int">
-</parameter>
-</method>
-<method name="setVar"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="index" type="int">
-</parameter>
-<parameter name="v" type="long">
-</parameter>
-</method>
-<method name="setVar"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="index" type="int">
-</parameter>
-<parameter name="v" type="boolean">
-</parameter>
-</method>
-<method name="setVar"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="index" type="int">
-</parameter>
-<parameter name="o" type="android.renderscript.BaseObj">
-</parameter>
-</method>
-<method name="setVar"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="index" type="int">
-</parameter>
-<parameter name="v" type="android.renderscript.FieldPacker">
-</parameter>
-</method>
-<field name="MAX_SLOT"
- type="int"
- transient="false"
- volatile="false"
- value="16"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 </class>
 <class name="Script.Builder"
  extends="java.lang.Object"
@@ -171267,26 +171108,6 @@
 >
 </field>
 </class>
-<class name="Script.Invokable"
- extends="java.lang.Object"
- abstract="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="execute"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-</class>
 <class name="ScriptC"
  extends="android.renderscript.Script"
  abstract="false"
@@ -171295,32 +171116,6 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<constructor name="ScriptC"
- type="android.renderscript.ScriptC"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="id" type="int">
-</parameter>
-<parameter name="rs" type="android.renderscript.RenderScript">
-</parameter>
-</constructor>
-<constructor name="ScriptC"
- type="android.renderscript.ScriptC"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="protected"
->
-<parameter name="rs" type="android.renderscript.RenderScript">
-</parameter>
-<parameter name="resources" type="android.content.res.Resources">
-</parameter>
-<parameter name="resourceID" type="int">
-</parameter>
-</constructor>
 </class>
 <class name="Short2"
  extends="java.lang.Object"
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index 9d5d742..46a29a9 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -111,6 +111,15 @@
  *     computation finishes. The result of the background computation is passed to
  *     this step as a parameter.</li>
  * </ol>
+ * 
+ * <h2>Cancelling a task</h2>
+ * <p>A task can be cancelled at any time by invoking {@link #cancel(boolean)}. Invoking
+ * this method will cause subsequent calls to {@link #isCancelled()} to return true.
+ * After invoking this method, {@link #onCancelled()}, instead of {@link #onPostExecute(Object)}
+ * will be invoked after {@link #doInBackground(Object[])} returns. To ensure that
+ * a task is cancelled as quickly as possible, you should always check the return
+ * value of {@link #isCancelled()} periodically from {@link #doInBackground(Object[])},
+ * if possible (inside a loop for instance.)</p>
  *
  * <h2>Threading rules</h2>
  * <p>There are a few threading rules that must be followed for this class to
@@ -157,7 +166,6 @@
 
     private static final int MESSAGE_POST_RESULT = 0x1;
     private static final int MESSAGE_POST_PROGRESS = 0x2;
-    private static final int MESSAGE_POST_CANCEL = 0x3;
 
     private static final InternalHandler sHandler = new InternalHandler();
 
@@ -197,47 +205,33 @@
         mWorker = new WorkerRunnable<Params, Result>() {
             public Result call() throws Exception {
                 Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
-                return doInBackground(mParams);
+
+                Result result = doInBackground(mParams);
+
+                Message message = sHandler.obtainMessage(MESSAGE_POST_RESULT,
+                        new AsyncTaskResult<Result>(AsyncTask.this, result));
+                message.sendToTarget();
+
+                return result;
             }
         };
 
         mFuture = new FutureTask<Result>(mWorker) {
-
-            @Override
-            protected void set(Result v) {
-                super.set(v);
-                if (isCancelled()) {
-                    Message message = sHandler.obtainMessage(MESSAGE_POST_CANCEL,
-                            new AsyncTaskResult<Result>(AsyncTask.this, (Result[]) null));
-                    message.sendToTarget();
-                }
-            }
-
             @Override
             protected void done() {
-                Message message;
-                Result result = null;
-
                 try {
-                    result = get();
+                    get();
                 } catch (InterruptedException e) {
                     android.util.Log.w(LOG_TAG, e);
                 } catch (ExecutionException e) {
                     throw new RuntimeException("An error occured while executing doInBackground()",
                             e.getCause());
                 } catch (CancellationException e) {
-                    message = sHandler.obtainMessage(MESSAGE_POST_CANCEL,
-                            new AsyncTaskResult<Result>(AsyncTask.this, (Result[]) null));
-                    message.sendToTarget();
-                    return;
+                    // Taken care of in the WorkerRunnable
                 } catch (Throwable t) {
                     throw new RuntimeException("An error occured while executing "
                             + "doInBackground()", t);
                 }
-
-                message = sHandler.obtainMessage(MESSAGE_POST_RESULT,
-                        new AsyncTaskResult<Result>(AsyncTask.this, result));
-                message.sendToTarget();
             }
         };
     }
@@ -279,14 +273,16 @@
     }
 
     /**
-     * Runs on the UI thread after {@link #doInBackground}. The
-     * specified result is the value returned by {@link #doInBackground}
-     * or null if the task was cancelled or an exception occurred.
+     * <p>Runs on the UI thread after {@link #doInBackground}. The
+     * specified result is the value returned by {@link #doInBackground}.</p>
+     * 
+     * <p>This method won't be invoked if the task was cancelled.</p>
      *
      * @param result The result of the operation computed by {@link #doInBackground}.
      *
      * @see #onPreExecute
      * @see #doInBackground
+     * @see #onCancelled() 
      */
     @SuppressWarnings({"UnusedDeclaration"})
     protected void onPostExecute(Result result) {
@@ -306,7 +302,8 @@
     }
 
     /**
-     * Runs on the UI thread after {@link #cancel(boolean)} is invoked.
+     * Runs on the UI thread after {@link #cancel(boolean)} is invoked and
+     * {@link #doInBackground(Object[])} has finished.
      *
      * @see #cancel(boolean)
      * @see #isCancelled()
@@ -316,7 +313,9 @@
 
     /**
      * Returns <tt>true</tt> if this task was cancelled before it completed
-     * normally.
+     * normally. If you are calling {@link #cancel(boolean)} on the task,
+     * the value returned by this method should be checked periodically from
+     * {@link #doInBackground(Object[])} to end the task as soon as possible.
      *
      * @return <tt>true</tt> if task was cancelled before it completed
      *
@@ -327,14 +326,22 @@
     }
 
     /**
-     * Attempts to cancel execution of this task.  This attempt will
+     * <p>Attempts to cancel execution of this task.  This attempt will
      * fail if the task has already completed, already been cancelled,
      * or could not be cancelled for some other reason. If successful,
      * and this task has not started when <tt>cancel</tt> is called,
-     * this task should never run.  If the task has already started,
+     * this task should never run. If the task has already started,
      * then the <tt>mayInterruptIfRunning</tt> parameter determines
      * whether the thread executing this task should be interrupted in
-     * an attempt to stop the task.
+     * an attempt to stop the task.</p>
+     * 
+     * <p>Calling this method will result in {@link #onCancelled()} being
+     * invoked on the UI thread after {@link #doInBackground(Object[])}
+     * returns. Calling this method guarantees that {@link #onPostExecute(Object)}
+     * is never invoked. After invoking this method, you should check the
+     * value returned by {@link #isCancelled()} periodically from
+     * {@link #doInBackground(Object[])} to finish the task as early as
+     * possible.</p>
      *
      * @param mayInterruptIfRunning <tt>true</tt> if the thread executing this
      *        task should be interrupted; otherwise, in-progress tasks are allowed
@@ -444,8 +451,11 @@
     }
 
     private void finish(Result result) {
-        if (isCancelled()) result = null;
-        onPostExecute(result);
+        if (isCancelled()) {
+            onCancelled();
+        } else {
+            onPostExecute(result);
+        }
         mStatus = Status.FINISHED;
     }
 
@@ -462,9 +472,6 @@
                 case MESSAGE_POST_PROGRESS:
                     result.mTask.onProgressUpdate(result.mData);
                     break;
-                case MESSAGE_POST_CANCEL:
-                    result.mTask.onCancelled();
-                    break;
             }
         }
     }
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index bde467b..7af611e 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -130,12 +130,15 @@
     private MotionEvent.PointerCoords[] mTmpPointerCoords;
 
     // For debugging only.  You can see these in hierarchyviewer.
+    @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
     @ViewDebug.ExportedProperty(category = "events")
     private long mLastTouchDownTime;
     @ViewDebug.ExportedProperty(category = "events")
     private int mLastTouchDownIndex = -1;
+    @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
     @ViewDebug.ExportedProperty(category = "events")
     private float mLastTouchDownX;
+    @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
     @ViewDebug.ExportedProperty(category = "events")
     private float mLastTouchDownY;
 
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.png
index 336a820..97ac023 100644
--- a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.png
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_alarm.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.png
index ebef531..4210db2 100644
--- a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.png
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_charging.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.png
index 405e218..1060f5a 100644
--- a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.png
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_lock.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.png b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.png
index f349b63..72e4afa 100644
--- a/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.png
+++ b/core/res/res/drawable-xlarge-mdpi/ic_lock_idle_low_battery.png
Binary files differ
diff --git a/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml b/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml
index c2d87a2..4bc7292 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_password_landscape.xml
@@ -22,18 +22,23 @@
     android:layout_height="match_parent"
     android:orientation="horizontal"
         >
-    
-    <!-- left side: status and emergency call button -->
-    <LinearLayout
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:layout_width="0dip"
-            android:orientation="vertical"
-            android:gravity="center_vertical"
-                >
-        <include layout="@layout/keyguard_screen_status_land" />
-    </LinearLayout>
-    
+
+    <!-- left side: status -->
+    <RelativeLayout
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:layout_width="0dip">
+
+        <include layout="@layout/keyguard_screen_status_land"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="102dip"
+            android:layout_marginTop="320dip"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentLeft="true"/>
+
+    </RelativeLayout>
+
     <!-- right side: password -->
     <LinearLayout
         android:layout_width="0dip"
diff --git a/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml b/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml
index 0927e59..e63fb9b 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_password_portrait.xml
@@ -19,21 +19,23 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
-        >
-    
-    <!-- left side: status and emergency call button -->
-    <LinearLayout
+    android:orientation="vertical">
+
+    <!-- top: status -->
+    <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="0dip"
-            android:layout_weight="1"
-            android:orientation="vertical"
-            android:gravity="center_vertical"
-                >
-        <include layout="@layout/keyguard_screen_status_land" />
-    </LinearLayout>
-    
-    <!-- right side: password -->
+            android:layout_weight="1">
+        <include layout="@layout/keyguard_screen_status_port"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="134dip"
+            android:layout_marginLeft="266dip"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentLeft="true"/>
+    </RelativeLayout>
+
+    <!-- bottom: password -->
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="0dip"
diff --git a/core/res/res/layout-xlarge/keyguard_screen_status_land.xml b/core/res/res/layout-xlarge/keyguard_screen_status_land.xml
index f91fe4f..0a485e2 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_status_land.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_status_land.xml
@@ -23,8 +23,6 @@
         android:orientation="vertical"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="140dip"
-        android:layout_marginTop="20dip"
         android:gravity="left"
         >
 
@@ -58,7 +56,7 @@
             android:layout_height="wrap_content"
             android:singleLine="true"
             android:ellipsize="none"
-            android:textSize="120sp"
+            android:textSize="98sp"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:textColor="@color/lockscreen_clock_background"
             android:layout_marginBottom="6dip"
@@ -69,7 +67,7 @@
             android:layout_height="wrap_content"
             android:singleLine="true"
             android:ellipsize="none"
-            android:textSize="120sp"
+            android:textSize="98sp"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:textColor="@color/lockscreen_clock_foreground"
             android:layout_alignLeft="@id/timeDisplayBackground"
@@ -92,15 +90,29 @@
 
     </com.android.internal.widget.DigitalClock>
 
-    <TextView
-        android:id="@+id/date"
+    <LinearLayout
+        android:orientation="horizontal"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_below="@id/time"
-        android:layout_marginTop="10dip"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textSize="22sp"
-        />
+        android:layout_marginTop="10dip">
+
+        <TextView
+            android:id="@+id/date"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textSize="17sp"/>
+
+        <TextView
+            android:id="@+id/alarm_status"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="30dip"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textSize="17sp"/>
+
+    </LinearLayout>
 
     <!-- Status2 is generally charge status  -->
     <TextView
@@ -109,18 +121,19 @@
         android:layout_height="wrap_content"
         android:layout_alignParentTop="true"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textSize="22sp"
+        android:textSize="17sp"
         android:layout_marginTop="10dip"
         android:drawablePadding="4dip"
+        android:visibility="gone"
         />
 
-    <!-- Status1 is generally alarm status -->
+    <!-- Status1 is generally battery status and informational messages -->
     <TextView
         android:id="@+id/status1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="10dip"
-        android:textSize="22sp"
+        android:textSize="17sp"
         android:textAppearance="?android:attr/textAppearanceMedium"
         />
 
@@ -130,9 +143,10 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textSize="22sp"
+        android:textSize="17sp"
         android:layout_marginTop="20dip"
         android:singleLine="false"
+        android:textColor="@color/lockscreen_owner_info"
         android:visibility="invisible"
         />
 </LinearLayout>
diff --git a/core/res/res/layout-xlarge/keyguard_screen_status_port.xml b/core/res/res/layout-xlarge/keyguard_screen_status_port.xml
index c529e0b..346b21e 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_status_port.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_status_port.xml
@@ -44,8 +44,6 @@
     <com.android.internal.widget.DigitalClock android:id="@+id/time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentLeft="true"
         android:layout_marginTop="8dip"
         android:layout_marginBottom="8dip"
         android_layout_marginLeft="-10dip">
@@ -57,7 +55,7 @@
             android:layout_height="wrap_content"
             android:singleLine="true"
             android:ellipsize="none"
-            android:textSize="120sp"
+            android:textSize="98sp"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:textColor="@color/lockscreen_clock_background"
             android:layout_marginBottom="6dip"
@@ -68,7 +66,7 @@
             android:layout_height="wrap_content"
             android:singleLine="true"
             android:ellipsize="none"
-            android:textSize="120sp"
+            android:textSize="98sp"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:textColor="@color/lockscreen_clock_foreground"
             android:layout_marginBottom="6dip"
@@ -91,15 +89,29 @@
 
     </com.android.internal.widget.DigitalClock>
 
-    <TextView
-        android:id="@+id/date"
+    <LinearLayout
+        android:orientation="horizontal"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_below="@id/time"
-        android:layout_marginTop="10dip"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textSize="22sp"
-        />
+        android:layout_marginTop="10dip">
+
+        <TextView
+            android:id="@+id/date"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textSize="17sp"/>
+
+        <TextView
+            android:id="@+id/alarm_status"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="30dip"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textSize="17sp"/>
+
+    </LinearLayout>
 
     <!-- used for status such as the next alarm, and charging status.  -->
     <TextView
@@ -108,9 +120,10 @@
         android:layout_height="wrap_content"
         android:layout_alignParentTop="true"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textSize="22sp"
+        android:textSize="17sp"
         android:layout_marginTop="10dip"
         android:drawablePadding="4dip"
+        android:visibility="gone"
         />
 
     <TextView
@@ -118,7 +131,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="10dip"
-        android:textSize="22sp"
+        android:textSize="17sp"
         android:textAppearance="?android:attr/textAppearanceMedium"
         />
 
@@ -129,8 +142,9 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="20dip"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textSize="22sp"
+        android:textSize="17sp"
         android:singleLine="false"
         android:visibility="invisible"
+        android:textColor="@color/lockscreen_owner_info"
         />
 </LinearLayout>
diff --git a/core/res/res/layout-xlarge/keyguard_screen_tab_unlock.xml b/core/res/res/layout-xlarge/keyguard_screen_tab_unlock.xml
index c76e833..1c7b7e2 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_tab_unlock.xml
@@ -29,15 +29,18 @@
     android:id="@+id/root"
     android:background="#70000000">
 
-    <!-- left side: status and emergency call button -->
-    <LinearLayout
+    <!-- top: status -->
+    <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="0dip"
         android:layout_weight="1"
-        android:orientation="vertical"
-        android:gravity="center_vertical">
-        <include layout="@layout/keyguard_screen_status_port" />
-    </LinearLayout>
+        android:orientation="vertical">
+        <include layout="@layout/keyguard_screen_status_port"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="134dip"
+            android:layout_marginLeft="266dip"/>
+    </RelativeLayout>
 
     <LinearLayout
             android:layout_width="match_parent"
@@ -75,6 +78,7 @@
             android:text="@string/emergency_calls_only"
             android:textAppearance="?android:attr/textAppearanceSmall"
             android:textColor="@color/white"
+            android:visibility="gone"
            />
 
         <!-- emergency call button shown when sim is PUKd and tab_selector is
@@ -86,7 +90,7 @@
             android:drawableLeft="@drawable/ic_emergency"
             android:layout_centerInParent="true"
             android:layout_alignParentBottom="true"
-            android:layout_marginBottom="80dip"
+            android:layout_marginBottom="90dip"
             style="@style/Widget.Button.Transparent"
             android:drawablePadding="8dip"
             android:visibility="gone"
diff --git a/core/res/res/layout-xlarge/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout-xlarge/keyguard_screen_tab_unlock_land.xml
index 6c99ccac..c24eecc 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_tab_unlock_land.xml
@@ -28,16 +28,21 @@
     android:background="#70000000"
     android:id="@+id/root">
 
-    <!-- left side: status and emergency call button -->
-    <LinearLayout
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:layout_width="0dip"
-            android:orientation="vertical"
-            android:gravity="center_vertical"
-                >
-        <include layout="@layout/keyguard_screen_status_land" />
-    </LinearLayout>
+    <!-- left side: status -->
+    <RelativeLayout
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:layout_width="0dip">
+
+        <include layout="@layout/keyguard_screen_status_land"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="102dip"
+            android:layout_marginTop="320dip"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentLeft="true"/>
+
+    </RelativeLayout>
 
     <!-- right side -->
     <LinearLayout
diff --git a/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml b/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml
index 52be82c..ec7c272 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml
@@ -26,81 +26,92 @@
     android:orientation="horizontal"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-        >
+    android:background="#70000000">
 
-    <!-- left side: status and emergency call button -->
-    <LinearLayout
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:layout_width="0dip"
-            android:orientation="vertical"
-            android:gravity="center_vertical"
-                >
-        
-        <include layout="@layout/keyguard_screen_status_land" />
+    <!-- left side: status  -->
+    <RelativeLayout
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:layout_width="0dip">
 
-        <!-- footer -->
-        <FrameLayout
-            android:layout_width="match_parent"
+        <include layout="@layout/keyguard_screen_status_land"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="140dip"
-            >
+            android:layout_marginLeft="102dip"
+            android:layout_marginTop="320dip"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentLeft="true"/>
 
-            <!-- option 1: a single emergency call button -->
-            <RelativeLayout android:id="@+id/footerNormal"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="left"
-                >
-                <Button android:id="@+id/emergencyCallAlone"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/lockscreen_emergency_call"
-                    style="@style/Widget.Button.Transparent"
-                    android:drawableLeft="@drawable/ic_emergency"
-                    android:drawablePadding="8dip"
-                    android:visibility="gone"
-                    />
-            </RelativeLayout>
-
-            <!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
-            <LinearLayout android:id="@+id/footerForgotPattern"
-                android:orientation="vertical"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="left"
-                >
-                <Button android:id="@+id/forgotPattern"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    style="@style/Widget.Button.Transparent"
-                    />
-                <Button android:id="@+id/emergencyCallTogether"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:text="@string/lockscreen_emergency_call"
-                    style="@style/Widget.Button.Transparent"
-                    android:drawableLeft="@drawable/ic_emergency"
-                    android:drawablePadding="8dip"
-                    android:visibility="gone"
-                    />
-            </LinearLayout>
-        </FrameLayout>
-    </LinearLayout>
+    </RelativeLayout>
 
     <!-- right side: lock pattern -->
-    <LinearLayout
+    <RelativeLayout
         android:layout_weight="1"
         android:layout_width="0dip"
-        android:layout_height="match_parent"
-        android:gravity="center"
-        >
+        android:layout_height="match_parent">
+
         <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
             android:layout_width="354dip"
             android:layout_height="354dip"
-            android:layout_marginTop="90dip"
-            android:layout_marginRight="90dip"
-          />
-    </LinearLayout>
+            android:layout_marginLeft="143dip"
+            android:layout_marginTop="201dip"
+            android:layout_gravity="center_vertical"
+        />
+
+        <!-- footer -->
+
+        <!-- option 1: a single emergency call button -->
+        <RelativeLayout android:id="@+id/footerNormal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/lockPattern"
+            android:layout_alignLeft="@id/lockPattern"
+            android:layout_alignRight="@id/lockPattern"
+            android:layout_marginTop="28dip"
+            android:layout_marginLeft="28dip"
+            android:layout_marginRight="28dip"
+            >
+            <Button android:id="@+id/emergencyCallAlone"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/lockscreen_emergency_call"
+                style="@style/Widget.Button.Transparent"
+                android:drawableLeft="@drawable/ic_emergency"
+                android:drawablePadding="8dip"
+                android:visibility="gone"
+                />
+        </RelativeLayout>
+
+        <!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
+        <LinearLayout android:id="@+id/footerForgotPattern"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/footerNormal"
+            android:layout_alignLeft="@id/lockPattern"
+            android:layout_alignRight="@id/lockPattern"
+            android:layout_marginTop="28dip"
+            android:layout_marginLeft="28dip"
+            android:layout_marginRight="28dip">
+
+            <Button android:id="@+id/forgotPattern"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                style="@style/Widget.Button.Transparent"
+            />
+
+            <Button android:id="@+id/emergencyCallTogether"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/lockscreen_emergency_call"
+                style="@style/Widget.Button.Transparent"
+                android:drawableLeft="@drawable/ic_emergency"
+                android:drawablePadding="8dip"
+                android:visibility="gone"
+            />
+
+        </LinearLayout>
+
+    </RelativeLayout>
 
 </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
diff --git a/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml b/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml
index e170a76..84ddd6a 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml
@@ -22,18 +22,21 @@
     android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="#70000000"
         >
 
-    <!-- left side: status and emergency call button -->
+    <!-- top: status -->
     <LinearLayout
-            android:layout_height="0dip"
-            android:layout_weight="1"
-            android:layout_width="match_parent"
-            android:orientation="vertical"
-            android:gravity="center_vertical"
-                >
+        android:layout_height="0dip"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:orientation="vertical">
 
-        <include layout="@layout/keyguard_screen_status_port" />
+        <include layout="@layout/keyguard_screen_status_port"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="134dip"
+            android:layout_marginLeft="266dip"/>
 
         <!-- footer -->
         <FrameLayout
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml
index 77ae0d3..8367157 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml
@@ -117,11 +117,24 @@
         android:textAppearance="?android:attr/textAppearanceMedium"
         />
 
+    <!-- TODO: Redo layout when we release on phones -->
+    <TextView
+        android:id="@+id/alarm_status"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textSize="18sp"
+        android:drawablePadding="4dip"
+        android:layout_below="@id/date"
+        android:layout_marginTop="4dip"
+        android:layout_marginLeft="24dip"
+        />
+
     <TextView
         android:id="@+id/status1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_below="@id/date"
+        android:layout_below="@id/alarm_status"
         android:layout_marginTop="4dip"
         android:layout_marginLeft="24dip"
         android:textAppearance="?android:attr/textAppearanceMedium"
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
index e48df20..9547660 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
@@ -118,11 +118,24 @@
             android:textAppearance="?android:attr/textAppearanceMedium"
             />
 
+        <!-- TODO: Redo layout when we release on phones -->
+        <TextView
+            android:id="@+id/alarm_status"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textSize="18sp"
+            android:drawablePadding="4dip"
+            android:layout_below="@id/date"
+            android:layout_marginTop="4dip"
+            android:layout_marginLeft="24dip"
+            />
+
         <TextView
             android:id="@+id/status1"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_below="@id/date"
+            android:layout_below="@id/alarm_status"
             android:layout_marginTop="6dip"
             android:textAppearance="?android:attr/textAppearanceMedium"
             android:drawablePadding="4dip"
diff --git a/core/res/res/layout/keyguard_screen_unlock_landscape.xml b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
index c14afbf..759c906 100644
--- a/core/res/res/layout/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
@@ -38,6 +38,15 @@
             android:layout_marginLeft="24dip"
             android:gravity="left"
             >
+
+        <TextView
+            android:id="@+id/alarm_status"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textSize="18sp"
+            android:drawablePadding="4dip"
+            />
         <TextView
             android:id="@+id/status1"
             android:layout_width="wrap_content"
diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
index 85e1db1..c438412 100644
--- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
@@ -127,6 +127,15 @@
         android:layout_marginLeft="12dip"
         android:gravity="left"
         >
+        <!-- TODO: Redo layout when we release on phones -->
+        <TextView
+            android:id="@+id/alarm_status"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textSize="18sp"
+            android:drawablePadding="4dip"
+            />
         <TextView
             android:id="@+id/status1"
             android:layout_width="wrap_content"
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index a286265..2e87883 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -104,9 +104,10 @@
     <color name="keyguard_text_color_decline">#fe0a5a</color>
 
     <!-- keyguard clock -->
-    <color name="lockscreen_clock_background">#ff9a9a9a</color>
-    <color name="lockscreen_clock_foreground">#ff666666</color>
+    <color name="lockscreen_clock_background">#b3ffffff</color>
+    <color name="lockscreen_clock_foreground">#40000000</color>
     <color name="lockscreen_clock_am_pm">#ff9a9a9a</color>
+    <color name="lockscreen_owner_info">#ff9a9a9a</color>
 
     <!-- For holo theme -->
 	  <drawable name="screen_background_holo_light">#fff3f3f3</drawable>
diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java
index ddf41cb..b3ad20a 100644
--- a/graphics/java/android/renderscript/Script.java
+++ b/graphics/java/android/renderscript/Script.java
@@ -20,32 +20,25 @@
  *
  **/
 public class Script extends BaseObj {
-    public static final int MAX_SLOT = 16;
-
-    boolean mIsRoot;
-    Type[] mTypes;
-    boolean[] mWritable;
-    Invokable[] mInvokables;
-
-    public static class Invokable {
-        RenderScript mRS;
-        Script mScript;
-        int mSlot;
-        String mName;
-
-        Invokable() {
-            mSlot = -1;
-        }
-
-        public void execute() {
-            mRS.nScriptInvoke(mScript.getID(), mSlot);
-        }
-    }
-
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param slot
+     */
     protected void invoke(int slot) {
         mRS.nScriptInvoke(getID(), slot);
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param slot
+     * @param v
+     */
     protected void invoke(int slot, FieldPacker v) {
         if (v != null) {
             mRS.nScriptInvokeV(getID(), slot, v.getData());
@@ -59,6 +52,15 @@
         super(id, rs);
     }
 
+
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param va
+     * @param slot
+     */
     public void bindAllocation(Allocation va, int slot) {
         mRS.validate();
         if (va != null) {
@@ -68,30 +70,86 @@
         }
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param index
+     * @param v
+     */
     public void setVar(int index, float v) {
         mRS.nScriptSetVarF(getID(), index, v);
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param index
+     * @param v
+     */
     public void setVar(int index, double v) {
         mRS.nScriptSetVarD(getID(), index, v);
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param index
+     * @param v
+     */
     public void setVar(int index, int v) {
         mRS.nScriptSetVarI(getID(), index, v);
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param index
+     * @param v
+     */
     public void setVar(int index, long v) {
         mRS.nScriptSetVarJ(getID(), index, v);
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param index
+     * @param v
+     */
     public void setVar(int index, boolean v) {
         mRS.nScriptSetVarI(getID(), index, v ? 1 : 0);
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param index
+     * @param o
+     */
     public void setVar(int index, BaseObj o) {
         mRS.nScriptSetVarObj(getID(), index, (o == null) ? 0 : o.getID());
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by generated reflected code.
+     *
+     * @param index
+     * @param v
+     */
     public void setVar(int index, FieldPacker v) {
         mRS.nScriptSetVarV(getID(), index, v.getData());
     }
diff --git a/graphics/java/android/renderscript/ScriptC.java b/graphics/java/android/renderscript/ScriptC.java
index 984edd3..14e4ab5 100644
--- a/graphics/java/android/renderscript/ScriptC.java
+++ b/graphics/java/android/renderscript/ScriptC.java
@@ -35,10 +35,28 @@
 public class ScriptC extends Script {
     private static final String TAG = "ScriptC";
 
+    /**
+     * @hide
+     *
+     * Only intended for use by the generated derived classes.
+     *
+     * @param id
+     * @param rs
+     */
     protected ScriptC(int id, RenderScript rs) {
         super(id, rs);
     }
 
+    /**
+     * @hide
+     *
+     * Only intended for use by the generated derived classes.
+     *
+     *
+     * @param rs
+     * @param resources
+     * @param resourceID
+     */
     protected ScriptC(RenderScript rs, Resources resources, int resourceID) {
         super(0, rs);
         int id = internalCreate(rs, resources, resourceID);
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 50d10bf..4daf84f 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -80,11 +80,6 @@
     // last known battery level
     private int mBatteryLevel = 100;
 
-    private String mNextAlarm = null;
-    private Drawable mAlarmIcon = null;
-    private String mCharging = null;
-    private Drawable mChargingIcon = null;
-
     private boolean mSilentMode;
     private AudioManager mAudioManager;
     private String mDateFormatString;
@@ -356,9 +351,6 @@
         mStatus = getCurrentStatus(updateMonitor.getSimState());
         updateLayout(mStatus);
 
-        refreshBatteryStringAndIcon();
-        refreshAlarmDisplay();
-
         mTimeFormat = DateFormat.getTimeFormat(getContext());
         mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
         refreshTimeAndDateDisplay();
@@ -417,14 +409,6 @@
     private Runnable mPendingR1;
     private Runnable mPendingR2;
 
-    private void refreshAlarmDisplay() {
-        mNextAlarm = mLockPatternUtils.getNextAlarm();
-        if (mNextAlarm != null) {
-            mAlarmIcon = getContext().getResources().getDrawable(R.drawable.ic_lock_idle_alarm);
-        }
-        updateStatusLines();
-    }
-
     /** {@inheritDoc} */
     public void onRefreshBatteryInfo(boolean showBatteryInfo, boolean pluggedIn,
             int batteryLevel) {
@@ -433,32 +417,9 @@
         mPluggedIn = pluggedIn;
         mBatteryLevel = batteryLevel;
 
-        refreshBatteryStringAndIcon();
         updateStatusLines();
     }
 
-    private void refreshBatteryStringAndIcon() {
-        if (!mShowingBatteryInfo) {
-            mCharging = null;
-            return;
-        }
-
-        if (mChargingIcon == null) {
-            mChargingIcon =
-                    getContext().getResources().getDrawable(R.drawable.ic_lock_idle_charging);
-        }
-
-        if (mPluggedIn) {
-            if (mBatteryLevel >= 100) {
-                mCharging = getContext().getString(R.string.lockscreen_charged);
-            } else {
-                mCharging = getContext().getString(R.string.lockscreen_plugged_in, mBatteryLevel);
-            }
-        } else {
-            mCharging = getContext().getString(R.string.lockscreen_low_battery);
-        }
-    }
-
     /** {@inheritDoc} */
     public void onTimeChanged() {
         refreshTimeAndDateDisplay();
@@ -469,7 +430,7 @@
     }
 
     private void updateStatusLines() {
-        mStatusView.updateStatusLines(mStatus.showStatusLines(), mCharging, mChargingIcon, mAlarmIcon);
+        mStatusView.updateStatusLines(mStatus.showStatusLines());
     }
 
     /** {@inheritDoc} */
diff --git a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
index 35fa3e5..5d1455e 100644
--- a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
@@ -396,7 +396,7 @@
                 mLockPatternView
                         .setDisplayMode(LockPatternView.DisplayMode.Correct);
                 mStatusView.setInstructions("");
-                mStatusView.updateStatusLines();
+                mStatusView.updateStatusLines(true);
                 mCallback.keyguardDone(true);
                 mCallback.reportSuccessfulUnlockAttempt();
             } else {
@@ -416,7 +416,7 @@
                     // TODO mUnlockIcon.setVisibility(View.VISIBLE);
                     mStatusView.setInstructions(
                             getContext().getString(R.string.lockscreen_pattern_wrong));
-                    mStatusView.updateStatusLines();
+                    mStatusView.updateStatusLines(true);
                     mLockPatternView.postDelayed(
                             mCancelPatternRunnable,
                             PATTERN_CLEAR_TIMEOUT_MS);
@@ -437,7 +437,7 @@
                 mStatusView.setInstructions(getContext().getString(
                         R.string.lockscreen_too_many_failed_attempts_countdown,
                         secondsRemaining));
-                mStatusView.updateStatusLines();
+                mStatusView.updateStatusLines(true);
             }
 
             @Override
@@ -445,7 +445,7 @@
                 mLockPatternView.setEnabled(true);
                 mStatusView.setInstructions(getContext().getString(
                         R.string.lockscreen_pattern_instructions));
-                mStatusView.updateStatusLines();
+                mStatusView.updateStatusLines(true);
                 // TODO mUnlockIcon.setVisibility(View.VISIBLE);
                 mFailedPatternAttemptsSinceLastTimeout = 0;
                 if (mEnableFallback) {
diff --git a/policy/src/com/android/internal/policy/impl/StatusView.java b/policy/src/com/android/internal/policy/impl/StatusView.java
index 2b78851..1caf0b7 100644
--- a/policy/src/com/android/internal/policy/impl/StatusView.java
+++ b/policy/src/com/android/internal/policy/impl/StatusView.java
@@ -19,6 +19,11 @@
 import android.widget.TextView;
 
 class StatusView {
+    private static final int LOCK_ICON = R.drawable.ic_lock_idle_lock;
+    private static final int ALARM_ICON = R.drawable.ic_lock_idle_alarm;
+    private static final int CHARGING_ICON = R.drawable.ic_lock_idle_charging;
+    private static final int BATTERY_LOW_ICON = R.drawable.ic_lock_idle_low_battery;
+
     private String mDateFormatString;
 
     private TextView mCarrier;
@@ -33,20 +38,18 @@
     // last known battery level
     private int mBatteryLevel = 100;
 
-    private String mNextAlarm = null;
-
     private String mInstructions = null;
     private TextView mStatus1;
-    private TextView mStatus2;
     private TextView mPropertyOf;
 
-    private boolean mHasStatus2;
     private boolean mHasCarrier;
     private boolean mHasDate;
-    private boolean mHasProperty;
 
     private View mView;
 
+    private TextView mAlarmStatus;
+    private LockPatternUtils mLockPatternUtils;
+
     private View findViewById(int id) {
         return mView.findViewById(id);
     }
@@ -69,7 +72,7 @@
         mShowingBatteryInfo = showBatteryInfo;
         mPluggedIn = pluggedIn;
         mBatteryLevel = batteryLevel;
-        updateStatusLines();
+        updateStatusLines(true);
     }
 
     void onTimeChanged() {
@@ -91,14 +94,14 @@
         mDate = (TextView) findViewById(R.id.date);
         mHasDate = (mDate != null);
         mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
+        mLockPatternUtils = lockPatternUtils;
 
         refreshTimeAndDateDisplay();
 
         mStatus1 = (TextView) findViewById(R.id.status1);
-        mStatus2 = (TextView) findViewById(R.id.status2);
-        mHasStatus2 = (mStatus2 != null);
+        mAlarmStatus = (TextView) findViewById(R.id.alarm_status);
+        mAlarmStatus.setCompoundDrawablesWithIntrinsicBounds(ALARM_ICON, 0, 0, 0);
         mPropertyOf = (TextView) findViewById(R.id.propertyOf);
-        mHasProperty = (mPropertyOf != null);
 
         resetStatusInfo(updateMonitor, lockPatternUtils);
 
@@ -107,7 +110,6 @@
             mCarrier.setSelected(true);
             mCarrier.setTextColor(0xffffffff);
         }
-
     }
 
     void resetStatusInfo(KeyguardUpdateMonitor updateMonitor, LockPatternUtils lockPatternUtils) {
@@ -115,19 +117,18 @@
         mShowingBatteryInfo = updateMonitor.shouldShowBatteryInfo();
         mPluggedIn = updateMonitor.isDevicePluggedIn();
         mBatteryLevel = updateMonitor.getBatteryLevel();
-        mNextAlarm = lockPatternUtils.getNextAlarm();
-        updateStatusLines();
+        updateStatusLines(true);
     }
 
     void setInstructionText(int stringId) {
         mStatus1.setText(stringId);
-        mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_lock, 0, 0, 0);
+        mStatus1.setCompoundDrawablesWithIntrinsicBounds(LOCK_ICON, 0, 0, 0);
         mStatus1.setVisibility(View.VISIBLE);
     }
 
     void setInstructionText(String string) {
         mStatus1.setText(string);
-        mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_lock, 0, 0, 0);
+        mStatus1.setCompoundDrawablesWithIntrinsicBounds(LOCK_ICON, 0, 0, 0);
         mStatus1.setVisibility(View.VISIBLE);
     }
 
@@ -138,9 +139,22 @@
         mCarrier.setText(string);
     }
 
-    /** Originated from PatternUnlockScreen **/
-    void updateStatusLines() {
-        if (mHasProperty) {
+    /**
+     * Update the status lines based on these rules:
+     * AlarmStatus: Alarm state always gets it's own line.
+     * Status1 is shared between help, battery status and generic unlock instructions,
+     * prioritized in that order.
+     * @param showStatusLines status lines are shown if true
+     */
+    void updateStatusLines(boolean showStatusLines) {
+        if (!showStatusLines) {
+            mStatus1.setVisibility(showStatusLines ? View.VISIBLE : View.GONE);
+            mAlarmStatus.setVisibility(showStatusLines ? View.VISIBLE : View.GONE);
+            return;
+        }
+
+        // Update owner info
+        if (mPropertyOf != null) {
             ContentResolver res = getContext().getContentResolver();
             String info = Settings.Secure.getString(res, Settings.Secure.LOCK_SCREEN_OWNER_INFO);
             boolean enabled = Settings.Secure.getInt(res,
@@ -151,104 +165,44 @@
                     View.VISIBLE : View.INVISIBLE);
         }
 
-        if (!mHasStatus2) return;
+        // Update Alarm status
+        String nextAlarm = mLockPatternUtils.getNextAlarm();
+        if (!TextUtils.isEmpty(nextAlarm)) {
+            mAlarmStatus.setText(nextAlarm);
+            mAlarmStatus.setVisibility(View.VISIBLE);
+        } else {
+            mAlarmStatus.setVisibility(View.GONE);
+        }
 
+        // Update Status1
         if (mInstructions != null) {
-            // instructions only
+            // Instructions only
+            final int resId = TextUtils.isEmpty(mInstructions) ? 0 : LOCK_ICON;
             mStatus1.setText(mInstructions);
-            if (TextUtils.isEmpty(mInstructions)) {
-                mStatus1.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
-            } else {
-                mStatus1.setCompoundDrawablesWithIntrinsicBounds(
-                        R.drawable.ic_lock_idle_lock, 0, 0, 0);
-            }
-
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(resId, 0, 0, 0);
             mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.INVISIBLE);
-        } else if (mShowingBatteryInfo && mNextAlarm == null) {
-            // battery only
+        } else if (mShowingBatteryInfo) {
+            // Battery status
             if (mPluggedIn) {
-              if (mBatteryLevel >= 100) {
-                mStatus1.setText(getContext().getString(R.string.lockscreen_charged));
-              } else {
-                  mStatus1.setText(getContext().getString(R.string.lockscreen_plugged_in,
-                          mBatteryLevel));
-              }
+                // Charging or charged
+                if (mBatteryLevel >= 100) {
+                    mStatus1.setText(getContext().getString(R.string.lockscreen_charged));
+                } else {
+                    mStatus1.setText(getContext().getString(R.string.lockscreen_plugged_in,
+                            mBatteryLevel));
+                }
+                mStatus1.setCompoundDrawablesWithIntrinsicBounds(CHARGING_ICON, 0, 0, 0);
             } else {
+                // Battery is low
                 mStatus1.setText(getContext().getString(R.string.lockscreen_low_battery));
+                mStatus1.setCompoundDrawablesWithIntrinsicBounds(BATTERY_LOW_ICON, 0, 0, 0);
             }
-            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_charging, 0,
-                    0, 0);
-
             mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.INVISIBLE);
-
-        } else if (mNextAlarm != null && !mShowingBatteryInfo) {
-            // alarm only
-            mStatus1.setText(mNextAlarm);
-            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_alarm, 0,
-                    0, 0);
-
-            mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.INVISIBLE);
-        } else if (mNextAlarm != null && mShowingBatteryInfo) {
-            // both battery and next alarm
-            mStatus1.setText(mNextAlarm);
-            mStatus2.setText(getContext().getString(
-                    R.string.lockscreen_battery_short,
-                    Math.min(100, mBatteryLevel)));
-            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_alarm, 0,
-                    0, 0);
-            if (mPluggedIn) {
-                mStatus2.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_charging,
-                        0, 0, 0);
-            } else {
-                mStatus2.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
-            }
-
-            mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.VISIBLE);
         } else {
             // nothing specific to show; show general instructions
             mStatus1.setText(R.string.lockscreen_pattern_instructions);
-            mStatus1.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_lock_idle_lock, 0,
-                    0, 0);
-
+            mStatus1.setCompoundDrawablesWithIntrinsicBounds(LOCK_ICON, 0,0, 0);
             mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.INVISIBLE);
-        }
-    }
-
-    /** Originated from LockScreen **/
-    // TODO Merge with function above
-    void updateStatusLines(boolean showStatusLines, String charging, Drawable chargingIcon,
-            Drawable alarmIcon) {
-        if (!showStatusLines || (charging == null && mNextAlarm == null)) {
-            mStatus1.setVisibility(View.INVISIBLE);
-            mStatus2.setVisibility(View.INVISIBLE);
-        } else if (charging != null && mNextAlarm == null) {
-            // charging only
-            mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.INVISIBLE);
-
-            mStatus1.setText(charging);
-            mStatus1.setCompoundDrawablesWithIntrinsicBounds(chargingIcon, null, null, null);
-        } else if (mNextAlarm != null && charging == null) {
-            // next alarm only
-            mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.INVISIBLE);
-
-            mStatus1.setText(mNextAlarm);
-            mStatus1.setCompoundDrawablesWithIntrinsicBounds(alarmIcon, null, null, null);
-        } else if (charging != null && mNextAlarm != null) {
-            // both charging and next alarm
-            mStatus1.setVisibility(View.VISIBLE);
-            mStatus2.setVisibility(View.VISIBLE);
-
-            mStatus1.setText(charging);
-            mStatus1.setCompoundDrawablesWithIntrinsicBounds(chargingIcon, null, null, null);
-            mStatus2.setText(mNextAlarm);
-            mStatus2.setCompoundDrawablesWithIntrinsicBounds(alarmIcon, null, null, null);
         }
     }
 
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
old mode 100644
new mode 100755
index 3c8fb01..761dcd1
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -9574,7 +9574,7 @@
                 // r.record is null if findServiceLocked() failed the caller permission check
                 if (r.record == null) {
                     throw new SecurityException(
-                            "Permission Denial: Accessing service " + r.record.name
+                            "Permission Denial: Accessing service "
                             + " from pid=" + Binder.getCallingPid()
                             + ", uid=" + Binder.getCallingUid()
                             + " requires " + r.permission);