Bug XXXX - Correctly renames the Log() functions to use the right filename. rs=blassey
This commit is contained in:
@@ -74,6 +74,8 @@ import android.graphics.Bitmap;
|
||||
|
||||
public class GeckoAppShell
|
||||
{
|
||||
private static final String LOG_FILE_NAME = "GeckoAppShell";
|
||||
|
||||
// static members only
|
||||
private GeckoAppShell() { }
|
||||
|
||||
@@ -190,25 +192,25 @@ public class GeckoAppShell
|
||||
sFreeSpace = cacheStats.getFreeBlocks() *
|
||||
cacheStats.getBlockSize();
|
||||
} else {
|
||||
Log.i("GeckoAppShell", "Unable to get cache dir");
|
||||
Log.i(LOG_FILE_NAME, "Unable to get cache dir");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("GeckoAppShell", "exception while stating cache dir: ", e);
|
||||
Log.e(LOG_FILE_NAME, "exception while stating cache dir: ", e);
|
||||
}
|
||||
return sFreeSpace;
|
||||
}
|
||||
|
||||
static boolean moveFile(File inFile, File outFile)
|
||||
{
|
||||
Log.i("GeckoAppShell", "moving " + inFile + " to " + outFile);
|
||||
Log.i(LOG_FILE_NAME, "moving " + inFile + " to " + outFile);
|
||||
if (outFile.isDirectory())
|
||||
outFile = new File(outFile, inFile.getName());
|
||||
try {
|
||||
if (inFile.renameTo(outFile))
|
||||
return true;
|
||||
} catch (SecurityException se) {
|
||||
Log.w("GeckoAppShell", "error trying to rename file", se);
|
||||
Log.w(LOG_FILE_NAME, "error trying to rename file", se);
|
||||
}
|
||||
try {
|
||||
long lastModified = inFile.lastModified();
|
||||
@@ -227,11 +229,11 @@ public class GeckoAppShell
|
||||
else
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
Log.e("GeckoAppShell", "exception while moving file: ", e);
|
||||
Log.e(LOG_FILE_NAME, "exception while moving file: ", e);
|
||||
try {
|
||||
outFile.delete();
|
||||
} catch (SecurityException se) {
|
||||
Log.w("GeckoAppShell", "error trying to delete file", se);
|
||||
Log.w(LOG_FILE_NAME, "error trying to delete file", se);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -244,7 +246,7 @@ public class GeckoAppShell
|
||||
if (from.renameTo(to))
|
||||
return true;
|
||||
} catch (SecurityException se) {
|
||||
Log.w("GeckoAppShell", "error trying to rename file", se);
|
||||
Log.w(LOG_FILE_NAME, "error trying to rename file", se);
|
||||
}
|
||||
File[] files = from.listFiles();
|
||||
boolean retVal = true;
|
||||
@@ -262,7 +264,7 @@ public class GeckoAppShell
|
||||
}
|
||||
from.delete();
|
||||
} catch(Exception e) {
|
||||
Log.e("GeckoAppShell", "error trying to move file", e);
|
||||
Log.e(LOG_FILE_NAME, "error trying to move file", e);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@@ -310,11 +312,11 @@ public class GeckoAppShell
|
||||
GeckoAppShell.putenv("GRE_HOME=" + GeckoApp.sGREDir.getPath());
|
||||
Intent i = geckoApp.getIntent();
|
||||
String env = i.getStringExtra("env0");
|
||||
Log.i("GeckoApp", "env0: "+ env);
|
||||
Log.i(LOG_FILE_NAME, "env0: "+ env);
|
||||
for (int c = 1; env != null; c++) {
|
||||
GeckoAppShell.putenv(env);
|
||||
env = i.getStringExtra("env" + c);
|
||||
Log.i("GeckoApp", "env"+ c +": "+ env);
|
||||
Log.i(LOG_FILE_NAME, "env"+ c +": "+ env);
|
||||
}
|
||||
|
||||
File f = geckoApp.getDir("tmp", Context.MODE_WORLD_READABLE |
|
||||
@@ -346,7 +348,7 @@ public class GeckoAppShell
|
||||
GeckoAppShell.putenv("UPDATES_DIRECTORY=" + updatesDir.getPath());
|
||||
}
|
||||
catch (Exception e) {
|
||||
Log.i("GeckoApp", "No download directory has been found: " + e);
|
||||
Log.i(LOG_FILE_NAME, "No download directory has been found: " + e);
|
||||
}
|
||||
|
||||
putLocaleEnv();
|
||||
@@ -1107,7 +1109,7 @@ public class GeckoAppShell
|
||||
|
||||
// If the network state has changed, notify Gecko
|
||||
if (notifyChanged && (state != sNetworkState || typeCode != sNetworkTypeCode)) {
|
||||
Log.i("GeckoAppShell", "Network state changed: (" + state + ", " + type + ") ");
|
||||
Log.i(LOG_FILE_NAME, "Network state changed: (" + state + ", " + type + ") ");
|
||||
sNetworkState = state;
|
||||
sNetworkType = type;
|
||||
sNetworkTypeCode = typeCode;
|
||||
@@ -1191,7 +1193,7 @@ public class GeckoAppShell
|
||||
fos.write(new Integer(pid).toString().getBytes());
|
||||
fos.close();
|
||||
} catch(Exception e) {
|
||||
Log.e("GeckoAppShell", "error putting child in the background", e);
|
||||
Log.e(LOG_FILE_NAME, "error putting child in the background", e);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1212,7 +1214,7 @@ public class GeckoAppShell
|
||||
fos.write(new Integer(pid).toString().getBytes());
|
||||
fos.close();
|
||||
} catch(Exception e) {
|
||||
Log.e("GeckoAppShell", "error putting child in the foreground", e);
|
||||
Log.e(LOG_FILE_NAME, "error putting child in the foreground", e);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1300,7 +1302,7 @@ public class GeckoAppShell
|
||||
in.close();
|
||||
}
|
||||
catch (Exception e) {
|
||||
Log.i("GeckoAppShell", "finding procs throws ", e);
|
||||
Log.i(LOG_FILE_NAME, "finding procs throws ", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1343,7 +1345,7 @@ public class GeckoAppShell
|
||||
return buf.array();
|
||||
}
|
||||
catch (Exception e) {
|
||||
Log.i("GeckoAppShell", "getIconForExtension error: ", e);
|
||||
Log.i(LOG_FILE_NAME, "getIconForExtension error: ", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user