зеркало из https://github.com/mozilla/gecko-dev.git
Bug 692988 - Give Flash a valid application directory
This commit is contained in:
Родитель
63320990d9
Коммит
84d7d6fcda
|
@ -52,8 +52,14 @@
|
||||||
const char*
|
const char*
|
||||||
anp_system_getApplicationDataDirectory()
|
anp_system_getApplicationDataDirectory()
|
||||||
{
|
{
|
||||||
LOG("getApplicationDataDirectory return /data/data/org.mozilla.%s", MOZ_APP_NAME);
|
static char *dir = NULL;
|
||||||
return "/data/data/org.mozilla." MOZ_APP_NAME;
|
|
||||||
|
if (!dir) {
|
||||||
|
dir = getenv("ANDROID_PLUGIN_DATADIR");
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG("getApplicationDataDirectory return %s", dir);
|
||||||
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
jclass anp_system_loadJavaClass(NPP instance, const char* className)
|
jclass anp_system_loadJavaClass(NPP instance, const char* className)
|
||||||
|
|
|
@ -364,6 +364,9 @@ public class GeckoAppShell
|
||||||
File cacheFile = getCacheDir();
|
File cacheFile = getCacheDir();
|
||||||
GeckoAppShell.putenv("CACHE_PATH=" + cacheFile.getPath());
|
GeckoAppShell.putenv("CACHE_PATH=" + cacheFile.getPath());
|
||||||
|
|
||||||
|
File pluginDataDir = GeckoApp.mAppContext.getDir("plugins", 0);
|
||||||
|
GeckoAppShell.putenv("ANDROID_PLUGIN_DATADIR=" + pluginDataDir.getPath());
|
||||||
|
|
||||||
// gingerbread introduces File.getUsableSpace(). We should use that.
|
// gingerbread introduces File.getUsableSpace(). We should use that.
|
||||||
long freeSpace = getFreeSpace();
|
long freeSpace = getFreeSpace();
|
||||||
try {
|
try {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче