Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c6c0dd7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix Unsafe Parcel Usage" into main

parents 69e5fd0a 7ff46001
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.Parcelable;
import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
@@ -1302,11 +1301,11 @@ public final class AccessibilityInteractionController {

    private boolean handleClickableSpanActionUiThread(
            View view, int virtualDescendantId, Bundle arguments) {
        Parcelable span = arguments.getParcelable(ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN);
        if (!(span instanceof AccessibilityClickableSpan)) {
        AccessibilityClickableSpan span = arguments.getParcelable(
                ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN, AccessibilityClickableSpan.class);
        if (span == null) {
            return false;
        }

        // Find the original ClickableSpan if it's still on the screen
        AccessibilityNodeInfo infoWithSpan = null;
        AccessibilityNodeProvider provider = view.getAccessibilityNodeProvider();
@@ -1320,7 +1319,7 @@ public final class AccessibilityInteractionController {
        }

        // Click on the corresponding span
        ClickableSpan clickableSpan = ((AccessibilityClickableSpan) span).findClickableSpan(
        ClickableSpan clickableSpan = span.findClickableSpan(
                infoWithSpan.getOriginalText());
        if (clickableSpan != null) {
            clickableSpan.onClick(view);
+4 −2
Original line number Diff line number Diff line
@@ -288,8 +288,10 @@ public final class TranslationResponse implements Parcelable {
        byte flg = in.readByte();
        boolean finalResponse = (flg & 0x8) != 0;
        int translationStatus = in.readInt();
        SparseArray<TranslationResponseValue> translationResponseValues = (SparseArray) in.readSparseArray(TranslationResponseValue.class.getClassLoader());
        SparseArray<ViewTranslationResponse> viewTranslationResponses = (SparseArray) in.readSparseArray(ViewTranslationResponse.class.getClassLoader());
        SparseArray<TranslationResponseValue> translationResponseValues = in.readSparseArray(
                TranslationResponseValue.class.getClassLoader(), TranslationResponseValue.class);
        SparseArray<ViewTranslationResponse> viewTranslationResponses = in.readSparseArray(
                ViewTranslationResponse.class.getClassLoader(), ViewTranslationResponse.class);

        this.mTranslationStatus = translationStatus;