summaryrefslogtreecommitdiffstats
path: root/packages/PrintSpooler
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-10-31 14:51:45 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-31 14:51:45 -0700
commit7b4bb2f75e7a87ba394a67a5e4b78330932f8b24 (patch)
tree3d43d2d2a4fe4cecdb7f1c2fb532b54667575977 /packages/PrintSpooler
parent9f30380db3b14f8282d26d42d2b29591dbda1ed5 (diff)
parent4379bd751877056ffa236d0eb8a6cf59b8732d2c (diff)
downloadframeworks_base-7b4bb2f75e7a87ba394a67a5e4b78330932f8b24.zip
frameworks_base-7b4bb2f75e7a87ba394a67a5e4b78330932f8b24.tar.gz
frameworks_base-7b4bb2f75e7a87ba394a67a5e4b78330932f8b24.tar.bz2
am 4379bd75: am eccfe65f: am 6ce161d1: Merge "Cancel current work in PrintDocumentAdatper if printing is cancelled." into klp-dev
* commit '4379bd751877056ffa236d0eb8a6cf59b8732d2c': Cancel current work in PrintDocumentAdatper if printing is cancelled.
Diffstat (limited to 'packages/PrintSpooler')
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java3
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/RemotePrintDocumentAdapter.java11
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
index 8f26361..6d0ecd7 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
@@ -357,6 +357,9 @@ public class PrintJobConfigActivity extends Activity {
}
public void cancel() {
+ if (isWorking()) {
+ mRemotePrintAdapter.cancel();
+ }
mControllerState = CONTROLLER_STATE_CANCELLED;
}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/RemotePrintDocumentAdapter.java b/packages/PrintSpooler/src/com/android/printspooler/RemotePrintDocumentAdapter.java
index fd14af9..d9ccb5d 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/RemotePrintDocumentAdapter.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/RemotePrintDocumentAdapter.java
@@ -137,4 +137,15 @@ final class RemotePrintDocumentAdapter {
Log.e(LOG_TAG, "Error calling finish()", re);
}
}
+
+ public void cancel() {
+ if (DEBUG) {
+ Log.i(LOG_TAG, "cancel()");
+ }
+ try {
+ mRemoteInterface.cancel();
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error calling cancel()", re);
+ }
+ }
}