#if defined(TARGET_ANDROID)
#include "android/activity/XBMCApp.h"
#include "android/activity/AndroidFeatures.h"
+#include "android/jni/Build.h"
#endif
#ifdef TARGET_WINDOWS
XInitThreads();
#endif
- // we start in frontend
- m_bInBackground = false;
/* for now always keep this around */
#ifdef HAS_KARAOKE
CLog::Log(LOGNOTICE, "Running on Darwin iOS %d-bit %s%s", g_sysinfo.GetKernelBitness(), g_sysinfo.IsAppleTV2() ? "(AppleTV2) " : "", g_sysinfo.GetUnameVersion().c_str());
#elif defined(TARGET_FREEBSD)
CLog::Log(LOGNOTICE, "Running on FreeBSD %d-bit %s", g_sysinfo.GetKernelBitness(), g_sysinfo.GetUnameVersion().c_str());
+#elif defined(TARGET_ANDROID)
+ CLog::Log(LOGNOTICE, "Running on Android %d-bit API level %d (%s, %s)", g_sysinfo.GetKernelBitness(), CJNIBuild::SDK_INT, g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str());
#elif defined(TARGET_POSIX)
CLog::Log(LOGNOTICE, "Running on Linux %d-bit (%s, %s)", g_sysinfo.GetKernelBitness(), g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str());
#elif defined(TARGET_WINDOWS)
CLog::Log(LOGNOTICE, "Running with %s rights", (CWIN32Util::IsCurrentUserLocalAdministrator() == TRUE) ? "administrator" : "restricted");
CLog::Log(LOGNOTICE, "Aero is %s", (g_sysinfo.IsAeroDisabled() == true) ? "disabled" : "enabled");
#endif
+#if defined(TARGET_ANDROID)
+ CLog::Log(LOGNOTICE,
+ "Product: %s, Device: %s, Board: %s - Manufacturer: %s, Brand: %s, Model: %s, Hardware: %s",
+ CJNIBuild::PRODUCT.c_str(), CJNIBuild::DEVICE.c_str(), CJNIBuild::BOARD.c_str(),
+ CJNIBuild::MANUFACTURER.c_str(), CJNIBuild::BRAND.c_str(), CJNIBuild::MODEL.c_str(), CJNIBuild::HARDWARE.c_str());
+#endif
+
#if defined(__arm__)
if (g_cpuInfo.GetCPUFeatures() & CPU_FEATURE_NEON)
CLog::Log(LOGNOTICE, "ARM Features: Neon enabled");
{
// if the skin changes and the current theme is not the default one, reset
// the theme to the default value (which will also change lookandfeel.skincolors
- // which in turn will reload the skin
+ // which in turn will reload the skin. Similarly, if the current skin font is not
+ // the default, reset it as well.
if (settingId == "lookandfeel.skin" && CSettings::Get().GetString("lookandfeel.skintheme") != "SKINDEFAULT")
CSettings::Get().SetString("lookandfeel.skintheme", "SKINDEFAULT");
+ else if (settingId == "lookandfeel.skin" && CSettings::Get().GetString("lookandfeel.font") != "Default")
+ CSettings::Get().SetString("lookandfeel.font", "Default");
else
{
std::string builtin("ReloadSkin");
CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin");
}
else if (settingId == "lookandfeel.skinzoom")
- g_windowManager.SendMessage(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_WINDOW_RESIZE);
+ {
+ CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_WINDOW_RESIZE);
+ g_windowManager.SendThreadMessage(msg);
+ }
else if (StringUtils::StartsWithNoCase(settingId, "audiooutput."))
{
// AE is master of audio settings and needs to be informed first
void CApplication::Render()
{
// do not render if we are stopped or in background
- if (m_bStop || m_bInBackground)
+ if (m_bStop)
return;
MEASURE_FUNCTION;
CLog::Log(LOGNOTICE, "stop player");
m_pPlayer->ClosePlayer();
+ CAnnouncementManager::Deinitialize();
+
StopPVRManager();
StopServices();
//Sleep(5000);
if (dbs.Open())
{
CBookmark bookmark;
- if (dbs.GetResumeBookMark(item.GetPath(), bookmark))
+ CStdString path = item.GetPath();
+ if (item.HasProperty("original_listitem_url") && URIUtils::IsPlugin(item.GetProperty("original_listitem_url").asString()))
+ path = item.GetProperty("original_listitem_url").asString();
+ if( dbs.GetResumeBookMark(path, bookmark) )
{
startoffset = (int)(bookmark.timeInSeconds*75);
selectedFile = bookmark.partNumber;
{
// can only resume seek here, not dvdstate
CBookmark bookmark;
- if( dbs.GetResumeBookMark(item.GetPath(), bookmark) )
+ CStdString path = item.GetPath();
+ if (item.HasProperty("original_listitem_url") && URIUtils::IsPlugin(item.GetProperty("original_listitem_url").asString()))
+ path = item.GetProperty("original_listitem_url").asString();
+ if( dbs.GetResumeBookMark(path, bookmark) )
seconds = bookmark.timeInSeconds;
else
seconds = 0.0f;
should the playerState be required, it is fetched from the database.
See the note in CGUIWindowVideoBase::ShowResumeMenu.
*/
- if (item.HasVideoInfoTag() && item.GetVideoInfoTag()->m_resumePoint.IsSet())
- options.starttime = item.GetVideoInfoTag()->m_resumePoint.timeInSeconds;
+ if (item.IsResumePointSet())
+ options.starttime = item.GetCurrentResumeTime();
}
else if (item.HasVideoInfoTag())
{
// this really aught to be inside !bRestart, but since PlayStack
// uses that to init playback, we have to keep it outside
int playlist = g_playlistPlayer.GetCurrentPlaylist();
- if (item.IsVideo() && g_playlistPlayer.GetPlaylist(playlist).size() > 1)
+ if (item.IsVideo() && playlist == PLAYLIST_VIDEO && g_playlistPlayer.GetPlaylist(playlist).size() > 1)
{ // playing from a playlist by the looks
// don't switch to fullscreen if we are not playing the first item...
options.fullscreen = !g_playlistPlayer.HasPlayedFirstFile() && g_advancedSettings.m_fullScreenOnMovieStart && !CMediaSettings::Get().DoesVideoStartWindowed();
void CApplication::CheckScreenSaverAndDPMS()
{
- if (m_bInBackground)
- return;
if (!m_dpmsIsActive)
g_Windowing.ResetOSScreensaver();
g_windowManager.ActivateWindow(WINDOW_SCREENSAVER);
}
-void CApplication::SetInBackground(bool background)
-{
- if (!background)
- {
- ResetScreenSaverTimer();
- }
- m_bInBackground = background;
-}
-
void CApplication::CheckShutdown()
{
// first check if we should reset the timer
- bool resetTimer = m_bInhibitIdleShutdown;
-
- if (m_pPlayer->IsPlaying() || m_pPlayer->IsPausedPlayback()) // is something playing?
- resetTimer = true;
-
- if (m_musicInfoScanner->IsScanning())
- resetTimer = true;
-
- if (m_videoInfoScanner->IsScanning())
- resetTimer = true;
-
- if (g_windowManager.IsWindowActive(WINDOW_DIALOG_PROGRESS)) // progress dialog is onscreen
- resetTimer = true;
-
- if (CSettings::Get().GetBool("pvrmanager.enabled") && !g_PVRManager.IsIdle())
- resetTimer = true;
-
- if (resetTimer)
+ if (m_bInhibitIdleShutdown
+ || m_pPlayer->IsPlaying() || m_pPlayer->IsPausedPlayback() // is something playing?
+ || m_musicInfoScanner->IsScanning()
+ || m_videoInfoScanner->IsScanning()
+ || g_windowManager.IsWindowActive(WINDOW_DIALOG_PROGRESS) // progress dialog is onscreen
+ || (CSettings::Get().GetBool("pvrmanager.enabled") && !g_PVRManager.IsIdle()))
{
m_shutdownTimer.StartZero();
return;
//We don't know if there is unsecure information in this yet, so we
//postpone any logging
const std::string in_actionStr(actionStr);
- CLog::Log(LOGDEBUG,"%s : Translating action string", __FUNCTION__);
CGUIInfoLabel info(actionStr, "");
actionStr = info.GetLabel(0);
CAEFactory::GarbageCollect();
+ // if we don't render the gui there's no reason to start the screensaver.
+ // that way the screensaver won't kick in if we maximize the XBMC window
+ // after the screensaver start time.
+ if(!m_renderGUI)
+ ResetScreenSaverTimer();
}
// Global Idle Time in Seconds
hardwareVolume = std::max(VOLUME_MINIMUM, std::min(VOLUME_MAXIMUM, hardwareVolume));
m_volumeLevel = hardwareVolume;
- float value = 0.0f;
- if (hardwareVolume > VOLUME_MINIMUM)
- {
- float dB = CAEUtil::PercentToGain(hardwareVolume);
- value = CAEUtil::GainToScale(dB);
- }
- if (value >= 0.99f)
- value = 1.0f;
-
- CAEFactory::SetVolume(value);
+ CAEFactory::SetVolume(hardwareVolume);
}
float CApplication::GetVolume(bool percentage /* = true */) const