aboutsummaryrefslogtreecommitdiff
path: root/tools/android
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2013-11-01 17:12:51 +0100
committerChris "Koying" Browet <cbro@semperpax.com>2013-11-01 17:19:05 +0100
commitdd516c6ae6507ccb25ee4f78885cd43b4383c7e7 (patch)
treeb96a0a3ada64ea3b87764b1326260af58fac163f /tools/android
parent31ab2a1f5f881b74f14e6077ecd158fa27a506c0 (diff)
FIX: [droid] cleanup assets before build and reinstall (possible fix for #14565)
Diffstat (limited to 'tools/android')
-rw-r--r--tools/android/packaging/Makefile2
-rw-r--r--tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java27
2 files changed, 14 insertions, 15 deletions
diff --git a/tools/android/packaging/Makefile b/tools/android/packaging/Makefile
index 5416cf6c0b..547fc39ba3 100644
--- a/tools/android/packaging/Makefile
+++ b/tools/android/packaging/Makefile
@@ -68,7 +68,7 @@ package: extras
@echo "$(XBMCROOT)/xbmcapp-$(CPU)-debug.apk created"
extras: libs
- rm -rf xbmc/assets/python2.6/lib/
+ rm -rf xbmc/assets
mkdir -p xbmc/assets xbmc/res xbmc/res/raw xbmc/assets/python2.6/lib/
cp -rfp $(PREFIX)/share/xbmc/* ./xbmc/assets
find `pwd`/xbmc/assets/ -depth -name ".git" -exec rm -rf {} \;
diff --git a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java
index e3a6200bfa..8ecc127540 100644
--- a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java
+++ b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java
@@ -88,8 +88,21 @@ public class Splash extends Activity {
this.mSplash = splash;
}
+ void DeleteRecursive(File fileOrDirectory) {
+ if (fileOrDirectory.isDirectory())
+ for (File child : fileOrDirectory.listFiles())
+ DeleteRecursive(child);
+
+ fileOrDirectory.delete();
+ }
+
@Override
protected Integer doInBackground(Void... param) {
+ if (fApkDir.exists()) {
+ // Remove existing files
+ Log.d(TAG, "Removing existing " + fApkDir.toString());
+ DeleteRecursive(fApkDir);
+ }
fApkDir.mkdirs();
// Log.d(TAG, "apk: " + sPackagePath);
@@ -125,15 +138,6 @@ public class Splash extends Activity {
continue;
}
- // Log.d(TAG,
- // "time: " + e.getTime() + ";"
- // + fFullPath.lastModified());
-
- // If file exists and has same time, skip
- if (e.getTime() == fFullPath.lastModified())
- continue;
-
- // Log.d(TAG, "writing: " + sFullPath);
fFullPath.getParentFile().mkdirs();
try {
@@ -145,11 +149,6 @@ public class Splash extends Activity {
in.close();
out.close();
-
- // save the zip time. this way we know for certain
- // if we
- // need to refresh.
- fFullPath.setLastModified(e.getTime());
} catch (IOException e1) {
e1.printStackTrace();
}