diff options
author | wsnipex <wsnipex@a1.net> | 2021-03-13 11:40:24 +0100 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2021-03-13 11:40:24 +0100 |
commit | f8cc9f390e2a1a13290b222c4dc86243416993c9 (patch) | |
tree | b2bebbc2acb95b3de080c35096335b9a6839bbcc /tools/android | |
parent | b5e79cdf14dee0e7f276d95059b97e0381cbf0ae (diff) |
[android] allow overriding temp dir
Diffstat (limited to 'tools/android')
-rw-r--r-- | tools/android/packaging/xbmc/src/Splash.java.in | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/android/packaging/xbmc/src/Splash.java.in b/tools/android/packaging/xbmc/src/Splash.java.in index 66dca26f24..a5569ef579 100644 --- a/tools/android/packaging/xbmc/src/Splash.java.in +++ b/tools/android/packaging/xbmc/src/Splash.java.in @@ -91,6 +91,8 @@ public class Splash extends Activity private String sXbmcdata = ""; private File fPackagePath = null; private File fXbmcHome = null; + private String sXbmcTemp = ""; + private File fXbmcTemp = null; private BroadcastReceiver mExternalStorageReceiver = null; private boolean mExternalStorageChecked = false; @@ -595,6 +597,32 @@ public class Splash extends Activity } } + sXbmcTemp = XBMCProperties.getStringProperty("xbmc.temp", ""); + if (!sXbmcTemp.isEmpty()) + { + File fXbmcTemp = new File(sXbmcTemp); + int loop = 20; + while (!fXbmcTemp.exists() && loop > 0) + { + // Wait a while in case of non-primary sdcard + try + { + Thread.sleep(1000); + } + catch (InterruptedException e) + { + continue; + } + loop--; + } + + if (!fXbmcTemp.exists()) + { + sXbmcTemp = ""; + System.setProperty("xbmc.temp", ""); + } + } + sPackagePath = getPackageResourcePath(); fPackagePath = new File(sPackagePath); String obbfn = ""; |