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

Commit aaf30e37 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Make SQLiteQuery and SQLiteProgram final."

parents 69b3d10d d5064be3
Loading
Loading
Loading
Loading

api/16.txt

0 → 100644
+46580 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −13
Original line number Diff line number Diff line
@@ -7320,22 +7320,11 @@ package android.database.sqlite {
    method public void bindString(int, java.lang.String);
    method public void clearBindings();
    method public void close();
    method protected deprecated void compile(java.lang.String, boolean);
    method public final deprecated int getUniqueId();
    method protected final void native_bind_blob(int, byte[]);
    method protected final void native_bind_double(int, double);
    method protected final void native_bind_long(int, long);
    method protected final void native_bind_null(int);
    method protected final void native_bind_string(int, java.lang.String);
    method protected final deprecated void native_compile(java.lang.String);
    method protected final deprecated void native_finalize();
    method protected void onAllReferencesReleased();
    field protected deprecated android.database.sqlite.SQLiteDatabase mDatabase;
    field protected deprecated int nHandle;
    field protected deprecated int nStatement;
  }
  public class SQLiteQuery extends android.database.sqlite.SQLiteProgram {
  public final class SQLiteQuery extends android.database.sqlite.SQLiteProgram {
  }
  public class SQLiteQueryBuilder {
@@ -7364,7 +7353,7 @@ package android.database.sqlite {
    ctor public SQLiteReadOnlyDatabaseException(java.lang.String);
  }
  public class SQLiteStatement extends android.database.sqlite.SQLiteProgram {
  public final class SQLiteStatement extends android.database.sqlite.SQLiteProgram {
    method public void execute();
    method public long executeInsert();
    method public int executeUpdateDelete();
+10 −22
Original line number Diff line number Diff line
@@ -32,9 +32,8 @@ public abstract class SQLiteProgram extends SQLiteClosable {
    private static final String TAG = "SQLiteProgram";

    /** The database this program is compiled against.
     * @deprecated do not use this
     * @hide
     */
    @Deprecated
    protected SQLiteDatabase mDatabase;

    /** The SQL used to create this query */
@@ -43,9 +42,8 @@ public abstract class SQLiteProgram extends SQLiteClosable {
    /**
     * Native linkage, do not modify. This comes from the database and should not be modified
     * in here or in the native code.
     * @deprecated do not use this
     * @hide
     */
    @Deprecated
    protected int nHandle;

    /**
@@ -56,9 +54,8 @@ public abstract class SQLiteProgram extends SQLiteClosable {
    /**
     * SQLiteCompiledSql statement id is populated with the corresponding object from the above
     * member. This member is used by the native_bind_* methods
     * @deprecated do not use this
     * @hide
     */
    @Deprecated
    protected int nStatement;

    /**
@@ -210,18 +207,6 @@ public abstract class SQLiteProgram extends SQLiteClosable {
        return mSql;
    }

    /**
     * @deprecated This method is deprecated and must not be used.
     *
     * @param sql the SQL string to compile
     * @param forceCompilation forces the SQL to be recompiled in the event that there is an
     *  existing compiled SQL program already around
     */
    @Deprecated
    protected void compile(String sql, boolean forceCompilation) {
        // TODO is there a need for this?
    }

    private void bind(int type, int index, Object value) {
        mDatabase.verifyDbIsOpen();
        addToBindArgs(index, (type == Cursor.FIELD_TYPE_NULL) ? null : value);
@@ -407,25 +392,28 @@ public abstract class SQLiteProgram extends SQLiteClosable {
    }

    /**
     * @deprecated This method is deprecated and must not be used.
     * @hide
     * Compiles SQL into a SQLite program.
     *
     * <P>The database lock must be held when calling this method.
     * @param sql The SQL to compile.
     */
    @Deprecated
    protected final native void native_compile(String sql);

    /**
     * @deprecated This method is deprecated and must not be used.
     * @hide
     */
    @Deprecated
    protected final native void native_finalize();

    /** @hide */
    protected final native void native_bind_null(int index);
    /** @hide */
    protected final native void native_bind_long(int index, long value);
    /** @hide */
    protected final native void native_bind_double(int index, double value);
    /** @hide */
    protected final native void native_bind_string(int index, String value);
    /** @hide */
    protected final native void native_bind_blob(int index, byte[] value);
    private final native void native_clear_bindings();
}
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import android.util.Log;
 * SQLiteQuery is not internally synchronized so code using a SQLiteQuery from multiple
 * threads should perform its own synchronization when using the SQLiteQuery.
 */
public class SQLiteQuery extends SQLiteProgram {
public final class SQLiteQuery extends SQLiteProgram {
    private static final String TAG = "SQLiteQuery";

    private static native long nativeFillWindow(int databasePtr, int statementPtr, int windowPtr,
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import dalvik.system.BlockGuard;
 * threads should perform its own synchronization when using the SQLiteStatement.
 */
@SuppressWarnings("deprecation")
public class SQLiteStatement extends SQLiteProgram
public final class SQLiteStatement extends SQLiteProgram
{
    private static final String TAG = "SQLiteStatement";