[Libreoffice-commits] core.git: android/sdremote
Michael Meeks
michael.meeks at suse.com
Tue Feb 19 08:27:54 PST 2013
android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java | 11 +++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit bcaa4cd4f3be07f9211b51da4d258b61423f1e28
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Feb 19 16:26:52 2013 +0000
sdremote: debugging to get a better handle on failed image allocations.
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
index 2135dbf..3925fe2 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java
@@ -9,7 +9,9 @@
package org.libreoffice.impressremote.communication;
import org.libreoffice.impressremote.R;
+import org.libreoffice.impressremote.Globals;
+import android.util.Log;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -54,7 +56,14 @@ public class SlideShow {
return BitmapFactory.decodeResource(mContext.getResources(),
R.drawable.image_loading);
}
- Bitmap aBitmap = BitmapFactory.decodeByteArray(aImage, 0, aImage.length);
+ Bitmap aBitmap = null;
+ try {
+ aBitmap = BitmapFactory.decodeByteArray(aImage, 0, aImage.length);
+ } catch (OutOfMemoryError e) {
+ Log.e(Globals.TAG, "Bitmap decoding error byte length: " + aImage.length +
+ "first 4 bytes: " + aImage[0] + " " + aImage[1] + " " + aImage[2] + " " + aImage[3] +
+ "Exception " + e);
+ }
if (aBitmap == null) {
return BitmapFactory.decodeResource(mContext.getResources(),
R.drawable.image_loading);
More information about the Libreoffice-commits
mailing list