Add support for ARSC resource table compact encoding am: 108c4ed20e am: 98272dfa8f

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/robolectric/+/22510884

Change-Id: I1792a09c76ecbc2709a6a1d3a2ef92778abc0c9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/processor/Android.bp b/processor/Android.bp
index 46a8dc3..9d28322 100644
--- a/processor/Android.bp
+++ b/processor/Android.bp
@@ -78,7 +78,7 @@
     // Disable annotation processing while compiling tests to avoid executing RobolectricProcessor.
     javacflags: ["-proc:none"],
 
-    // Disabling tests as they fail in the bramble build.
+    // Disabling as javahost test is broken bramble  
     test_options: {
         unit_test: false,
     },
diff --git a/robolectric/src/test/java/org/robolectric/shadows/ShadowCompanionDeviceManagerTest.java b/robolectric/src/test/java/org/robolectric/shadows/ShadowCompanionDeviceManagerTest.java
index 8437c7a..6b7a35c 100644
--- a/robolectric/src/test/java/org/robolectric/shadows/ShadowCompanionDeviceManagerTest.java
+++ b/robolectric/src/test/java/org/robolectric/shadows/ShadowCompanionDeviceManagerTest.java
@@ -129,6 +129,7 @@
             "deviceProfile",
             /* selfManaged= */ false,
             /* notifyOnDeviceNearby= */ false,
+            /* revoked */ false,
             /* timeApprovedMs= */ 0,
             /* lastTimeConnectedMs= */ 0);
     assertThat(companionDeviceManager.getAssociations()).isEmpty();
diff --git a/robolectric/src/test/java/org/robolectric/shadows/ShadowNfcAdapterTest.java b/robolectric/src/test/java/org/robolectric/shadows/ShadowNfcAdapterTest.java
index 6b849c2..5d43069 100644
--- a/robolectric/src/test/java/org/robolectric/shadows/ShadowNfcAdapterTest.java
+++ b/robolectric/src/test/java/org/robolectric/shadows/ShadowNfcAdapterTest.java
@@ -209,6 +209,6 @@
   }
 
   private static Tag createMockTag() {
-    return Tag.createMockTag(new byte[0], new int[0], new Bundle[0]);
+    return Tag.createMockTag(new byte[0], new int[0], new Bundle[0], 0L);
   }
 }
diff --git a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowCompanionDeviceManager.java b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowCompanionDeviceManager.java
index 7937487..679ad04 100644
--- a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowCompanionDeviceManager.java
+++ b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowCompanionDeviceManager.java
@@ -22,6 +22,7 @@
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
 
+
 /** Shadow for CompanionDeviceManager. */
 @Implements(value = CompanionDeviceManager.class, minSdk = VERSION_CODES.O)
 public class ShadowCompanionDeviceManager {
@@ -138,6 +139,7 @@
         info.deviceProfile(),
         info.selfManaged(),
         info.notifyOnDeviceNearby(),
+        info.revoked(),
         info.timeApprovedMs(),
         info.lastTimeConnectedMs());
   }
@@ -152,6 +154,7 @@
         info.getDeviceProfile(),
         info.isSelfManaged(),
         info.isNotifyOnDeviceNearby(),
+        info.isRevoked(),
         info.getTimeApprovedMs(),
         info.getLastTimeConnectedMs());
   }
@@ -182,6 +185,8 @@
 
     public abstract boolean notifyOnDeviceNearby();
 
+    public abstract boolean revoked();
+
     public abstract long timeApprovedMs();
 
     public abstract long lastTimeConnectedMs();
@@ -205,6 +210,7 @@
         String deviceProfile,
         boolean selfManaged,
         boolean notifyOnDeviceNearby,
+        boolean revoked,
         long timeApprovedMs,
         long lastTimeConnectedMs) {
       return RoboAssociationInfo.builder()
@@ -213,10 +219,10 @@
           .setPackageName(packageName)
           .setDeviceMacAddress(deviceMacAddress)
           .setDisplayName(displayName)
-          .setDeviceProfile(deviceProfile)
           .setSelfManaged(selfManaged)
           .setNotifyOnDeviceNearby(notifyOnDeviceNearby)
           .setTimeApprovedMs(timeApprovedMs)
+              .setRevoked(revoked)
           .setLastTimeConnectedMs(lastTimeConnectedMs)
           .build();
     }
@@ -240,6 +246,8 @@
 
       public abstract Builder setNotifyOnDeviceNearby(boolean notifyOnDeviceNearby);
 
+      public abstract Builder setRevoked(boolean revoked);
+
       public abstract Builder setTimeApprovedMs(long timeApprovedMs);
 
       public abstract Builder setLastTimeConnectedMs(long lastTimeConnectedMs);