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

Commit 7ff46001 authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Fix Unsafe Parcel Usage

This is a manual fix.
Please review with caution.

Bug: 439097174
Test: build only
Flag: EXEMPT refactor
Change-Id: Idbe174c06da44cf5f1e70eaf72a6591aeab645fe
parent e82fff28
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;