diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-05-19 01:16:49 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-05-19 01:16:49 +0000 |
| commit | 82e99c78d13e374de87f8e291ef30d4dd3808943 (patch) | |
| tree | 39c46412e4747e02a0f5145c370e0d2a94de08b8 /core/java/android | |
| parent | 3d9660f771fd3ebde7bf234d8eebfdb29a03111b (diff) | |
| parent | 94620323593e13cd6abfb071e8c878e625b0eaeb (diff) | |
Merge "Hold wake lock while printing"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/print/PrintJobInfo.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/print/PrintJobInfo.java b/core/java/android/print/PrintJobInfo.java index 85fdd642095c..138477e991e0 100644 --- a/core/java/android/print/PrintJobInfo.java +++ b/core/java/android/print/PrintJobInfo.java @@ -587,6 +587,15 @@ public final class PrintJobInfo implements Parcelable { } /** + * If the print job is actively processed, i.e. the device needs to stay on. + * + * @hide + */ + public boolean shouldStayAwake() { + return mCanceling || mState == STATE_STARTED || mState == STATE_QUEUED; + } + + /** * Gets whether this job has a given advanced (printer specific) print * option. * |
