diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-12-11 14:38:43 +0000 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-12-12 13:11:51 +0100 |
commit | af35dfb2e31c24dd1a43d9ae3e0f393b75108228 (patch) | |
tree | 6c6b63392aa1781bb725c0c329bc246333eac2a4 /vcl/inc | |
parent | 36b90e6c23fc846c9a8b4ddbd74688b2b5cc4705 (diff) |
android: add abstraction to allow us to DetachThread sensibly.
If we fail to do this after runLoop - some Android VMs can get really
upset if we quit a thread without doing this, also ensure that we
AttachThread to new polling loop threads as we come in for good
measure - duplicate Attach's are NOPs.
Change-Id: I32454773af4e02c97df0b6c02f61b1dc74df80b0
Reviewed-on: https://gerrit.libreoffice.org/84956
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 7241382ccc0a028c5f08304090a6344e582db068)
Reviewed-on: https://gerrit.libreoffice.org/84969
Tested-by: Jenkins
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/android/androidinst.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/salinst.hxx | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx index 49758f3efd70..526174b14951 100644 --- a/vcl/inc/android/androidinst.hxx +++ b/vcl/inc/android/androidinst.hxx @@ -38,6 +38,9 @@ public: // mainloop pieces virtual bool AnyInput( VclInputFlags nType ); + + virtual void updateMainThread(); + virtual void releaseMainThread(); }; #endif // INCLUDED_VCL_INC_ANDROID_ANDROIDINST_HXX diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 0f8af0b200d3..dbbbda2c2f42 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -196,7 +196,10 @@ public: virtual void jobStartedPrinterUpdate() {} virtual void jobEndedPrinterUpdate() {} + /// Set the app's (somewhat) magic/main-thread to this one. virtual void updateMainThread() {} + /// Disconnect that - good for detatching from the JavaVM on Android. + virtual void releaseMainThread() {} /// get information about underlying versions virtual OUString getOSVersion() { return "-"; } |