Skip to content

Commit 2bd24e4

Browse files
committed
release: SDK 1.21.2
1 parent a5468fb commit 2bd24e4

File tree

5 files changed

+9850
-12
lines changed

5 files changed

+9850
-12
lines changed

Sources/buildSrc/src/main/java/Consts.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object ProjectConsts {
1111
}
1212

1313
object SDKConsts {
14-
const val VERSION = "1.21.1"
14+
const val VERSION = "1.21.2"
1515
const val API_LEVEL = 70
1616
const val MESSAGING_API_LEVEL = 12
1717

Sources/sdk/src/main/java/com/batch/android/messaging/gif/GifDrawable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import androidx.annotation.Nullable;
1717
import androidx.annotation.UiThread;
1818
import androidx.annotation.WorkerThread;
19+
import com.batch.android.core.Logger;
1920
import com.batch.android.core.NamedThreadFactory;
2021
import java.util.LinkedList;
2122
import java.util.Queue;
@@ -76,11 +77,10 @@ private void produceNextFrame() {
7677
gifDecoder.advance();
7778
FrameInfo nextFrame = new FrameInfo(gifDecoder.getNextFrame(), gifDecoder.getNextDelay());
7879
Message.obtain(mainThreadHandler, MESSAGE_FRAME_PRODUCED, nextFrame).sendToTarget();
79-
} catch (OutOfMemoryError e) {
80-
//TODO: Batch log
80+
} catch (Exception | OutOfMemoryError e) {
8181
ranOutOfMemory = true;
8282
Message.obtain(mainThreadHandler, MESSAGE_RAN_OUT_OF_MEMORY).sendToTarget();
83-
Log.e("GIF", "Ran out of memory " + e);
83+
Logger.error("Failed producing next gif frame.", e);
8484
}
8585
}
8686

Sources/sdk/src/main/java/com/batch/android/messaging/view/formats/WebFormatView.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,22 @@ public boolean onCreateWindow(
143143
// view.getHitTestResult() returns the source of the image
144144
// rather than the url.
145145
if (result.getType() == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
146-
Message href = view.getHandler().obtainMessage();
147-
view.requestFocusNodeHref(href);
148-
Bundle data = href.getData();
149-
if (data != null) {
150-
String imageUrl = data.getString("url");
151-
if (imageUrl != null && !imageUrl.isEmpty()) {
152-
url = imageUrl;
146+
Handler handler = view.getHandler();
147+
if (handler != null) {
148+
Message href = handler.obtainMessage();
149+
view.requestFocusNodeHref(href);
150+
Bundle data = href.getData();
151+
if (data != null) {
152+
String imageUrl = data.getString("url");
153+
if (imageUrl != null && !imageUrl.isEmpty()) {
154+
url = imageUrl;
155+
}
153156
}
154157
}
155158
}
156-
actionListener.onOpenDeeplinkAction(url, null, null);
159+
if (url != null) {
160+
actionListener.onOpenDeeplinkAction(url, null, null);
161+
}
157162
}
158163
return super.onCreateWindow(view, isDialog, isUserGesture, resultMsg);
159164
}

proguard-mappings/1.21.2/checksum.sha

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4c6d282444bcac8af38b7dfb219ccca92ff8e2e3 public-sdk/Batch.aar

0 commit comments

Comments
 (0)