зеркало из https://github.com/mozilla/gecko-dev.git
Bug 686694 - Don't extract libraries on Android unless we're starting with the DEBUG intent. r=dougt
This commit is contained in:
Родитель
2f25c40d87
Коммит
44d9074889
|
@ -93,8 +93,6 @@ public class GeckoAppShell
|
|||
static private final int NOTIFY_IME_CANCELCOMPOSITION = 2;
|
||||
static private final int NOTIFY_IME_FOCUSCHANGE = 3;
|
||||
|
||||
static public final long kFreeSpaceThreshold = 157286400L; // 150MB
|
||||
static private final long kLibFreeSpaceBuffer = 20971520L; // 29MB
|
||||
static private File sCacheFile = null;
|
||||
static private int sFreeSpace = -1;
|
||||
|
||||
|
@ -355,8 +353,9 @@ public class GeckoAppShell
|
|||
|
||||
putLocaleEnv();
|
||||
|
||||
if (freeSpace + kLibFreeSpaceBuffer < kFreeSpaceThreshold) {
|
||||
// remove any previously extracted libs since we're apparently low
|
||||
boolean extractLibs = GeckoApp.ACTION_DEBUG.equals(i.getAction());
|
||||
if (!extractLibs) {
|
||||
// remove any previously extracted libs
|
||||
File[] files = cacheFile.listFiles();
|
||||
if (files != null) {
|
||||
Iterator cacheFiles = Arrays.asList(files).iterator();
|
||||
|
@ -367,7 +366,7 @@ public class GeckoAppShell
|
|||
}
|
||||
}
|
||||
}
|
||||
loadLibs(apkName, freeSpace > kFreeSpaceThreshold);
|
||||
loadLibs(apkName, extractLibs);
|
||||
}
|
||||
|
||||
private static void putLocaleEnv() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче