From 7873d5b3ff587ffff33dae628aaa581b099db61e Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 9 May 2012 14:32:14 -0700 Subject: [PATCH] Deprecate certain AbstractCursor fields. Bug: 6353797 Change-Id: I52b67f35c867378849ceb77356d0065161157ac9 --- api/current.txt | 4 ++-- core/java/android/database/AbstractCursor.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/api/current.txt b/api/current.txt index 0f9676e026fc5..37d12f107acd7 100644 --- a/api/current.txt +++ b/api/current.txt @@ -7016,9 +7016,9 @@ package android.database { method public void unregisterDataSetObserver(android.database.DataSetObserver); field protected boolean mClosed; field protected android.content.ContentResolver mContentResolver; - field protected java.lang.Long mCurrentRowID; + field protected deprecated java.lang.Long mCurrentRowID; field protected int mPos; - field protected int mRowIdColumnIndex; + field protected deprecated int mRowIdColumnIndex; field protected deprecated java.util.HashMap mUpdatedRows; } diff --git a/core/java/android/database/AbstractCursor.java b/core/java/android/database/AbstractCursor.java index dd6692cbc0588..fb04817f86e2f 100644 --- a/core/java/android/database/AbstractCursor.java +++ b/core/java/android/database/AbstractCursor.java @@ -44,14 +44,20 @@ public abstract class AbstractCursor implements CrossProcessCursor { /** * This must be set to the index of the row ID column by any * subclass that wishes to support updates. + * + * @deprecated This field should not be used. */ + @Deprecated protected int mRowIdColumnIndex; /** * If {@link #mRowIdColumnIndex} is not -1 this contains contains the value of * the column at {@link #mRowIdColumnIndex} for the current row this cursor is * pointing at. + * + * @deprecated This field should not be used. */ + @Deprecated protected Long mCurrentRowID; protected boolean mClosed; @@ -62,8 +68,8 @@ public abstract class AbstractCursor implements CrossProcessCursor { private ContentObserver mSelfObserver; private boolean mSelfObserverRegistered; - private DataSetObservable mDataSetObservable = new DataSetObservable(); - private ContentObservable mContentObservable = new ContentObservable(); + private final DataSetObservable mDataSetObservable = new DataSetObservable(); + private final ContentObservable mContentObservable = new ContentObservable(); private Bundle mExtras = Bundle.EMPTY;