dimanche 5 juillet 2015

Where is the definition of 'android.content.Context.deleteDatabase()'

When we want to delete a sqlite database on android , we can write like this :

MainActivity.this.deleteDatabase("CollectionDebug.db");

Then I watched the source code at ContextWrapper.deleteDatabase():

@Override
public boolean deleteDatabase(String name) {
    return mBase.deleteDatabase(name);
}

mBase's type is Context, continued to watch at Context.deleteDatabase():

/**
 * Delete an existing private SQLiteDatabase associated with this Context's
 * application package.
 *
 * @param name The name (unique in the application package) of the
 *             database.
 *
 * @return True if the database was successfully deleted; else false.
 *
 * @see #openOrCreateDatabase
 */
public abstract boolean deleteDatabase(String name);

It's a abstract method ?!

Where is the definition ?

Aucun commentaire:

Enregistrer un commentaire