diff options
author | Sergey Prigogin <sprigogin@google.com> | 2022-01-25 11:55:39 -0800 |
---|---|---|
committer | Sergey Prigogin <sprigogin@google.com> | 2022-01-26 16:44:59 +0000 |
commit | ebce1ebaa08ecca318dac317c238831a866cf3f6 (patch) | |
tree | 8566726e42bc0ba0e66298707f9902cfd3b1336f /emulator | |
parent | f0e856c5c7211ea6b43ff1d1d782618640112838 (diff) | |
download | idea-ebce1ebaa08ecca318dac317c238831a866cf3f6.tar.gz |
Don't treat CancellationException as an error
Test: N/A
Bug: N/A
Change-Id: Id3405688a14b8cce7b4aedafe2aae58dbfe0f5e8
Diffstat (limited to 'emulator')
-rw-r--r-- | emulator/src/com/android/tools/idea/device/DeviceView.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/emulator/src/com/android/tools/idea/device/DeviceView.kt b/emulator/src/com/android/tools/idea/device/DeviceView.kt index 5c0dcd3f07b..8279a2a1d74 100644 --- a/emulator/src/com/android/tools/idea/device/DeviceView.kt +++ b/emulator/src/com/android/tools/idea/device/DeviceView.kt @@ -66,6 +66,7 @@ import java.awt.event.MouseAdapter import java.awt.event.MouseEvent import java.awt.event.MouseEvent.BUTTON1 import java.awt.geom.AffineTransform +import java.util.concurrent.CancellationException import kotlin.math.min /** @@ -169,6 +170,9 @@ class DeviceView( }) deviceClient.startVideoDecoding(decoder) } + catch (_: CancellationException) { + // The view has been closed. + } catch (e: Throwable) { thisLogger().error("Failed to initialize the screen sharing agent", e) EventQueue.invokeLater { |