即使已实现,ContentProvider也会关闭警告

时间:2014-01-28 10:59:21

标签: android warnings android-contentprovider

我已经完成了自己的ContentProvider并覆盖了shutdown()方法。 为什么我仍然会收到此警告:

W / ContentProvider:实现ContentProvider shutdown()以确保正常关闭所有数据库连接

1 个答案:

答案 0 :(得分:3)

日志消息来自超类的实现(see source code)

public void shutdown() {
    Log.w(TAG, "implement ContentProvider shutdown() to make sure all database " +
            "connections are gracefully shutdown");
}

请不要在自己的实现中调用super.shutdown(),日志消息应该消失。

相关问题