Methods Summary |
---|
public void | binderDied()
mCursor.close();
if (mWindow != null) {
mWindow.close();
}
|
public void | close()
maybeUnregisterObserverProxy();
mCursor.deactivate();
|
public int | count()
return mCursor.getCount();
|
private void | createAndRegisterObserverProxy(IContentObserver observer)Create a ContentObserver from the observer and register it as an observer on the
underlying cursor.
if (mObserver != null) {
throw new IllegalStateException("an observer is already registered");
}
mObserver = new ContentObserverProxy(observer, this);
mCursor.registerContentObserver(mObserver);
|
public void | deactivate()
maybeUnregisterObserverProxy();
mCursor.deactivate();
|
public boolean | deleteRow(int position)
if (mReadOnly) {
Log.w("ContentProvider", "Permission Denial: modifying "
+ mProviderName
+ " from pid=" + Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid());
return false;
}
if (mCursor.moveToPosition(position) == false) {
return false;
}
return mCursor.deleteRow();
|
public java.lang.String[] | getColumnNames()
return mCursor.getColumnNames();
|
public android.os.Bundle | getExtras()
return mCursor.getExtras();
|
public boolean | getWantsAllOnMoveCalls()
return mCursor.getWantsAllOnMoveCalls();
|
public CursorWindow | getWindow(int startPos)
mCursor.moveToPosition(startPos);
if (mWindow != null) {
if (startPos < mWindow.getStartPosition() ||
startPos >= (mWindow.getStartPosition() + mWindow.getNumRows())) {
mCursor.fillWindow(startPos, mWindow);
}
return mWindow;
} else {
return ((AbstractWindowedCursor)mCursor).getWindow();
}
|
private void | maybeUnregisterObserverProxy()Unregister the observer if it is already registered.
if (mObserver != null) {
mCursor.unregisterContentObserver(mObserver);
mObserver.unlinkToDeath(this);
mObserver = null;
}
|
public void | onMove(int position)
mCursor.onMove(mCursor.getPosition(), position);
|
public int | requery(IContentObserver observer, CursorWindow window)
if (mWindow == null) {
((AbstractWindowedCursor)mCursor).setWindow(window);
}
try {
if (!mCursor.requery()) {
return -1;
}
} catch (IllegalStateException e) {
IllegalStateException leakProgram = new IllegalStateException(
mProviderName + " Requery misuse db, mCursor isClosed:" +
mCursor.isClosed(), e);
throw leakProgram;
}
if (mWindow != null) {
mCursor.fillWindow(0, window);
mWindow = window;
}
maybeUnregisterObserverProxy();
createAndRegisterObserverProxy(observer);
return mCursor.getCount();
|
public android.os.Bundle | respond(android.os.Bundle extras)
return mCursor.respond(extras);
|
public boolean | updateRows(java.util.Map values)
if (mReadOnly) {
Log.w("ContentProvider", "Permission Denial: modifying "
+ mProviderName
+ " from pid=" + Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid());
return false;
}
return mCursor.commitUpdates(values);
|