mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 622695 - allow android's logger to handle logging exceptions r=mbrubeck a=blocking-fennec
This commit is contained in:
parent
83ceb4df00
commit
6757a4b02a
@ -123,9 +123,11 @@ abstract public class GeckoApp
|
||||
try {
|
||||
unpackComponents();
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
Log.e("GeckoApp", "error unpacking components", fnfe);
|
||||
showErrorDialog(getString(R.string.error_loading_file));
|
||||
return false;
|
||||
} catch (IOException ie) {
|
||||
Log.e("GeckoApp", "error unpacking components", ie);
|
||||
String msg = ie.getMessage();
|
||||
if (msg.equalsIgnoreCase("No space left on device"))
|
||||
showErrorDialog(getString(R.string.no_space_to_start_error));
|
||||
@ -412,7 +414,7 @@ abstract public class GeckoApp
|
||||
Log.i("GeckoAppJava", intent.toString());
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
Log.i("GeckoAppJava", e.toString());
|
||||
Log.i("GeckoAppJava", "error doing restart", e);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
@ -459,7 +461,7 @@ abstract public class GeckoApp
|
||||
statusCode = 7; // WRITE_ERROR
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.i("GeckoAppJava", e.toString());
|
||||
Log.i("GeckoAppJava", "error launching installer to update", e);
|
||||
}
|
||||
|
||||
// Update the status file
|
||||
@ -472,7 +474,7 @@ abstract public class GeckoApp
|
||||
outStream.write(buf, 0, buf.length);
|
||||
outStream.close();
|
||||
} catch (Exception e) {
|
||||
Log.i("GeckoAppJava", e.toString());
|
||||
Log.i("GeckoAppJava", "error writing status file", e);
|
||||
}
|
||||
|
||||
if (statusCode == 0)
|
||||
@ -486,7 +488,7 @@ abstract public class GeckoApp
|
||||
status = reader.readLine();
|
||||
reader.close();
|
||||
} catch (Exception e) {
|
||||
Log.i("GeckoAppJava", e.toString());
|
||||
Log.i("GeckoAppJava", "error reading update status", e);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@ -506,7 +508,7 @@ abstract public class GeckoApp
|
||||
try {
|
||||
filePickerResult = mFilePickerResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.i("GeckoApp", "error: " + e);
|
||||
Log.i("GeckoApp", "showing file picker ", e);
|
||||
}
|
||||
|
||||
return filePickerResult;
|
||||
@ -541,13 +543,13 @@ abstract public class GeckoApp
|
||||
fos.close();
|
||||
filePickerResult = file.getAbsolutePath();
|
||||
}catch (Exception e) {
|
||||
Log.e("GeckoApp", "error : "+ e);
|
||||
Log.e("GeckoApp", "showing file picker", e);
|
||||
}
|
||||
}
|
||||
try {
|
||||
mFilePickerResult.put(filePickerResult);
|
||||
} catch (InterruptedException e) {
|
||||
Log.i("GeckoApp", "error: " + e);
|
||||
Log.i("GeckoApp", "error returning file picker result", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: Java; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
@ -109,7 +109,7 @@ public class GeckoInputConnection
|
||||
try {
|
||||
mQueryResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: deleteSurroundingText interrupted");
|
||||
Log.e("GeckoAppJava", "IME: deleteSurroundingText interrupted", e);
|
||||
return false;
|
||||
}
|
||||
delStart = mSelectionStart > leftLength ?
|
||||
@ -194,7 +194,7 @@ public class GeckoInputConnection
|
||||
try {
|
||||
text = mQueryResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: performContextMenuAction interrupted");
|
||||
Log.e("GeckoAppJava", "IME: performContextMenuAction interrupted", e);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ public class GeckoInputConnection
|
||||
try {
|
||||
text = mQueryResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: performContextMenuAction interrupted");
|
||||
Log.e("GeckoAppJava", "IME: performContextMenuAction interrupted", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -251,7 +251,7 @@ public class GeckoInputConnection
|
||||
try {
|
||||
mQueryResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: getExtractedText interrupted");
|
||||
Log.e("GeckoAppJava", "IME: getExtractedText interrupted", e);
|
||||
return null;
|
||||
}
|
||||
extract.selectionStart = mSelectionStart;
|
||||
@ -268,7 +268,7 @@ public class GeckoInputConnection
|
||||
return extract;
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: getExtractedText interrupted");
|
||||
Log.e("GeckoAppJava", "IME: getExtractedText interrupted", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -282,7 +282,7 @@ public class GeckoInputConnection
|
||||
try {
|
||||
mQueryResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: getTextBefore/AfterCursor interrupted");
|
||||
Log.e("GeckoAppJava", "IME: getTextBefore/AfterCursor interrupted", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ public class GeckoInputConnection
|
||||
try {
|
||||
return mQueryResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: getTextBefore/AfterCursor: Interrupted!");
|
||||
Log.e("GeckoAppJava", "IME: getTextBefore/AfterCursor: Interrupted!", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -331,7 +331,7 @@ public class GeckoInputConnection
|
||||
try {
|
||||
mQueryResult.take();
|
||||
} catch (InterruptedException e) {
|
||||
Log.e("GeckoAppJava", "IME: setComposingText interrupted");
|
||||
Log.e("GeckoAppJava", "IME: setComposingText interrupted", e);
|
||||
return false;
|
||||
}
|
||||
// Make sure we are in a composition
|
||||
|
@ -175,7 +175,7 @@ class GeckoSurfaceView
|
||||
try {
|
||||
bb = mSyncBuf.take();
|
||||
} catch (InterruptedException ie) {
|
||||
Log.e("GeckoAppJava", "Threw exception while getting sync buf: " + ie);
|
||||
Log.e("GeckoAppJava", "Threw exception while getting sync buf: ", ie);
|
||||
}
|
||||
if (bb != null && bb.capacity() == (width * height * 2)) {
|
||||
mSoftwareBitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.RGB_565);
|
||||
@ -289,7 +289,7 @@ class GeckoSurfaceView
|
||||
try {
|
||||
mSyncBuf.put(buffer);
|
||||
} catch (InterruptedException ie) {
|
||||
Log.e("GeckoAppJava", "Threw exception while getting sync buf: " + ie);
|
||||
Log.e("GeckoAppJava", "Threw exception while getting sync buf: ", ie);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: Java; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
@ -94,7 +94,7 @@ public class NotificationHandler
|
||||
try {
|
||||
context.startActivity(appIntent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Log.e("GeckoAppJava", "NotificationHandler Exception: " + e.getMessage());
|
||||
Log.e("GeckoAppJava", "NotificationHandler Exception: ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user