Merge "Fix the potential memory leak issue caused by setExtension." into main
diff --git a/Android.bp b/Android.bp
index b3c930a..c1a8012 100644
--- a/Android.bp
+++ b/Android.bp
@@ -520,11 +520,7 @@
         ],
     },
     jarjar_prefix: "com.android.internal.hidden_from_bootclasspath",
-
-    jarjar_shards: select(release_flag("RELEASE_USE_SHARDED_JARJAR_ON_FRAMEWORK_MINUS_APEX"), {
-        true: "10",
-        default: "1",
-    }),
+    jarjar_shards: "10",
 }
 
 java_library {
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 8a85406..a624994 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -6950,7 +6950,7 @@
                         Slog.w(TAG, "Low overhead tracing feature is not enabled");
                         break;
                     }
-                    VMDebug.startLowOverheadTrace();
+                    VMDebug.startLowOverheadTraceForAllMethods();
                     break;
                 default:
                     try {
diff --git a/core/java/android/hardware/usb/OWNERS b/core/java/android/hardware/usb/OWNERS
index 37604bc..1de8a24 100644
--- a/core/java/android/hardware/usb/OWNERS
+++ b/core/java/android/hardware/usb/OWNERS
@@ -1,7 +1,7 @@
 # Bug component: 175220
 
-anothermark@google.com
+vmartensson@google.com
+nkapron@google.com
 febinthattil@google.com
-aprasath@google.com
+shubhankarm@google.com
 badhri@google.com
-kumarashishg@google.com
\ No newline at end of file
diff --git a/core/java/android/security/flags.aconfig b/core/java/android/security/flags.aconfig
index ceee898b..4249372 100644
--- a/core/java/android/security/flags.aconfig
+++ b/core/java/android/security/flags.aconfig
@@ -43,7 +43,7 @@
 
 flag {
     name: "secure_array_zeroization"
-    namespace: "platform_security"
+    namespace: "security"
     description: "Enable secure array zeroization"
     bug: "320392352"
     metadata {
diff --git a/core/java/android/view/InsetsSourceControl.java b/core/java/android/view/InsetsSourceControl.java
index 7877352..c91a330 100644
--- a/core/java/android/view/InsetsSourceControl.java
+++ b/core/java/android/view/InsetsSourceControl.java
@@ -190,7 +190,7 @@
     }
 
     public void release(Consumer<SurfaceControl> surfaceReleaseConsumer) {
-        if (mLeash != null) {
+        if (mLeash != null && mLeash.isValid()) {
             surfaceReleaseConsumer.accept(mLeash);
         }
     }
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index d129762..83750ac 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -1051,7 +1051,7 @@
         }
         final int patternSize = pattern.size();
 
-        byte[] res = new byte[patternSize];
+        byte[] res = newNonMovableByteArray(patternSize);
         for (int i = 0; i < patternSize; i++) {
             LockPatternView.Cell cell = pattern.get(i);
             res[i] = (byte) (cell.getRow() * 3 + cell.getColumn() + '1');
diff --git a/core/java/com/android/internal/widget/LockscreenCredential.java b/core/java/com/android/internal/widget/LockscreenCredential.java
index 92ce990..2a12c98 100644
--- a/core/java/com/android/internal/widget/LockscreenCredential.java
+++ b/core/java/com/android/internal/widget/LockscreenCredential.java
@@ -81,9 +81,9 @@
     /**
      * Private constructor, use static builder methods instead.
      *
-     * <p> Builder methods should create a private copy of the credential bytes and pass in here.
-     * LockscreenCredential will only store the reference internally without copying. This is to
-     * minimize the number of extra copies introduced.
+     * <p> Builder methods should create a private copy of the credential bytes using a non-movable
+     * array and pass it in here.  LockscreenCredential will only store the reference internally
+     * without copying. This is to minimize the number of extra copies introduced.
      */
     private LockscreenCredential(int type, byte[] credential, boolean hasInvalidChars) {
         Objects.requireNonNull(credential);
@@ -141,7 +141,7 @@
      */
     public static LockscreenCredential createUnifiedProfilePassword(@NonNull byte[] password) {
         return new LockscreenCredential(CREDENTIAL_TYPE_PASSWORD,
-                Arrays.copyOf(password, password.length), /* hasInvalidChars= */ false);
+                copyOfArrayNonMovable(password), /* hasInvalidChars= */ false);
     }
 
     /**
@@ -237,7 +237,7 @@
     /** Create a copy of the credential */
     public LockscreenCredential duplicate() {
         return new LockscreenCredential(mType,
-                mCredential != null ? Arrays.copyOf(mCredential, mCredential.length) : null,
+                mCredential != null ? copyOfArrayNonMovable(mCredential) : null,
                 mHasInvalidChars);
     }
 
@@ -252,6 +252,15 @@
     }
 
     /**
+     * Copies the given array into a new non-movable array.
+     */
+    private static byte[] copyOfArrayNonMovable(byte[] array) {
+        byte[] copy = LockPatternUtils.newNonMovableByteArray(array.length);
+        System.arraycopy(array, 0, copy, 0, array.length);
+        return copy;
+    }
+
+    /**
      * Checks whether the credential meets basic requirements for setting it as a new credential.
      *
      * This is redundant if {@link android.app.admin.PasswordMetrics#validateCredential()}, which
@@ -440,7 +449,7 @@
      * @return A byte array representing the input
      */
     private static byte[] charsToBytesTruncating(CharSequence chars) {
-        byte[] bytes = new byte[chars.length()];
+        byte[] bytes = LockPatternUtils.newNonMovableByteArray(chars.length());
         for (int i = 0; i < chars.length(); i++) {
             bytes[i] = (byte) chars.charAt(i);
         }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java
index bcd40a9..c4696d5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java
@@ -192,15 +192,22 @@
                 throw new IllegalStateException("Sync Transactions must be serialized. In Flight: "
                         + mInFlight.mId + " - " + mInFlight.mWCT);
             }
-            mInFlight = this;
             if (DEBUG) Slog.d(TAG, "Sending sync transaction: " + mWCT);
-            if (mLegacyTransition != null) {
-                mId = new WindowOrganizer().startLegacyTransition(mLegacyTransition.getType(),
-                        mLegacyTransition.getAdapter(), this, mWCT);
-            } else {
-                mId = new WindowOrganizer().applySyncTransaction(mWCT, this);
+            try {
+                if (mLegacyTransition != null) {
+                    mId = new WindowOrganizer().startLegacyTransition(mLegacyTransition.getType(),
+                            mLegacyTransition.getAdapter(), this, mWCT);
+                } else {
+                    mId = new WindowOrganizer().applySyncTransaction(mWCT, this);
+                }
+            } catch (RuntimeException e) {
+                Slog.e(TAG, "Send failed", e);
+                // Finish current sync callback immediately.
+                onTransactionReady(mId, new SurfaceControl.Transaction());
+                return;
             }
             if (DEBUG) Slog.d(TAG, " Sent sync transaction. Got id=" + mId);
+            mInFlight = this;
             mMainExecutor.executeDelayed(mOnReplyTimeout, REPLY_TIMEOUT);
         }
 
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
index 8077aee..8cec017 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
@@ -1080,9 +1080,12 @@
                                 change, layer, info, t, mLeashMap);
                         appearedTargets[nextTargetIdx++] = target;
                         // reparent into the original `mInfo` since that's where we are animating.
-                        final int rootIdx = TransitionUtil.rootIndexFor(change, mInfo);
+                        final TransitionInfo.Root root = TransitionUtil.getRootFor(change, mInfo);
                         final boolean wasClosing = closingIdx >= 0;
-                        t.reparent(target.leash, mInfo.getRoot(rootIdx).getLeash());
+                        t.reparent(target.leash, root.getLeash());
+                        t.setPosition(target.leash,
+                                change.getStartAbsBounds().left - root.getOffset().x,
+                                change.getStartAbsBounds().top - root.getOffset().y);
                         t.setLayer(target.leash, layer);
                         if (wasClosing) {
                             // App was previously visible and is closing
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 782db35..cf54f6c 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -907,13 +907,13 @@
         /** @hide */
         public String[] validFeatures() {
             Feature[] features = getValidFeatures();
-            String[] res = new String[features.length];
-            for (int i = 0; i < res.length; i++) {
+            ArrayList<String> res = new ArrayList();
+            for (int i = 0; i < features.length; i++) {
                 if (!features[i].mInternal) {
-                    res[i] = features[i].mName;
+                    res.add(features[i].mName);
                 }
             }
-            return res;
+            return res.toArray(new String[0]);
         }
 
         private Feature[] getValidFeatures() {
diff --git a/media/java/android/mtp/OWNERS b/media/java/android/mtp/OWNERS
index 77ed08b..c57265a 100644
--- a/media/java/android/mtp/OWNERS
+++ b/media/java/android/mtp/OWNERS
@@ -1,9 +1,9 @@
 set noparent
 
-anothermark@google.com
+vmartensson@google.com
+nkapron@google.com
 febinthattil@google.com
-aprasath@google.com
+shubhankarm@google.com
 jsharkey@android.com
 jameswei@google.com
 rmojumder@google.com
-kumarashishg@google.com
diff --git a/media/jni/OWNERS b/media/jni/OWNERS
index e12d828..fdddf13 100644
--- a/media/jni/OWNERS
+++ b/media/jni/OWNERS
@@ -4,5 +4,5 @@
 # extra for TV related files
 per-file android_media_tv_*=hgchen@google.com,quxiangfang@google.com
 
-per-file android_media_JetPlayer.cpp,android_media_MediaDataSource.cpp,android_media_MediaDataSource.h,android_media_MediaPlayer.java=set noparent
-per-file android_media_JetPlayer.cpp,android_media_MediaDataSource.cpp,android_media_MediaDataSource.h,android_media_MediaPlayer.java=file:platform/frameworks/av:/media/janitors/media_solutions_OWNERS
+per-file android_media_JetPlayer.cpp,android_media_MediaDataSource.cpp,android_media_MediaDataSource.h,android_media_MediaPlayer.cpp=set noparent
+per-file android_media_JetPlayer.cpp,android_media_MediaDataSource.cpp,android_media_MediaDataSource.h,android_media_MediaPlayer.cpp=file:platform/frameworks/av:/media/janitors/media_solutions_OWNERS
diff --git a/media/jni/android_mtp_MtpDatabase.cpp b/media/jni/android_mtp_MtpDatabase.cpp
index a77bc9f..a1ce495 100644
--- a/media/jni/android_mtp_MtpDatabase.cpp
+++ b/media/jni/android_mtp_MtpDatabase.cpp
@@ -910,7 +910,7 @@
         case MTP_FORMAT_TIFF:
         case MTP_FORMAT_TIFF_EP:
         case MTP_FORMAT_DEFINED: {
-            String8 temp(path);
+            String8 temp {static_cast<std::string_view>(path)};
             std::unique_ptr<FileStream> stream(new FileStream(temp));
             piex::PreviewImageData image_data;
             if (!GetExifFromRawImage(stream.get(), temp, image_data)) {
@@ -967,7 +967,7 @@
             case MTP_FORMAT_TIFF:
             case MTP_FORMAT_TIFF_EP:
             case MTP_FORMAT_DEFINED: {
-                String8 temp(path);
+                String8 temp {static_cast<std::string_view>(path)};
                 std::unique_ptr<FileStream> stream(new FileStream(temp));
                 piex::PreviewImageData image_data;
                 if (!GetExifFromRawImage(stream.get(), temp, image_data)) {
diff --git a/media/tests/MtpTests/OWNERS b/media/tests/MtpTests/OWNERS
index bdb6cdb..c57265a 100644
--- a/media/tests/MtpTests/OWNERS
+++ b/media/tests/MtpTests/OWNERS
@@ -1,9 +1,9 @@
 set noparent
 
-anothermark@google.com
+vmartensson@google.com
+nkapron@google.com
 febinthattil@google.com
-aprasath@google.com
+shubhankarm@google.com
 jsharkey@android.com
 jameswei@google.com
 rmojumder@google.com
-kumarashishg@google.com
\ No newline at end of file
diff --git a/packages/SettingsLib/OWNERS b/packages/SettingsLib/OWNERS
index e4bc7b4..04df308 100644
--- a/packages/SettingsLib/OWNERS
+++ b/packages/SettingsLib/OWNERS
@@ -3,6 +3,7 @@
 chiujason@google.com
 cipson@google.com
 dsandler@android.com
+dswliu@google.com
 edgarwang@google.com
 evanlaird@google.com
 jiannan@google.com
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
index ff08403..60fae3f 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
@@ -18,10 +18,13 @@
 
 import static android.os.Process.FIRST_APPLICATION_UID;
 
+import static com.android.aconfig_new_storage.Flags.enableAconfigStorageDaemon;
+
 import android.aconfig.Aconfig.flag_permission;
 import android.aconfig.Aconfig.flag_state;
 import android.aconfig.Aconfig.parsed_flag;
 import android.aconfig.Aconfig.parsed_flags;
+import android.aconfigd.AconfigdFlagInfo;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.content.Context;
@@ -65,14 +68,10 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
-import java.io.InputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.attribute.PosixFileAttributes;
-import java.nio.file.attribute.PosixFilePermission;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -84,18 +83,6 @@
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 
-// FOR ACONFIGD TEST MISSION AND ROLLOUT
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import android.util.proto.ProtoInputStream;
-import android.aconfigd.Aconfigd.StorageRequestMessage;
-import android.aconfigd.Aconfigd.StorageRequestMessages;
-import android.aconfigd.Aconfigd.StorageReturnMessage;
-import android.aconfigd.Aconfigd.StorageReturnMessages;
-import android.aconfigd.AconfigdClientSocket;
-import android.aconfigd.AconfigdFlagInfo;
-import android.aconfigd.AconfigdJavaUtils;
-import static com.android.aconfig_new_storage.Flags.enableAconfigStorageDaemon;
 /**
  * This class contains the state for one type of settings. It is responsible
  * for saving the state asynchronously to an XML file after a mutation and
@@ -393,22 +380,6 @@
                     getAllAconfigFlagsFromSettings(mAconfigDefaultFlags);
                 }
             }
-
-            if (isConfigSettingsKey(mKey)) {
-                requests = handleBulkSyncToNewStorage(mAconfigDefaultFlags);
-            }
-        }
-
-        if (enableAconfigStorageDaemon()) {
-            if (isConfigSettingsKey(mKey)){
-                AconfigdClientSocket localSocket = AconfigdJavaUtils.getAconfigdClientSocket();
-                if (requests != null) {
-                    InputStream res = localSocket.send(requests.getBytes());
-                    if (res == null) {
-                        Slog.w(LOG_TAG, "Bulk sync request to acongid failed.");
-                    }
-                }
-            }
         }
     }
 
@@ -482,87 +453,6 @@
         return flag;
     }
 
-
-    // TODO(b/341764371): migrate aconfig flag push to GMS core
-    @VisibleForTesting
-    @GuardedBy("mLock")
-    public ProtoOutputStream handleBulkSyncToNewStorage(
-            Map<String, AconfigdFlagInfo> aconfigFlagMap) {
-        // get marker or add marker if it does not exist
-        Setting markerSetting = mSettings.get(BULK_SYNC_MARKER);
-        int localCounter = 0;
-        if (markerSetting == null) {
-            markerSetting = new Setting(BULK_SYNC_MARKER, "0", false, "aconfig", "aconfig");
-            mSettings.put(BULK_SYNC_MARKER, markerSetting);
-        }
-        try {
-            localCounter = Integer.parseInt(markerSetting.value);
-        } catch (NumberFormatException e) {
-            // reset local counter
-            markerSetting.value = "0";
-        }
-
-        if (enableAconfigStorageDaemon()) {
-            Setting bulkSyncCounter = mSettings.get(BULK_SYNC_TRIGGER_COUNTER);
-            int serverCounter = 0;
-            if (bulkSyncCounter != null) {
-                try {
-                    serverCounter = Integer.parseInt(bulkSyncCounter.value);
-                } catch (NumberFormatException e) {
-                    // reset the local value of server counter
-                    bulkSyncCounter.value = "0";
-                }
-            }
-
-            boolean shouldSync = localCounter < serverCounter;
-            if (!shouldSync) {
-                // CASE 1, flag is on, bulk sync marker true, nothing to do
-                return null;
-            } else {
-                // CASE 2, flag is on, bulk sync marker false. Do following two tasks
-                // (1) Do bulk sync here.
-                // (2) After bulk sync, set marker to true.
-
-                // first add storage reset request
-                ProtoOutputStream requests = new ProtoOutputStream();
-                AconfigdJavaUtils.writeResetStorageRequest(requests);
-
-                // loop over all settings and add flag override requests
-                for (AconfigdFlagInfo flag : aconfigFlagMap.values()) {
-                    // don't sync read_only flags
-                    if (!flag.getIsReadWrite()) {
-                        continue;
-                    }
-
-                    if (flag.getHasServerOverride()) {
-                        AconfigdJavaUtils.writeFlagOverrideRequest(
-                                requests,
-                                flag.getPackageName(),
-                                flag.getFlagName(),
-                                flag.getServerFlagValue(),
-                                StorageRequestMessage.SERVER_ON_REBOOT);
-                    }
-
-                    if (flag.getHasLocalOverride()) {
-                        AconfigdJavaUtils.writeFlagOverrideRequest(
-                                requests,
-                                flag.getPackageName(),
-                                flag.getFlagName(),
-                                flag.getLocalFlagValue(),
-                                StorageRequestMessage.LOCAL_ON_REBOOT);
-                    }
-                }
-
-                // mark sync has been done
-                markerSetting.value = String.valueOf(serverCounter);
-                scheduleWriteIfNeededLocked();
-                return requests;
-            }
-        } else {
-            return null;
-        }
-    }
-
     @GuardedBy("mLock")
     private void loadAconfigDefaultValuesLocked(List<String> filePaths) {
         for (String fileName : filePaths) {
diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java
index f798a35..81e1aa8 100644
--- a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java
+++ b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java
@@ -30,19 +30,20 @@
 import android.platform.test.flag.junit.CheckFlagsRule;
 import android.platform.test.flag.junit.DeviceFlagsValueProvider;
 import android.util.Xml;
-import android.util.proto.ProtoOutputStream;
 
 import androidx.test.InstrumentationRegistry;
 import androidx.test.runner.AndroidJUnit4;
 
 import com.android.modules.utils.TypedXmlSerializer;
 
-import android.platform.test.annotations.EnableFlags;
-import android.platform.test.annotations.DisableFlags;
-import android.platform.test.flag.junit.SetFlagsRule;
-
 import com.google.common.base.Strings;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -51,11 +52,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 
 @RunWith(AndroidJUnit4.class)
 public class SettingsStateTest {
@@ -1084,124 +1080,6 @@
         assertTrue(flag1.getHasLocalOverride());
     }
 
-    @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
-
-    @Test
-    @EnableFlags(com.android.aconfig_new_storage.Flags.FLAG_ENABLE_ACONFIG_STORAGE_DAEMON)
-    public void testHandleBulkSyncWithAconfigdEnabled() {
-        int configKey = SettingsState.makeKey(SettingsState.SETTINGS_TYPE_CONFIG, 0);
-        Object lock = new Object();
-        SettingsState settingsState =
-                new SettingsState(
-                        InstrumentationRegistry.getContext(),
-                        lock,
-                        mSettingsFile,
-                        configKey,
-                        SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED,
-                        Looper.getMainLooper());
-
-        Map<String, AconfigdFlagInfo> flags = new HashMap<>();
-        flags.put(
-                "com.android.flags/flag1",
-                AconfigdFlagInfo.newBuilder()
-                        .setPackageName("com.android.flags")
-                        .setFlagName("flag1")
-                        .setBootFlagValue("true")
-                        .setIsReadWrite(true)
-                        .build());
-
-        flags.put(
-                "com.android.flags/flag2",
-                AconfigdFlagInfo.newBuilder()
-                        .setPackageName("com.android.flags")
-                        .setFlagName("flag2")
-                        .setBootFlagValue("true")
-                        .setIsReadWrite(false)
-                        .build());
-
-        String bulkSyncMarker = "aconfigd_marker/bulk_synced";
-        String bulkSyncCounter =
-                "core_experiments_team_internal/" +
-                "BulkSyncTriggerCounterFlag__bulk_sync_trigger_counter";
-
-        synchronized (lock) {
-            settingsState.insertSettingLocked(bulkSyncMarker, "0", null, false, "aconfig");
-            settingsState.insertSettingLocked(bulkSyncCounter, "1", null, false,
-                    "com.google.android.platform.core_experiments_team_internal");
-
-            // first bulk sync
-            ProtoOutputStream requests = settingsState.handleBulkSyncToNewStorage(flags);
-            assertTrue(requests != null);
-            String value = settingsState.getSettingLocked("aconfigd_marker/bulk_synced").getValue();
-            assertEquals("1", value);
-
-            // send time should no longer bulk sync
-            requests = settingsState.handleBulkSyncToNewStorage(flags);
-            assertNull(requests);
-            value = settingsState.getSettingLocked("aconfigd_marker/bulk_synced").getValue();
-            assertEquals("1", value);
-
-            // won't sync if the marker is string
-            settingsState.insertSettingLocked(bulkSyncMarker, "true", null, false, "aconfig");
-            settingsState.insertSettingLocked(bulkSyncCounter, "0", null, false,
-                    "com.google.android.platform.core_experiments_team_internal");
-            requests = settingsState.handleBulkSyncToNewStorage(flags);
-            assertNull(requests);
-            value = settingsState.getSettingLocked("aconfigd_marker/bulk_synced").getValue();
-            assertEquals("0", value);
-
-            // won't sync if the marker and counter value are the same
-            settingsState.insertSettingLocked(bulkSyncMarker, "1", null, false, "aconfig");
-            settingsState.insertSettingLocked(bulkSyncCounter, "1", null, false,
-                    "com.google.android.platform.core_experiments_team_internal");
-            requests = settingsState.handleBulkSyncToNewStorage(flags);
-            assertNull(requests);
-            value = settingsState.getSettingLocked("aconfigd_marker/bulk_synced").getValue();
-            assertEquals("1", value);
-        }
-    }
-
-    @Test
-    @DisableFlags(com.android.aconfig_new_storage.Flags.FLAG_ENABLE_ACONFIG_STORAGE_DAEMON)
-    public void testHandleBulkSyncWithAconfigdDisabled() {
-        int configKey = SettingsState.makeKey(SettingsState.SETTINGS_TYPE_CONFIG, 0);
-        Object lock = new Object();
-        SettingsState settingsState = new SettingsState(
-                InstrumentationRegistry.getContext(), lock, mSettingsFile, configKey,
-                SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED, Looper.getMainLooper());
-
-        Map<String, AconfigdFlagInfo> flags = new HashMap<>();
-        String bulkSyncMarker = "aconfigd_marker/bulk_synced";
-        String bulkSyncCounter =
-                "core_experiments_team_internal/" +
-                "BulkSyncTriggerCounterFlag__bulk_sync_trigger_counter";
-        synchronized (lock) {
-            settingsState.insertSettingLocked("aconfigd_marker/bulk_synced",
-                    "true", null, false, "aconfig");
-
-            // when aconfigd is off, should change the marker to false
-            ProtoOutputStream requests = settingsState.handleBulkSyncToNewStorage(flags);
-            assertNull(requests);
-            String value = settingsState.getSettingLocked("aconfigd_marker/bulk_synced").getValue();
-            assertEquals("0", value);
-
-            // marker started with false value, after call, it should remain false
-            requests = settingsState.handleBulkSyncToNewStorage(flags);
-            assertNull(requests);
-            value = settingsState.getSettingLocked("aconfigd_marker/bulk_synced").getValue();
-            assertEquals("0", value);
-
-            // won't sync
-            settingsState.insertSettingLocked(bulkSyncMarker, "0", null, false, "aconfig");
-            settingsState.insertSettingLocked(bulkSyncCounter, "1", null, false,
-                    "com.google.android.platform.core_experiments_team_internal");
-            requests = settingsState.handleBulkSyncToNewStorage(flags);
-            assertNull(requests);
-            value = settingsState.getSettingLocked("aconfigd_marker/bulk_synced").getValue();
-            assertEquals("0", value);
-        }
-    }
-
     @Test
     public void testGetAllAconfigFlagsFromSettings() throws Exception {
         final Object lock = new Object();
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index c3c23e3..38bd29a 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -596,6 +596,7 @@
         "-Adagger.fastInit=enabled",
         "-Adagger.explicitBindingConflictsWithInject=ERROR",
         "-Adagger.strictMultibindingValidation=enabled",
+        "-Adagger.useBindingGraphFix=ENABLED",
         "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
     ],
     kotlincflags: ["-Xjvm-default=all"],
@@ -773,6 +774,9 @@
     use_resource_processor: true,
     manifest: "tests/AndroidManifest-base.xml",
     resource_dirs: [],
+
+    kotlin_lang_version: "1.9",
+
     additional_manifests: ["tests/AndroidManifest.xml"],
     srcs: [
         "tests/src/**/*.kt",
@@ -815,6 +819,10 @@
         // TODO(b/352363800): Why do we need this?
         "-J-Xmx8192M",
     ],
+    javacflags: [
+        "-Adagger.useBindingGraphFix=ENABLED",
+    ],
+
     aaptflags: [
         "--extra-packages",
         "com.android.systemui",
@@ -904,7 +912,6 @@
         "truth",
     ],
 
-
     instrumentation_for: "SystemUIRobo-stub",
     java_resource_dirs: ["tests/robolectric/config"],
     plugins: [
@@ -940,7 +947,6 @@
         "truth",
     ],
 
-
     instrumentation_for: "SystemUIRobo-stub",
     java_resource_dirs: ["tests/robolectric/config"],
     plugins: [
diff --git a/packages/SystemUI/OWNERS b/packages/SystemUI/OWNERS
index 795b395..7fadcc4 100644
--- a/packages/SystemUI/OWNERS
+++ b/packages/SystemUI/OWNERS
@@ -39,6 +39,7 @@
 gallmann@google.com
 graciecheng@google.com
 gwasserman@google.com
+helencheuk@google.com
 hwwang@google.com
 hyunyoungs@google.com
 ikateryna@google.com
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp
index 0ff856e..1d74774c 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp
+++ b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp
@@ -5,7 +5,7 @@
 aconfig_declarations {
     name: "com_android_a11y_menu_flags",
     package: "com.android.systemui.accessibility.accessibilitymenu",
-    container: "system",
+    container: "system_ext",
     srcs: [
         "accessibility.aconfig",
     ],
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig
index 6d79011..bdf6d42 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig
+++ b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig
@@ -1,5 +1,5 @@
 package: "com.android.systemui.accessibility.accessibilitymenu"
-container: "system"
+container: "system_ext"
 
 # NOTE: Keep alphabetized to help limit merge conflicts from multiple simultaneous editors.
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java
index 5a616df..2d36f16 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java
@@ -138,10 +138,12 @@
         DumpUtilsKt.withIncreasedIndent(pw, () -> {
             pw.println("visibility: " + DumpUtilsKt.visibilityString(getVisibility()));
             pw.println("manageButton showHistory: " + mShowHistory);
-            pw.println("manageButton visibility: "
-                    + DumpUtilsKt.visibilityString(mClearAllButton.getVisibility()));
-            pw.println("dismissButton visibility: "
-                    + DumpUtilsKt.visibilityString(mClearAllButton.getVisibility()));
+            if (mManageOrHistoryButton != null)
+                pw.println("mManageOrHistoryButton visibility: "
+                        + DumpUtilsKt.visibilityString(mManageOrHistoryButton.getVisibility()));
+            if (mClearAllButton != null)
+                pw.println("mClearAllButton visibility: "
+                        + DumpUtilsKt.visibilityString(mClearAllButton.getVisibility()));
         });
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt
index d0c5e7a..49df169 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt
@@ -157,7 +157,7 @@
                         if (
                             (it.arguments[0] as Intent).`package` == CAST_TO_OTHER_DEVICES_PACKAGE
                         ) {
-                            emptyList()
+                            emptyList<ResolveInfo>()
                         } else {
                             listOf(mock<ResolveInfo>())
                         }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt
index 16061df..8a5797b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt
@@ -63,7 +63,7 @@
             doAnswer {
                     // See Utils.isHeadlessRemoteDisplayProvider
                     if ((it.arguments[0] as Intent).`package` == HEADLESS_REMOTE_PACKAGE) {
-                        emptyList()
+                        emptyList<ResolveInfo>()
                     } else {
                         listOf(mock<ResolveInfo>())
                     }
diff --git a/packages/Vcn/framework-b/framework-vcn-jarjar-rules.txt b/packages/Vcn/framework-b/framework-vcn-jarjar-rules.txt
index 7e27b24..33287b7 100644
--- a/packages/Vcn/framework-b/framework-vcn-jarjar-rules.txt
+++ b/packages/Vcn/framework-b/framework-vcn-jarjar-rules.txt
@@ -1,2 +1,3 @@
 rule android.net.vcn.persistablebundleutils.** android.net.connectivity.android.net.vcn.persistablebundleutils.@1
-rule android.net.vcn.util.** android.net.connectivity.android.net.vcn.util.@1
\ No newline at end of file
+rule android.net.vcn.util.** android.net.connectivity.android.net.vcn.util.@1
+rule android.util.IndentingPrintWriter android.net.connectivity.android.util.IndentingPrintWriter
\ No newline at end of file
diff --git a/ravenwood/Android.bp b/ravenwood/Android.bp
index 8e99842..adbb3af 100644
--- a/ravenwood/Android.bp
+++ b/ravenwood/Android.bp
@@ -175,9 +175,9 @@
 }
 
 java_device_for_host {
-    name: "ravenwood-junit-impl-for-ravenizer",
+    name: "ravenwood-junit-for-ravenizer",
     libs: [
-        "ravenwood-junit-impl",
+        "ravenwood-junit",
     ],
     visibility: [":__subpackages__"],
 }
diff --git a/ravenwood/texts/ravenwood-standard-options.txt b/ravenwood/texts/ravenwood-standard-options.txt
index 3ec3e3c..27223d8b 100644
--- a/ravenwood/texts/ravenwood-standard-options.txt
+++ b/ravenwood/texts/ravenwood-standard-options.txt
@@ -5,6 +5,8 @@
 # Keep all classes / methods / fields, but make the methods throw.
 --default-throw
 
+--delete-finals
+
 # Uncomment below lines to enable each feature.
 
 #--default-method-call-hook
diff --git a/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt b/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt
index 001943c..9c46a16 100644
--- a/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt
+++ b/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt
@@ -2,6 +2,8 @@
 
 --debug
 
+--delete-finals
+
 # Uncomment below lines to enable each feature.
 
 #--default-method-call-hook
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt
index cc704b2..9859475 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt
@@ -411,6 +411,8 @@
             stats = stats,
             enablePreTrace = options.enablePreTrace.get,
             enablePostTrace = options.enablePostTrace.get,
+            deleteClassFinals = options.deleteFinals.get,
+            deleteMethodFinals = options.deleteFinals.get,
         )
         outVisitor = BaseAdapter.getVisitor(
             classInternalName, classes, outVisitor, filter,
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt
index 55e853e..ae9276f 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt
@@ -106,6 +106,8 @@
 
         var cleanUpOnError: SetOnce<Boolean> = SetOnce(false),
 
+        var deleteFinals: SetOnce<Boolean> = SetOnce(false),
+
         var enableClassChecker: SetOnce<Boolean> = SetOnce(false),
         var enablePreTrace: SetOnce<Boolean> = SetOnce(false),
         var enablePostTrace: SetOnce<Boolean> = SetOnce(false),
@@ -218,6 +220,8 @@
                         "--gen-keep-all-file" ->
                             ret.inputJarAsKeepAllFile.set(nextArg())
 
+                        "--delete-finals" -> ret.deleteFinals.set(true)
+
                         // Following options are for debugging.
                         "--enable-class-checker" -> ret.enableClassChecker.set(true)
                         "--no-class-checker" -> ret.enableClassChecker.set(false)
@@ -293,6 +297,7 @@
               defaultMethodCallHook=$defaultMethodCallHook,
               policyOverrideFiles=${policyOverrideFiles.toTypedArray().contentToString()},
               defaultPolicy=$defaultPolicy,
+              deleteFinals=$deleteFinals,
               cleanUpOnError=$cleanUpOnError,
               enableClassChecker=$enableClassChecker,
               enablePreTrace=$enablePreTrace,
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt
index 261ef59c..a08d1d6 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt
@@ -50,7 +50,13 @@
         val errors: HostStubGenErrors,
         val stats: HostStubGenStats?,
         val enablePreTrace: Boolean,
-        val enablePostTrace: Boolean
+        val enablePostTrace: Boolean,
+        val deleteClassFinals: Boolean,
+        val deleteMethodFinals: Boolean,
+        // We don't remove finals from fields, because final fields have a stronger memory
+        // guarantee than non-final fields, see:
+        // https://docs.oracle.com/javase/specs/jls/se22/html/jls-17.html#jls-17.5
+        // i.e. changing a final field to non-final _could_ result in different behavior.
     )
 
     protected lateinit var currentPackageName: String
@@ -58,14 +64,33 @@
     protected var redirectionClass: String? = null
     protected lateinit var classPolicy: FilterPolicyWithReason
 
+    private fun isEnum(access: Int): Boolean {
+        return (access and Opcodes.ACC_ENUM) != 0
+    }
+
+    protected fun modifyClassAccess(access: Int): Int {
+        if (options.deleteClassFinals && !isEnum(access)) {
+            return access and Opcodes.ACC_FINAL.inv()
+        }
+        return access
+    }
+
+    protected fun modifyMethodAccess(access: Int): Int {
+        if (options.deleteMethodFinals) {
+            return access and Opcodes.ACC_FINAL.inv()
+        }
+        return access
+    }
+
     override fun visit(
         version: Int,
-        access: Int,
+        origAccess: Int,
         name: String,
         signature: String?,
         superName: String?,
         interfaces: Array<String>,
     ) {
+        val access = modifyClassAccess(origAccess)
         super.visit(version, access, name, signature, superName, interfaces)
         currentClassName = name
         currentPackageName = getPackageNameFromFullClassName(name)
@@ -130,13 +155,14 @@
         }
     }
 
-    override fun visitMethod(
-        access: Int,
+    final override fun visitMethod(
+        origAccess: Int,
         name: String,
         descriptor: String,
         signature: String?,
         exceptions: Array<String>?,
     ): MethodVisitor? {
+        val access = modifyMethodAccess(origAccess)
         if (skipMemberModificationNestCount > 0) {
             return super.visitMethod(access, name, descriptor, signature, exceptions)
         }
@@ -176,6 +202,7 @@
                 if (newAccess == NOT_COMPATIBLE) {
                     return null
                 }
+                newAccess = modifyMethodAccess(newAccess)
 
                 log.v(
                     "Emitting %s.%s%s as %s %s", currentClassName, name, descriptor,
diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt
index 567a69e..70e7d46 100644
--- a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt
+++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt
@@ -51,12 +51,13 @@
 
     override fun visit(
         version: Int,
-        access: Int,
+        origAccess: Int,
         name: String,
         signature: String?,
         superName: String?,
         interfaces: Array<String>
     ) {
+        val access = modifyClassAccess(origAccess)
         super.visit(version, access, name, signature, superName, interfaces)
 
         classLoadHooks = filter.getClassLoadHooks(currentClassName)
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt
index 5e5ca62..b009b09 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output.RELEASE_TARGET_JAVA_21/01-hoststubgen-test-tiny-framework-orig-dump.txt
@@ -7,6 +7,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestClassLoadHook
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
   public abstract java.lang.String value();
     descriptor: ()Ljava/lang/String;
     flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -30,6 +32,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestIgnore
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestIgnore.java"
 RuntimeVisibleAnnotations:
@@ -50,6 +54,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestKeep
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestKeep.java"
 RuntimeVisibleAnnotations:
@@ -70,6 +76,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestRedirect
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestRedirect.java"
 RuntimeVisibleAnnotations:
@@ -90,6 +98,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestRedirectionClass
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
   public abstract java.lang.String value();
     descriptor: ()Ljava/lang/String;
     flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -113,6 +123,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestRemove
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestRemove.java"
 RuntimeVisibleAnnotations:
@@ -133,6 +145,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestStaticInitializerKeep
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestStaticInitializerKeep.java"
 RuntimeVisibleAnnotations:
@@ -153,6 +167,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestSubstitute
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
   public abstract java.lang.String suffix();
     descriptor: ()Ljava/lang/String;
     flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -176,6 +192,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestThrow
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestThrow.java"
 RuntimeVisibleAnnotations:
@@ -196,6 +214,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestWholeClassKeep
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestWholeClassKeep.java"
 RuntimeVisibleAnnotations:
@@ -216,6 +236,8 @@
   this_class: #x                          // android/hosttest/annotation/tests/HostSideTestSuppress
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestSuppress.java"
 RuntimeVisibleAnnotations:
@@ -232,6 +254,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -273,6 +297,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -314,6 +340,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/IPretendingAidl
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 3
+Constant pool:
+{
 }
 SourceFile: "IPretendingAidl.java"
 NestMembers:
@@ -331,6 +359,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/R$Nested
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
   public static int[] ARRAY;
     descriptor: [I
     flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -376,6 +406,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/R
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.R();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -396,13 +428,15 @@
   public static #x= #x of #x;           // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R
 ## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class
   Compiled from "TinyFrameworkAnnotations.java"
-public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
+public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
   minor version: 0
   major version: 65
-  flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+  flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 9, attributes: 2
+Constant pool:
+{
   public int keep;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -433,9 +467,9 @@
       x: #x()
         android.hosttest.annotation.HostSideTestKeep
 
-  public int addOne(int);
+  public final int addOne(int);
     descriptor: (I)I
-    flags: (0x0001) ACC_PUBLIC
+    flags: (0x0011) ACC_PUBLIC, ACC_FINAL
     Code:
       stack=2, locals=2, args_size=2
          x: iload_1
@@ -505,18 +539,18 @@
             0       4     0  this   Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations;
             0       4     1 value   I
 
-  public static native int nativeAddThree(int);
+  public static final native int nativeAddThree(int);
     descriptor: (I)I
-    flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
+    flags: (0x0119) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_NATIVE
     RuntimeInvisibleAnnotations:
       x: #x(#x=s#x)
         android.hosttest.annotation.HostSideTestSubstitute(
           suffix="_host"
         )
 
-  private static int nativeAddThree_host(int);
+  private static final int nativeAddThree_host(int);
     descriptor: (I)I
-    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
+    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
     Code:
       stack=2, locals=1, args_size=1
          x: iload_0
@@ -578,6 +612,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 3, attributes: 2
+Constant pool:
+{
   public static final java.util.Set<java.lang.Class<?>> sLoadedClasses;
     descriptor: Ljava/util/Set;
     flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
@@ -640,6 +676,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 6, attributes: 2
+Constant pool:
+{
   public int keep;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -764,6 +802,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 2, attributes: 2
+Constant pool:
+{
   public static boolean sInitialized;
     descriptor: Z
     flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -818,6 +858,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 2, attributes: 2
+Constant pool:
+{
   public static boolean sInitialized;
     descriptor: Z
     flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -878,6 +920,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
   super_class: #x                        // java/lang/Enum
   interfaces: 0, fields: 6, methods: 7, attributes: 3
+Constant pool:
+{
   public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED;
     descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
     flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1081,6 +1125,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
   super_class: #x                        // java/lang/Enum
   interfaces: 0, fields: 3, methods: 5, attributes: 3
+Constant pool:
+{
   public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT;
     descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
     flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1202,6 +1248,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -1256,6 +1304,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 17, attributes: 1
+Constant pool:
+{
   public int stub;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -1507,6 +1557,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 8, attributes: 5
+Constant pool:
+{
   public final java.util.function.Supplier<java.lang.Integer> mSupplier;
     descriptor: Ljava/util/function/Supplier;
     flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1661,6 +1713,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 8, attributes: 5
+Constant pool:
+{
   public final java.util.function.Supplier<java.lang.Integer> mSupplier;
     descriptor: Ljava/util/function/Supplier;
     flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1816,6 +1870,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 3, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -1873,6 +1929,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 5, attributes: 5
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -1984,6 +2042,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 14, attributes: 2
+Constant pool:
+{
   int value;
     descriptor: I
     flags: (0x0000)
@@ -2157,6 +2217,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 7, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -2263,6 +2325,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses);
     descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V
     flags: (0x0000)
@@ -2321,6 +2385,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2();
     descriptor: ()V
     flags: (0x0000)
@@ -2375,6 +2441,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses);
     descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V
     flags: (0x0000)
@@ -2433,6 +2501,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4();
     descriptor: ()V
     flags: (0x0000)
@@ -2487,6 +2557,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 1, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2521,6 +2593,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 1, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2558,6 +2632,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1();
     descriptor: ()V
     flags: (0x0000)
@@ -2613,6 +2689,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 1, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2647,6 +2725,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2694,6 +2774,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
   interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int);
     descriptor: (I)V
     flags: (0x0001) ACC_PUBLIC
@@ -2723,6 +2805,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 4, attributes: 4
+Constant pool:
+{
   public final java.util.function.Supplier<java.lang.Integer> mSupplier;
     descriptor: Ljava/util/function/Supplier;
     flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -2827,6 +2911,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -2869,6 +2955,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -2911,6 +2999,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 2
+Constant pool:
+{
   private final int mValue;
     descriptor: I
     flags: (0x0012) ACC_PRIVATE, ACC_FINAL
@@ -2958,6 +3048,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/A
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.A();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -2981,6 +3073,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/B
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.B();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3004,6 +3098,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/sub/A
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.sub.A();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3027,6 +3123,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/sub/B
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.sub.B();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3050,6 +3148,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/C1
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.C1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3073,6 +3173,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/C2
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C1
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.C2();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3096,6 +3198,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/C3
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C2
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.C3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3119,6 +3223,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/CA
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.CA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3142,6 +3248,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/CB
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.CB();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3165,6 +3273,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C1
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3188,6 +3298,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C2
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3211,6 +3323,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C3
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3234,6 +3348,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/CA
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3257,6 +3373,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/CB
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3280,6 +3398,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/CB
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3303,6 +3423,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3326,6 +3448,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3349,6 +3473,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3372,6 +3498,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3395,6 +3523,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3418,6 +3548,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3441,6 +3573,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3464,6 +3598,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3487,6 +3623,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3510,6 +3648,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3533,6 +3673,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_None
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_None();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3556,6 +3698,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/I1
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "I1.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class
@@ -3567,6 +3711,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/I2
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "I2.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class
@@ -3578,6 +3724,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/I3
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "I3.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class
@@ -3589,6 +3737,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/IA
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "IA.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class
@@ -3600,6 +3750,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/IB
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "IB.java"
 ## Class: com/supported/UnsupportedClass.class
@@ -3611,6 +3763,8 @@
   this_class: #x                          // com/supported/UnsupportedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 2
+Constant pool:
+{
   private final int mValue;
     descriptor: I
     flags: (0x0012) ACC_PRIVATE, ACC_FINAL
@@ -3658,6 +3812,8 @@
   this_class: #x                         // com/unsupported/UnsupportedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.unsupported.UnsupportedClass(int);
     descriptor: (I)V
     flags: (0x0001) ACC_PUBLIC
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt
index 103e152..ad41342 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt
@@ -7,6 +7,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestClassLoadHook
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
   public abstract java.lang.String value();
     descriptor: ()Ljava/lang/String;
     flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -30,6 +32,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestIgnore
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestIgnore.java"
 RuntimeVisibleAnnotations:
@@ -50,6 +54,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestKeep
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestKeep.java"
 RuntimeVisibleAnnotations:
@@ -70,6 +76,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestRedirect
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestRedirect.java"
 RuntimeVisibleAnnotations:
@@ -90,6 +98,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestRedirectionClass
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
   public abstract java.lang.String value();
     descriptor: ()Ljava/lang/String;
     flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -113,6 +123,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestRemove
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestRemove.java"
 RuntimeVisibleAnnotations:
@@ -133,6 +145,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestStaticInitializerKeep
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestStaticInitializerKeep.java"
 RuntimeVisibleAnnotations:
@@ -153,6 +167,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestSubstitute
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 2
+Constant pool:
+{
   public abstract java.lang.String suffix();
     descriptor: ()Ljava/lang/String;
     flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
@@ -176,6 +192,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestThrow
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestThrow.java"
 RuntimeVisibleAnnotations:
@@ -196,6 +214,8 @@
   this_class: #x                          // android/hosttest/annotation/HostSideTestWholeClassKeep
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestWholeClassKeep.java"
 RuntimeVisibleAnnotations:
@@ -216,6 +236,8 @@
   this_class: #x                          // android/hosttest/annotation/tests/HostSideTestSuppress
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 2
+Constant pool:
+{
 }
 SourceFile: "HostSideTestSuppress.java"
 RuntimeVisibleAnnotations:
@@ -232,6 +254,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -273,6 +297,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -314,6 +340,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/IPretendingAidl
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 3
+Constant pool:
+{
 }
 SourceFile: "IPretendingAidl.java"
 NestMembers:
@@ -331,6 +359,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/R$Nested
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
   public static int[] ARRAY;
     descriptor: [I
     flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -376,6 +406,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/R
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.R();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -396,13 +428,15 @@
   public static #x= #x of #x;           // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R
 ## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class
   Compiled from "TinyFrameworkAnnotations.java"
-public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
+public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations
   minor version: 0
   major version: 61
-  flags: (0x0021) ACC_PUBLIC, ACC_SUPER
+  flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 9, attributes: 2
+Constant pool:
+{
   public int keep;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -433,9 +467,9 @@
       x: #x()
         android.hosttest.annotation.HostSideTestKeep
 
-  public int addOne(int);
+  public final int addOne(int);
     descriptor: (I)I
-    flags: (0x0001) ACC_PUBLIC
+    flags: (0x0011) ACC_PUBLIC, ACC_FINAL
     Code:
       stack=2, locals=2, args_size=2
          x: iload_1
@@ -505,18 +539,18 @@
             0       4     0  this   Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations;
             0       4     1 value   I
 
-  public static native int nativeAddThree(int);
+  public static final native int nativeAddThree(int);
     descriptor: (I)I
-    flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
+    flags: (0x0119) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_NATIVE
     RuntimeInvisibleAnnotations:
       x: #x(#x=s#x)
         android.hosttest.annotation.HostSideTestSubstitute(
           suffix="_host"
         )
 
-  private static int nativeAddThree_host(int);
+  private static final int nativeAddThree_host(int);
     descriptor: (I)I
-    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
+    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
     Code:
       stack=2, locals=1, args_size=1
          x: iload_0
@@ -578,6 +612,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 3, attributes: 2
+Constant pool:
+{
   public static final java.util.Set<java.lang.Class<?>> sLoadedClasses;
     descriptor: Ljava/util/Set;
     flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
@@ -640,6 +676,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 6, attributes: 2
+Constant pool:
+{
   public int keep;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -764,6 +802,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 2, attributes: 2
+Constant pool:
+{
   public static boolean sInitialized;
     descriptor: Z
     flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -818,6 +858,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 2, attributes: 2
+Constant pool:
+{
   public static boolean sInitialized;
     descriptor: Z
     flags: (0x0009) ACC_PUBLIC, ACC_STATIC
@@ -878,6 +920,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
   super_class: #x                        // java/lang/Enum
   interfaces: 0, fields: 6, methods: 7, attributes: 3
+Constant pool:
+{
   public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED;
     descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
     flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1081,6 +1125,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
   super_class: #x                        // java/lang/Enum
   interfaces: 0, fields: 3, methods: 5, attributes: 3
+Constant pool:
+{
   public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT;
     descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
     flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
@@ -1202,6 +1248,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -1256,6 +1304,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 17, attributes: 1
+Constant pool:
+{
   public int stub;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -1507,6 +1557,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 8, attributes: 5
+Constant pool:
+{
   public final java.util.function.Supplier<java.lang.Integer> mSupplier;
     descriptor: Ljava/util/function/Supplier;
     flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1661,6 +1713,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 8, attributes: 5
+Constant pool:
+{
   public final java.util.function.Supplier<java.lang.Integer> mSupplier;
     descriptor: Ljava/util/function/Supplier;
     flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -1816,6 +1870,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 3, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -1873,6 +1929,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 5, attributes: 5
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -1984,6 +2042,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 14, attributes: 2
+Constant pool:
+{
   int value;
     descriptor: I
     flags: (0x0000)
@@ -2157,6 +2217,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 7, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -2263,6 +2325,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 1, methods: 3, attributes: 5
+Constant pool:
+{
   final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0;
     descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;
     flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
@@ -2328,6 +2392,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2();
     descriptor: ()V
     flags: (0x0000)
@@ -2382,6 +2448,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 1, methods: 3, attributes: 5
+Constant pool:
+{
   final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0;
     descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;
     flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
@@ -2447,6 +2515,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4();
     descriptor: ()V
     flags: (0x0000)
@@ -2501,6 +2571,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 1, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2535,6 +2607,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 1, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2579,6 +2653,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 3, attributes: 5
+Constant pool:
+{
   com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1();
     descriptor: ()V
     flags: (0x0000)
@@ -2634,6 +2710,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 1, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2668,6 +2746,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 3
+Constant pool:
+{
   public int value;
     descriptor: I
     flags: (0x0001) ACC_PUBLIC
@@ -2715,6 +2795,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass
   interfaces: 0, fields: 0, methods: 1, attributes: 3
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int);
     descriptor: (I)V
     flags: (0x0001) ACC_PUBLIC
@@ -2744,6 +2826,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 2, methods: 4, attributes: 4
+Constant pool:
+{
   public final java.util.function.Supplier<java.lang.Integer> mSupplier;
     descriptor: Ljava/util/function/Supplier;
     flags: (0x0011) ACC_PUBLIC, ACC_FINAL
@@ -2848,6 +2932,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -2890,6 +2976,8 @@
   this_class: #x                         // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -2932,6 +3020,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 2
+Constant pool:
+{
   private final int mValue;
     descriptor: I
     flags: (0x0012) ACC_PRIVATE, ACC_FINAL
@@ -2979,6 +3069,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/A
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.A();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3002,6 +3094,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/B
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.B();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3025,6 +3119,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/sub/A
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.sub.A();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3048,6 +3144,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/packagetest/sub/B
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.packagetest.sub.B();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3071,6 +3169,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/C1
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.C1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3094,6 +3194,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/C2
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C1
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.C2();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3117,6 +3219,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/C3
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C2
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.C3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3140,6 +3244,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/CA
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.CA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3163,6 +3269,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/CB
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.CB();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3186,6 +3294,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C1
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3209,6 +3319,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C2
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3232,6 +3344,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/C3
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3255,6 +3369,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/CA
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3278,6 +3394,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/CB
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3301,6 +3419,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA
   super_class: #x                         // com/android/hoststubgen/test/tinyframework/subclasstest/CB
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3324,6 +3444,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3347,6 +3469,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3370,6 +3494,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3393,6 +3519,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3416,6 +3544,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3439,6 +3569,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3462,6 +3594,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I1();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3485,6 +3619,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I3();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3508,6 +3644,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3531,6 +3669,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA
   super_class: #x                         // java/lang/Object
   interfaces: 2, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB_IA();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3554,6 +3694,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/Class_None
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 1, attributes: 1
+Constant pool:
+{
   public com.android.hoststubgen.test.tinyframework.subclasstest.Class_None();
     descriptor: ()V
     flags: (0x0001) ACC_PUBLIC
@@ -3577,6 +3719,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/I1
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "I1.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class
@@ -3588,6 +3732,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/I2
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "I2.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class
@@ -3599,6 +3745,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/I3
   super_class: #x                         // java/lang/Object
   interfaces: 1, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "I3.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class
@@ -3610,6 +3758,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/IA
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "IA.java"
 ## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class
@@ -3621,6 +3771,8 @@
   this_class: #x                          // com/android/hoststubgen/test/tinyframework/subclasstest/IB
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 0, attributes: 1
+Constant pool:
+{
 }
 SourceFile: "IB.java"
 ## Class: com/supported/UnsupportedClass.class
@@ -3632,6 +3784,8 @@
   this_class: #x                          // com/supported/UnsupportedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 1, methods: 2, attributes: 2
+Constant pool:
+{
   private final int mValue;
     descriptor: I
     flags: (0x0012) ACC_PRIVATE, ACC_FINAL
@@ -3679,6 +3833,8 @@
   this_class: #x                         // com/unsupported/UnsupportedClass
   super_class: #x                         // java/lang/Object
   interfaces: 0, fields: 0, methods: 2, attributes: 2
+Constant pool:
+{
   public com.unsupported.UnsupportedClass(int);
     descriptor: (I)V
     flags: (0x0001) ACC_PUBLIC
diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java
index 3415deb..674937d 100644
--- a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java
+++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java
@@ -28,7 +28,7 @@
 @HostSideTestKeep
 @HostSideTestClassLoadHook(
         "com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded")
-public class TinyFrameworkAnnotations {
+public final class TinyFrameworkAnnotations {
     @HostSideTestKeep
     public TinyFrameworkAnnotations() {
     }
@@ -42,7 +42,7 @@
     public int remove;
 
     @HostSideTestKeep
-    public int addOne(int value) {
+    public final int addOne(int value) {
         return value + 1;
     }
 
@@ -61,10 +61,10 @@
     }
 
     @HostSideTestSubstitute(suffix = "_host")
-    public static native int nativeAddThree(int value);
+    public final static native int nativeAddThree(int value);
 
     // This method is private, but at runtime, it'll inherit the visibility of the original method
-    private static int nativeAddThree_host(int value) {
+    private final static int nativeAddThree_host(int value) {
         return value + 3;
     }
 
diff --git a/ravenwood/tools/ravenizer/Android.bp b/ravenwood/tools/ravenizer/Android.bp
index 2892d07..a52a04b 100644
--- a/ravenwood/tools/ravenizer/Android.bp
+++ b/ravenwood/tools/ravenizer/Android.bp
@@ -19,7 +19,7 @@
         "ow2-asm-tree",
         "ow2-asm-util",
         "junit",
-        "ravenwood-junit-impl-for-ravenizer",
+        "ravenwood-junit-for-ravenizer",
     ],
     visibility: ["//visibility:public"],
 }
diff --git a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java
index f2c42f7..97ed214b 100644
--- a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java
+++ b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceManagerService.java
@@ -838,13 +838,12 @@
 
         @Override
         public void onAuthenticationPrompt(int uid) {
-            synchronized (mVirtualDeviceManagerLock) {
-                for (int i = 0; i < mVirtualDevices.size(); i++) {
-                    VirtualDeviceImpl device = mVirtualDevices.valueAt(i);
-                    device.showToastWhereUidIsRunning(uid,
-                            R.string.app_streaming_blocked_message_for_fingerprint_dialog,
-                            Toast.LENGTH_LONG, Looper.getMainLooper());
-                }
+            ArrayList<VirtualDeviceImpl> virtualDevicesSnapshot = getVirtualDevicesSnapshot();
+            for (int i = 0; i < virtualDevicesSnapshot.size(); i++) {
+                VirtualDeviceImpl device = virtualDevicesSnapshot.get(i);
+                device.showToastWhereUidIsRunning(uid,
+                        R.string.app_streaming_blocked_message_for_fingerprint_dialog,
+                        Toast.LENGTH_LONG, Looper.getMainLooper());
             }
         }
 
diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
index 8d8064f..ccc0a256 100644
--- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
+++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
@@ -113,6 +113,7 @@
         DeviceConfig.NAMESPACE_LMKD_NATIVE,
         DeviceConfig.NAMESPACE_MEDIA_NATIVE,
         DeviceConfig.NAMESPACE_MGLRU_NATIVE,
+        DeviceConfig.NAMESPACE_MMD_NATIVE,
         DeviceConfig.NAMESPACE_NETD_NATIVE,
         DeviceConfig.NAMESPACE_NNAPI_NATIVE,
         DeviceConfig.NAMESPACE_PROFCOLLECT_NATIVE_BOOT,
diff --git a/services/core/java/com/android/server/am/UidObserverController.java b/services/core/java/com/android/server/am/UidObserverController.java
index 7eeec32..f13bfac 100644
--- a/services/core/java/com/android/server/am/UidObserverController.java
+++ b/services/core/java/com/android/server/am/UidObserverController.java
@@ -77,6 +77,7 @@
      * This is for verifying the UID report flow.
      */
     private static final boolean VALIDATE_UID_STATES = true;
+    @GuardedBy("mLock")
     private final ActiveUids mValidateUids;
 
     UidObserverController(@NonNull Handler handler) {
@@ -282,31 +283,30 @@
         }
         mUidObservers.finishBroadcast();
 
-        if (VALIDATE_UID_STATES && mUidObservers.getRegisteredCallbackCount() > 0) {
-            for (int j = 0; j < numUidChanges; ++j) {
-                final ChangeRecord item = mActiveUidChanges[j];
-                if ((item.change & UidRecord.CHANGE_GONE) != 0) {
-                    mValidateUids.remove(item.uid);
-                } else {
-                    UidRecord validateUid = mValidateUids.get(item.uid);
-                    if (validateUid == null) {
-                        validateUid = new UidRecord(item.uid, null);
-                        mValidateUids.put(item.uid, validateUid);
+        synchronized (mLock) {
+            if (VALIDATE_UID_STATES && mUidObservers.getRegisteredCallbackCount() > 0) {
+                for (int j = 0; j < numUidChanges; ++j) {
+                    final ChangeRecord item = mActiveUidChanges[j];
+                    if ((item.change & UidRecord.CHANGE_GONE) != 0) {
+                        mValidateUids.remove(item.uid);
+                    } else {
+                        UidRecord validateUid = mValidateUids.get(item.uid);
+                        if (validateUid == null) {
+                            validateUid = new UidRecord(item.uid, null);
+                            mValidateUids.put(item.uid, validateUid);
+                        }
+                        if ((item.change & UidRecord.CHANGE_IDLE) != 0) {
+                            validateUid.setIdle(true);
+                        } else if ((item.change & UidRecord.CHANGE_ACTIVE) != 0) {
+                            validateUid.setIdle(false);
+                        }
+                        validateUid.setSetProcState(item.procState);
+                        validateUid.setCurProcState(item.procState);
+                        validateUid.setSetCapability(item.capability);
+                        validateUid.setCurCapability(item.capability);
                     }
-                    if ((item.change & UidRecord.CHANGE_IDLE) != 0) {
-                        validateUid.setIdle(true);
-                    } else if ((item.change & UidRecord.CHANGE_ACTIVE) != 0) {
-                        validateUid.setIdle(false);
-                    }
-                    validateUid.setSetProcState(item.procState);
-                    validateUid.setCurProcState(item.procState);
-                    validateUid.setSetCapability(item.capability);
-                    validateUid.setCurCapability(item.capability);
                 }
             }
-        }
-
-        synchronized (mLock) {
             for (int j = 0; j < numUidChanges; j++) {
                 final ChangeRecord changeRecord = mActiveUidChanges[j];
                 changeRecord.isPending = false;
@@ -433,7 +433,9 @@
     }
 
     UidRecord getValidateUidRecord(int uid) {
-        return mValidateUids.get(uid);
+        synchronized (mLock) {
+            return mValidateUids.get(uid);
+        }
     }
 
     void dump(@NonNull PrintWriter pw, @Nullable String dumpPackage) {
@@ -488,12 +490,16 @@
 
     boolean dumpValidateUids(@NonNull PrintWriter pw, @Nullable String dumpPackage, int dumpAppId,
             @NonNull String header, boolean needSep) {
-        return mValidateUids.dump(pw, dumpPackage, dumpAppId, header, needSep);
+        synchronized (mLock) {
+            return mValidateUids.dump(pw, dumpPackage, dumpAppId, header, needSep);
+        }
     }
 
     void dumpValidateUidsProto(@NonNull ProtoOutputStream proto, @Nullable String dumpPackage,
             int dumpAppId, long fieldId) {
-        mValidateUids.dumpProto(proto, dumpPackage, dumpAppId, fieldId);
+        synchronized (mLock) {
+            mValidateUids.dumpProto(proto, dumpPackage, dumpAppId, fieldId);
+        }
     }
 
     static final class ChangeRecord {
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 5b9bab7..b09a192 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -12506,10 +12506,10 @@
                 int uid = intent.getIntExtra(Intent.EXTRA_UID, Process.INVALID_UID);
                 if (intent.getBooleanExtra(EXTRA_REPLACING, false) ||
                         intent.getBooleanExtra(EXTRA_ARCHIVAL, false)) return;
-                if (action.equals(ACTION_PACKAGE_ADDED)) {
+                if (ACTION_PACKAGE_ADDED.equals(action)) {
                     audioserverExecutor.execute(() ->
                             provider.onModifyPackageState(uid, pkgName, false /* isRemoved */));
-                } else if (action.equals(ACTION_PACKAGE_REMOVED)) {
+                } else if (ACTION_PACKAGE_REMOVED.equals(action)) {
                     audioserverExecutor.execute(() ->
                             provider.onModifyPackageState(uid, pkgName, true /* isRemoved */));
                 }
diff --git a/services/core/java/com/android/server/power/OWNERS b/services/core/java/com/android/server/power/OWNERS
index c1fad33..a1531a8 100644
--- a/services/core/java/com/android/server/power/OWNERS
+++ b/services/core/java/com/android/server/power/OWNERS
@@ -2,6 +2,8 @@
 santoscordon@google.com
 petsjonkin@google.com
 brup@google.com
+flc@google.com
+wilczynskip@google.com
 
 per-file ThermalManagerService.java=file:/THERMAL_OWNERS
 per-file LowPowerStandbyController.java=qingxun@google.com
diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
index b35a0a7..4b55f27 100644
--- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
+++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
@@ -4853,7 +4853,7 @@
             Slog.e(TAG, "Disconnected from keystore service. Cannot pull.", e);
             return StatsManager.PULL_SKIP;
         } catch (ServiceSpecificException e) {
-            Slog.e(TAG, "pulling keystore metrics failed", e);
+            Slog.e(TAG, "Pulling keystore atom with tag " + atomTag + " failed", e);
             return StatsManager.PULL_SKIP;
         } finally {
             Binder.restoreCallingIdentity(callingToken);
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index 908f51b..ccac969 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -1511,10 +1511,13 @@
             getUiState(displayId).setImeWindowState(vis, backDisposition, showImeSwitcher);
 
             mHandler.post(() -> {
-                if (mBar == null) return;
-                try {
-                    mBar.setImeWindowStatus(displayId, vis, backDisposition, showImeSwitcher);
-                } catch (RemoteException ex) { }
+                IStatusBar bar = mBar;
+                if (bar != null) {
+                    try {
+                        bar.setImeWindowStatus(displayId, vis, backDisposition, showImeSwitcher);
+                    } catch (RemoteException ex) {
+                    }
+                }
             });
         }
     }
diff --git a/services/usb/OWNERS b/services/usb/OWNERS
index 2dff392..2592612 100644
--- a/services/usb/OWNERS
+++ b/services/usb/OWNERS
@@ -1,9 +1,9 @@
-anothermark@google.com
+vmartensson@google.com
+nkapron@google.com
 febinthattil@google.com
-aprasath@google.com
+shubhankarm@google.com
 badhri@google.com
 elaurent@google.com
 albertccwang@google.com
 jameswei@google.com
 howardyen@google.com
-kumarashishg@google.com
\ No newline at end of file
diff --git a/tools/lint/framework/checks/src/main/java/com/google/android/lint/AndroidFrameworkIssueRegistry.kt b/tools/lint/framework/checks/src/main/java/com/google/android/lint/AndroidFrameworkIssueRegistry.kt
index af753e5..b62843c 100644
--- a/tools/lint/framework/checks/src/main/java/com/google/android/lint/AndroidFrameworkIssueRegistry.kt
+++ b/tools/lint/framework/checks/src/main/java/com/google/android/lint/AndroidFrameworkIssueRegistry.kt
@@ -19,6 +19,7 @@
 import com.android.tools.lint.client.api.IssueRegistry
 import com.android.tools.lint.client.api.Vendor
 import com.android.tools.lint.detector.api.CURRENT_API
+import com.google.android.lint.multiuser.PendingIntentGetActivityDetector
 import com.google.android.lint.parcel.SaferParcelChecker
 import com.google.auto.service.AutoService
 
@@ -40,6 +41,7 @@
         PermissionMethodDetector.ISSUE_PERMISSION_METHOD_USAGE,
         PermissionMethodDetector.ISSUE_CAN_BE_PERMISSION_METHOD,
         FeatureAutomotiveDetector.ISSUE,
+        PendingIntentGetActivityDetector.ISSUE_PENDING_INTENT_GET_ACTIVITY,
     )
 
     override val api: Int
diff --git a/tools/lint/framework/checks/src/main/java/com/google/android/lint/multiuser/PendingIntentGetActivityDetector.kt b/tools/lint/framework/checks/src/main/java/com/google/android/lint/multiuser/PendingIntentGetActivityDetector.kt
new file mode 100644
index 0000000..b9f22eb
--- /dev/null
+++ b/tools/lint/framework/checks/src/main/java/com/google/android/lint/multiuser/PendingIntentGetActivityDetector.kt
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2025 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.android.lint.multiuser
+
+import com.android.tools.lint.detector.api.Category
+import com.android.tools.lint.detector.api.Detector
+import com.android.tools.lint.detector.api.Implementation
+import com.android.tools.lint.detector.api.Issue
+import com.android.tools.lint.detector.api.JavaContext
+import com.android.tools.lint.detector.api.Scope
+import com.android.tools.lint.detector.api.Severity
+import com.android.tools.lint.detector.api.SourceCodeScanner
+import com.intellij.psi.PsiMethod
+import java.util.EnumSet
+import org.jetbrains.uast.UCallExpression
+
+/**
+ * Detector for flagging potential multiuser issues in `PendingIntent.getActivity()` calls.
+ *
+ * This detector checks for calls to `PendingIntent#getActivity()` and
+ * reports a warning if such a call is found, suggesting that the
+ * default user 0 context might not be the right one.
+ */
+class PendingIntentGetActivityDetector : Detector(), SourceCodeScanner {
+
+  companion object {
+
+    val description = """Flags potential multiuser issue in PendingIntent.getActivity() calls."""
+
+    val EXPLANATION =
+      """
+      **Problem:**
+
+      Calling `PendingIntent.getActivity()` in the `system_server` often accidentally uses the user 0 context.  Moreover, since there's no explicit user parameter in the `getActivity` method, it can be hard to tell which user the `PendingIntent` activity is associated with, making the code error-prone and less readable.
+
+      **Solution:**
+
+      Always use the user aware methods to refer the correct user context. You can achieve this by:
+
+      * **Using `PendingIntent.getActivityAsUser(...)`:** This API allows you to explicitly specify the user for the activity.
+
+         ```java
+         PendingIntent.getActivityAsUser(
+             mContext, /*requestCode=*/0, intent,
+             PendingIntent.FLAG_IMMUTABLE, /*options=*/null,
+             UserHandle.of(mUserId));
+         ```
+
+      **When to Ignore this Warning:**
+
+      You can safely ignore this warning if you are certain that:
+
+      * You've confirmed that the `PendingIntent` activity you're targeting is the correct one and is **rightly** associated with the context parameter passed into the `PendingIntent.getActivity` method.
+
+      **Note:** If you are unsure about the user context, it's best to err on the side of caution and explicitly specify the user using the method specified above.
+
+      **For any further questions, please reach out to go/multiuser-help.**
+      """.trimIndent()
+
+    val ISSUE_PENDING_INTENT_GET_ACTIVITY: Issue =
+      Issue.create(
+        id = "PendingIntent#getActivity",
+        briefDescription = description,
+        explanation = EXPLANATION,
+        category = Category.SECURITY,
+        priority = 8,
+        severity = Severity.WARNING,
+        implementation =
+          Implementation(
+            PendingIntentGetActivityDetector::class.java,
+            EnumSet.of(Scope.JAVA_FILE, Scope.TEST_SOURCES),
+          ),
+      )
+  }
+
+  override fun getApplicableMethodNames() = listOf("getActivity")
+
+  override fun visitMethodCall(context: JavaContext, node: UCallExpression, method: PsiMethod) {
+    // Check if the method call is PendingIntent.getActivity
+    if (
+      context.evaluator.isMemberInClass(method, "android.app.PendingIntent") &&
+        method.name == "getActivity"
+    ) {
+        context.report(
+          ISSUE_PENDING_INTENT_GET_ACTIVITY,
+          node,
+          context.getLocation(node),
+          "Using `PendingIntent.getActivity(...)` might not be multiuser-aware. " +
+            "Consider using the user aware method `PendingIntent.getActivityAsUser(...)`.",
+        )
+    }
+  }
+}
diff --git a/tools/lint/framework/checks/src/test/java/com/google/android/lint/multiuser/PendingIntentGetActivityDetectorTest.kt b/tools/lint/framework/checks/src/test/java/com/google/android/lint/multiuser/PendingIntentGetActivityDetectorTest.kt
new file mode 100644
index 0000000..4010550
--- /dev/null
+++ b/tools/lint/framework/checks/src/test/java/com/google/android/lint/multiuser/PendingIntentGetActivityDetectorTest.kt
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2025 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.android.lint.multiuser
+
+import com.android.tools.lint.checks.infrastructure.LintDetectorTest
+import com.android.tools.lint.checks.infrastructure.TestFile
+import com.android.tools.lint.checks.infrastructure.TestLintTask
+import com.android.tools.lint.detector.api.Detector
+import com.android.tools.lint.detector.api.Issue
+
+@Suppress("UnstableApiUsage")
+class PendingIntentGetActivityDetectorTest : LintDetectorTest() {
+
+  override fun getDetector(): Detector = PendingIntentGetActivityDetector()
+
+  override fun getIssues(): List<Issue> =
+    listOf(PendingIntentGetActivityDetector.ISSUE_PENDING_INTENT_GET_ACTIVITY)
+
+  override fun lint(): TestLintTask = super.lint().allowMissingSdk(true)
+
+  fun testPendingIntentGetActivity() {
+    lint()
+      .files(
+        java(
+            """
+                package test.pkg;
+
+                import android.app.PendingIntent;
+                import android.content.Context;
+                import android.content.Intent;
+
+                public class TestClass {
+                    private Context mContext;
+
+                    public void testMethod(Intent intent) {
+                        PendingIntent.getActivity(
+                            mContext, /*requestCode=*/0, intent,
+                            PendingIntent.FLAG_IMMUTABLE, /*options=*/null
+                        );
+                    }
+                }
+                """
+          )
+          .indented(),
+        *stubs,
+      )
+      .issues(PendingIntentGetActivityDetector.ISSUE_PENDING_INTENT_GET_ACTIVITY)
+      .run()
+      .expect(
+        """
+        src/test/pkg/TestClass.java:11: Warning: Using PendingIntent.getActivity(...) might not be multiuser-aware. Consider using the user aware method PendingIntent.getActivityAsUser(...). [PendingIntent#getActivity]
+                PendingIntent.getActivity(
+                ^
+        0 errors, 1 warnings
+        """
+      )
+  }
+
+  fun testPendingIntentGetActivityAsUser() {
+    lint()
+      .files(
+        java(
+            """
+                package test.pkg;
+
+                import android.app.PendingIntent;
+                import android.content.Context;
+                import android.content.Intent;
+                import android.os.UserHandle;
+
+                public class TestClass {
+                    private Context mContext;
+
+                    public void testMethod(Intent intent) {
+                        PendingIntent.getActivityAsUser(
+                            mContext, /*requestCode=*/0, intent,
+                            0, /*options=*/null,
+                            UserHandle.CURRENT
+                        );
+                    }
+                }
+                """
+          )
+          .indented(),
+        *stubs,
+      )
+      .issues(PendingIntentGetActivityDetector.ISSUE_PENDING_INTENT_GET_ACTIVITY)
+      .run()
+      .expectClean()
+  }
+
+  private val pendingIntentStub: TestFile =
+    java(
+      """
+        package android.app;
+
+        import android.content.Context;
+        import android.content.Intent;
+        import android.os.UserHandle;
+
+        public class PendingIntent {
+            public static boolean getActivity(Context context, int requestCode, Intent intent, int flags) {
+                return true;
+            }
+
+            public static boolean getActivityAsUser(
+                Context context,
+                int requestCode,
+                Intent intent,
+                int flags,
+                UserHandle userHandle
+            ) {
+                return true;
+            }
+        }
+        """
+    )
+
+  private val contxtStub: TestFile =
+    java(
+      """
+        package android.content;
+
+        import android.os.UserHandle;
+
+        public class Context {
+
+           public Context createContextAsUser(UserHandle userHandle, int flags) {
+                return this;
+            }
+        }
+
+        """
+    )
+
+  private val userHandleStub: TestFile =
+    java(
+      """
+        package android.os;
+
+        public class UserHandle {
+
+        }
+
+        """
+    )
+
+ private val intentStub: TestFile =
+    java(
+        """
+                package android.content;
+
+                public class Intent {
+
+                }
+                """
+    )
+
+  private val stubs = arrayOf(pendingIntentStub, contxtStub, userHandleStub, intentStub)
+}