summaryrefslogtreecommitdiff
path: root/vcl/android
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-05-29 13:35:23 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2021-05-29 16:32:24 +0200
commitb6518bebc5fc82c88a455c6b22023e6392483e14 (patch)
tree4944b1a2a5cb501751c6cc1c30e60a20e5c4a4bd /vcl/android
parent1d15f180a6e6a45b74b602402176f0d6e4372cc6 (diff)
vcl: Implement static vclplug usage
.. and convert Android to it. Will also be used by WASM. It's also kind of a followup on commit f5af2104fc490b90510e36bbf1d2adec8017c594. Change-Id: I3a1b5bc2eae2692e706da10c6352534433c61e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116385 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/android')
-rw-r--r--vcl/android/androidinst.cxx45
1 files changed, 1 insertions, 44 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index dafd43f7aad8..8febcd23a729 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -9,7 +9,6 @@
#include <jni.h>
-#include <android/log.h>
#include <android/looper.h>
#include <android/bitmap.h>
@@ -24,10 +23,6 @@
#include <memory>
#include <unistd.h>
-#define LOGTAG "LibreOffice/androidinst"
-#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__))
-#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOGTAG, __VA_ARGS__))
-
// Horrible hack
static int viewWidth = 1, viewHeight = 1;
@@ -169,53 +164,15 @@ SalFrame *AndroidSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags
return new AndroidSalFrame( this, pParent, nStyle );
}
-void SalAbort( const OUString& rErrorText, bool bDumpCore )
-{
- OUString aError( rErrorText );
- if( aError.isEmpty() )
- aError = "Unknown application error";
- LOGI("%s", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() );
-
- LOGI("SalAbort: '%s'",
- OUStringToOString(aError, RTL_TEXTENCODING_ASCII_US).getStr());
- if( bDumpCore )
- abort();
- else
- _exit(1);
-}
-
-const OUString& SalGetDesktopEnvironment()
-{
- static OUString aEnv( "android" );
- return aEnv;
-}
-
-SalData::SalData() :
- m_pInstance( 0 ),
- m_pPIManager(0 )
-{
-}
-
-SalData::~SalData()
-{
-}
-
// This is our main entry point:
-SalInstance *CreateSalInstance()
+extern "C" SalInstance *create_SalInstance()
{
LOGI("Android: CreateSalInstance!");
AndroidSalInstance* pInstance = new AndroidSalInstance( std::make_unique<SvpSalYieldMutex>() );
new AndroidSalData( pInstance );
- pInstance->AcquireYieldMutex();
return pInstance;
}
-void DestroySalInstance( SalInstance *pInst )
-{
- pInst->ReleaseYieldMutexAll();
- delete pInst;
-}
-
int AndroidSalSystem::ShowNativeDialog( const OUString& rTitle,
const OUString& rMessage,
const std::vector< OUString >& rButtons )