aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Wachenschwanz <mwachens@google.com>2018-05-24 10:08:14 -0700
committerMichael Wachenschwanz <mwachens@google.com>2018-05-24 11:01:45 -0700
commitc2ed3617dd58958822b65e512db99de527cc8da3 (patch)
treedd2db8125ea13477e1b2daf14f86a47a48bcadf9
parent23825c1ae5099c99408cf439cd04e90edbd94ef9 (diff)
downloadrobolectric-shadows-pie-qpr1-s3-release.tar.gz
Bug: 80215357 Test: atest AppStateNotificationBridgeTest Change-Id: Iddab4960ac11334dc9e88191853bcf9b104e4e32
-rw-r--r--shadows/framework/src/main/java/org/robolectric/shadows/ShadowParcel.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowParcel.java b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowParcel.java
index aeb1e45e4..02319ea21 100644
--- a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowParcel.java
+++ b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowParcel.java
@@ -40,6 +40,11 @@ public class ShadowParcel {
nativeWriteByteArray(nativePtr.longValue(), b, offset, len);
}
+ @Implementation
+ public void writeBlob(byte[] b) {
+ writeByteArray(b, 0, b.length);
+ }
+
@HiddenApi
@Implementation(maxSdk = KITKAT_WATCH)
public static int nativeDataSize(int nativePtr) {
@@ -194,6 +199,11 @@ public class ShadowParcel {
return NATIVE_PTR_TO_PARCEL.get(nativePtr).readByteArray();
}
+ @Implementation(minSdk = LOLLIPOP)
+ public static byte[] nativeReadBlob(long nativePtr) {
+ return nativeCreateByteArray(nativePtr);
+ }
+
@HiddenApi
@Implementation(maxSdk = KITKAT_WATCH)
public static int nativeReadInt(int nativePtr) {