2 * Copyright (C) 2016-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "PlatformAndroid.h"
11 #include "filesystem/SpecialProtocol.h"
12 #include "utils/log.h"
13 #include "windowing/android/WinSystemAndroidGLESContext.h"
15 #include "platform/android/activity/XBMCApp.h"
16 #include "platform/android/powermanagement/AndroidPowerSyscall.h"
20 #include <androidjni/Build.h>
22 CPlatform
* CPlatform::CreateInstance()
24 return new CPlatformAndroid();
27 bool CPlatformAndroid::InitStageOne()
29 if (!CPlatformPosix::InitStageOne())
31 setenv("SSL_CERT_FILE", CSpecialProtocol::TranslatePath("special://xbmc/system/certs/cacert.pem").c_str(), 1);
33 setenv("OS", "Linux", true); // for python scripts that check the OS
35 CWinSystemAndroidGLESContext::Register();
37 CAndroidPowerSyscall::Register();
42 void CPlatformAndroid::PlatformSyslog()
46 "Product: {}, Device: {}, Board: {} - Manufacturer: {}, Brand: {}, Model: {}, Hardware: {}",
47 CJNIBuild::PRODUCT
, CJNIBuild::DEVICE
, CJNIBuild::BOARD
, CJNIBuild::MANUFACTURER
,
48 CJNIBuild::BRAND
, CJNIBuild::MODEL
, CJNIBuild::HARDWARE
);
49 std::string extstorage
;
50 bool extready
= CXBMCApp::GetExternalStorage(extstorage
);
51 CLog::Log(LOGINFO
, "External storage path = {}; status = {}", extstorage
,
52 extready
? "ok" : "nok");