From 05ff998fd86eff15e91694bc205ea0af0de83284 Mon Sep 17 00:00:00 2001 From: Svet Ganov Date: Fri, 12 Sep 2014 19:25:27 -0700 Subject: [PATCH 1/2] Fix a crash in print spooler. A recent bug fix exposed another one where we were not updating the internal state of the remote print document after it finishes updating. This resulted in a crash on every print. bug:16966145 Change-Id: I398ff7976533241e3d4cb6cd27f69cdc25e67be9 --- .../src/com/android/printspooler/model/RemotePrintDocument.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java index 429437d07516d..c53fcadde4e74 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java @@ -107,11 +107,13 @@ public final class RemotePrintDocument { mDocumentInfo.info.getPageCount()); } // Notify we are done. + mState = STATE_UPDATED; notifyUpdateCompleted(); } } } else { // We always notify after a write. + mState = STATE_UPDATED; notifyUpdateCompleted(); } runPendingCommand(); From 922507026a6e1702d207a4e8dc65c50a7b0e77d4 Mon Sep 17 00:00:00 2001 From: Svet Ganov Date: Fri, 12 Sep 2014 19:54:05 -0700 Subject: [PATCH 2/2] Fixing controls allignment in print UI. Making some allignment tweaks based on UX feedback. bug:17489187 Change-Id: Ife1c7cb0f55eb0398bca4a5e015ace24437ff2a6 --- .../res/layout/print_activity_controls.xml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/PrintSpooler/res/layout/print_activity_controls.xml b/packages/PrintSpooler/res/layout/print_activity_controls.xml index f0b8adf65f57d..0bf64aa4db3a4 100644 --- a/packages/PrintSpooler/res/layout/print_activity_controls.xml +++ b/packages/PrintSpooler/res/layout/print_activity_controls.xml @@ -59,6 +59,7 @@ android:id="@+id/copies_edittext" android:layout_width="fill_parent" android:layout_height="wrap_content" + android:layout_marginStart="8dip" style="?android:attr/editTextStyle" android:singleLine="true" android:ellipsize="end" @@ -89,7 +90,8 @@ + android:layout_height="wrap_content" + android:layout_marginStart="4dip"> @@ -116,7 +118,8 @@ + android:layout_height="wrap_content" + android:layout_marginStart="4dip"> @@ -143,7 +146,8 @@ + android:layout_height="wrap_content" + android:layout_marginStart="4dip"> @@ -170,7 +174,8 @@ + android:layout_height="wrap_content" + android:layout_marginStart="4dip"> @@ -202,6 +207,7 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="bottom|fill_horizontal" + android:layout_marginStart="8dip" android:singleLine="true" android:ellipsize="end" android:visibility="visible" @@ -239,7 +245,7 @@ android:id="@+id/expand_collapse_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="4dip" + android:layout_marginTop="0dip" android:layout_marginBottom="4dip" android:layout_gravity="center" android:background="@drawable/ic_expand_more">