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

Commit e668c0a1 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android Git Automerger
Browse files

am 994e5a5a: am 3bbd3aea: Merge "AccessibilityNodeInfo incorrectly cloned." into klp-dev

* commit '994e5a5a':
  AccessibilityNodeInfo incorrectly cloned.
parents fe3b9727 994e5a5a
Loading
Loading
Loading
Loading
+41 −3
Original line number Diff line number Diff line
@@ -2279,9 +2279,12 @@ public class AccessibilityNodeInfo implements Parcelable {
        if (other.mExtras != null && !other.mExtras.isEmpty()) {
            getExtras().putAll(other.mExtras);
        }
        mRangeInfo = other.mRangeInfo;
        mCollectionInfo = other.mCollectionInfo;
        mCollectionItemInfo = other.mCollectionItemInfo;
        mRangeInfo = (other.mRangeInfo != null)
                ? RangeInfo.obtain(other.mRangeInfo) : null;
        mCollectionInfo = (other.mCollectionInfo != null)
                ? CollectionInfo.obtain(other.mCollectionInfo) : null;
        mCollectionItemInfo =  (other.mCollectionItemInfo != null)
                ? CollectionItemInfo.obtain(other.mCollectionItemInfo) : null;
    }

    /**
@@ -2601,6 +2604,17 @@ public class AccessibilityNodeInfo implements Parcelable {
        private float mMax;
        private float mCurrent;

        /**
         * Obtains a pooled instance that is a clone of another one.
         *
         * @param other The instance to clone.
         *
         * @hide
         */
        public static RangeInfo obtain(RangeInfo other) {
            return obtain(other.mType, other.mMin, other.mMax, other.mCurrent);
        }

        /**
         * Obtains a pooled instance.
         *
@@ -2707,6 +2721,18 @@ public class AccessibilityNodeInfo implements Parcelable {
        private int mColumnCount;
        private boolean mHierarchical;

        /**
         * Obtains a pooled instance that is a clone of another one.
         *
         * @param other The instance to clone.
         *
         * @hide
         */
        public static CollectionInfo obtain(CollectionInfo other) {
            return CollectionInfo.obtain(other.mRowCount, other.mColumnCount,
                    other.mHierarchical);
        }

        /**
         * Obtains a pooled instance.
         *
@@ -2795,6 +2821,18 @@ public class AccessibilityNodeInfo implements Parcelable {
        private static final SynchronizedPool<CollectionItemInfo> sPool =
                new SynchronizedPool<CollectionItemInfo>(MAX_POOL_SIZE);

        /**
         * Obtains a pooled instance that is a clone of another one.
         *
         * @param other The instance to clone.
         *
         * @hide
         */
        public static CollectionItemInfo obtain(CollectionItemInfo other) {
            return CollectionItemInfo.obtain(other.mRowIndex, other.mRowSpan,
                    other.mColumnIndex, other.mColumnSpan, other.mHeading);
        }

        /**
         * Obtains a pooled instance.
         *