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

Commit 5a8d8275 authored by Tony Mak's avatar Tony Mak
Browse files

Do not deep copy bundle in getExtras()

Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/*

BUG: 129901152
Change-Id: Icc55b81acabfad317622de4d664d573646f49914
parent f8aeee04
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -200,13 +200,11 @@ public final class ConversationAction implements Parcelable {
    /**
     * Returns the extended data related to this conversation action.
     *
     * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
     * prefer to hold a reference to the returned bundle rather than frequently calling this
     * method.
     * <p><b>NOTE: </b>Do not modify this bundle.
     */
    @NonNull
    public Bundle getExtras() {
        return mExtras.deepCopy();
        return mExtras;
    }

    /** Builder class to construct {@link ConversationAction}. */
+2 −4
Original line number Diff line number Diff line
@@ -214,13 +214,11 @@ public final class ConversationActions implements Parcelable {
        /**
         * Returns the extended data related to this conversation action.
         *
         * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
         * prefer to hold a reference to the returned bundle rather than frequently calling this
         * method.
         * <p><b>NOTE: </b>Do not modify this bundle.
         */
        @NonNull
        public Bundle getExtras() {
            return mExtras.deepCopy();
            return mExtras;
        }

        /** Builder class to construct a {@link Message} */
+4 −8
Original line number Diff line number Diff line
@@ -265,13 +265,11 @@ public final class TextClassification implements Parcelable {
    /**
     * Returns the extended data.
     *
     * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
     * prefer to hold a reference to the returned bundle rather than frequently calling this
     * method.
     * <p><b>NOTE: </b>Do not modify this bundle.
     */
    @NonNull
    public Bundle getExtras() {
        return mExtras.deepCopy();
        return mExtras;
    }

    @Override
@@ -635,13 +633,11 @@ public final class TextClassification implements Parcelable {
        /**
         * Returns the extended data.
         *
         * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
         * prefer to hold a reference to the returned bundle rather than frequently calling this
         * method.
         * <p><b>NOTE: </b>Do not modify this bundle.
         */
        @NonNull
        public Bundle getExtras() {
            return mExtras.deepCopy();
            return mExtras;
        }

        /**
+4 −8
Original line number Diff line number Diff line
@@ -125,13 +125,11 @@ public final class TextLinks implements Parcelable {
    /**
     * Returns the extended data.
     *
     * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
     * prefer to hold a reference to the returned bundle rather than frequently calling this
     * method.
     * <p><b>NOTE: </b>Do not modify this bundle.
     */
    @NonNull
    public Bundle getExtras() {
        return mExtras.deepCopy();
        return mExtras;
    }

    /**
@@ -413,13 +411,11 @@ public final class TextLinks implements Parcelable {
        /**
         * Returns the extended data.
         *
         * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
         * prefer to hold a reference to the returned bundle rather than frequently calling this
         * method.
         * <p><b>NOTE: </b>Do not modify this bundle.
         */
        @NonNull
        public Bundle getExtras() {
            return mExtras.deepCopy();
            return mExtras;
        }

        /**
+4 −8
Original line number Diff line number Diff line
@@ -112,13 +112,11 @@ public final class TextSelection implements Parcelable {
    /**
     * Returns the extended data.
     *
     * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
     * prefer to hold a reference to the returned bundle rather than frequently calling this
     * method.
     * <p><b>NOTE: </b>Do not modify this bundle.
     */
    @NonNull
    public Bundle getExtras() {
        return mExtras.deepCopy();
        return mExtras;
    }

    @Override
@@ -296,13 +294,11 @@ public final class TextSelection implements Parcelable {
        /**
         * Returns the extended data.
         *
         * <p><b>NOTE: </b>Each call to this method returns a new bundle copy so clients should
         * prefer to hold a reference to the returned bundle rather than frequently calling this
         * method.
         * <p><b>NOTE: </b>Do not modify this bundle.
         */
        @NonNull
        public Bundle getExtras() {
            return mExtras.deepCopy();
            return mExtras;
        }

        /**