diff options
| author | 2024-09-09 15:58:57 +0000 | |
|---|---|---|
| committer | 2024-09-09 15:58:57 +0000 | |
| commit | 8b3b67cb3534680e75c7dd6e77c36bbbce947af5 (patch) | |
| tree | 7de05c7e16f852b77a2fe64b2b7ab9a807d652e2 | |
| parent | 1ab0fe4694bc2fdbf380ef8e14d2544f263486e4 (diff) | |
| parent | d3a28d0249b7c5aa3497c723328aeb07231925b6 (diff) | |
Merge "Cancel printing with escape key" into main
| -rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java index ff09084e24cd..c4173ed999f3 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java @@ -460,7 +460,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat @Override public boolean onKeyDown(int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_BACK) { + if (keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_ESCAPE) { event.startTracking(); return true; } @@ -479,7 +479,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat return true; } - if (keyCode == KeyEvent.KEYCODE_BACK + if ((keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_ESCAPE) && event.isTracking() && !event.isCanceled()) { if (mPrintPreviewController != null && mPrintPreviewController.isOptionsOpened() && !hasErrors()) { |