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

Commit 77709755 authored by Fred Quintana's avatar Fred Quintana
Browse files

- add a reset to EntityIterator to allow it to go back to the beginning

- clean up the debug printing of SyncResult
parent 404780d6
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -25311,6 +25311,19 @@
 visibility="public"
>
</method>
<method name="reset"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<exception name="RemoteException" type="android.os.RemoteException">
</exception>
</method>
</class>
<class name="ActivityNotFoundException"
 extends="java.lang.RuntimeException"
@@ -31226,6 +31239,19 @@
<exception name="RemoteException" type="android.os.RemoteException">
</exception>
</method>
<method name="reset"
 return="void"
 abstract="true"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<exception name="RemoteException" type="android.os.RemoteException">
</exception>
</method>
</interface>
<class name="Intent"
 extends="java.lang.Object"
+8 −0
Original line number Diff line number Diff line
@@ -87,6 +87,14 @@ public abstract class AbstractCursorEntityIterator implements EntityIterator {
        }
    }

    public void reset() throws RemoteException {
        if (mIsClosed) {
            throw new IllegalStateException("calling reset() when the iterator is closed");
        }
        mEntityCursor.moveToPosition(-1);
        mNextEntity = null;
    }

    /**
     * Closes this iterator making it invalid. If is invalid for the user to call any public
     * method on the iterator once it has been closed.
+8 −0
Original line number Diff line number Diff line
@@ -281,6 +281,10 @@ abstract public class ContentProviderNative extends Binder implements IContentPr
            return mEntityIterator.next();
        }

        public void reset() throws RemoteException {
            mEntityIterator.reset();
        }

        public void close() throws RemoteException {
            mEntityIterator.close();
        }
@@ -406,6 +410,10 @@ final class ContentProviderProxy implements IContentProvider
            return mEntityIterator.next();
        }

        public void reset() throws RemoteException {
            mEntityIterator.reset();
        }

        public void close() {
            try {
                mEntityIterator.close();
+7 −0
Original line number Diff line number Diff line
@@ -244,6 +244,13 @@ public abstract class ContentResolver {
            return mInner.next();
        }

        public void reset() throws RemoteException {
            if (mClientReleased) {
                throw new IllegalStateException("this iterator is already closed");
            }
            mInner.reset();
        }

        public void close() {
            mClient.release();
            mInner.close();
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ public interface EntityIterator {
     */
    public Entity next() throws RemoteException;

    public void reset() throws RemoteException;

    /**
     * Indicates that this iterator is no longer needed and that any associated resources
     * may be released (such as a SQLite cursor).
Loading