Example usage for android.content ContentProviderOperation TYPE_ASSERT

List of usage examples for android.content ContentProviderOperation TYPE_ASSERT

Introduction

In this page you can find the example usage for android.content ContentProviderOperation TYPE_ASSERT.

Prototype

int TYPE_ASSERT

To view the source code for android.content ContentProviderOperation TYPE_ASSERT.

Click Source Link

Usage

From source file:com.mediatek.contacts.activities.ActivitiesUtils.java

public static Integer checkSelectedDeleted(Integer result, final ArrayList<ContentProviderOperation> diff,
        ContentProviderResult[] results, final int failed) {
    if (results != null && results.length > 0 && !diff.isEmpty()) {
        // Version asserts failure if there is no contact item.
        if (diff.get(0).getType() == ContentProviderOperation.TYPE_ASSERT && results[0].count != null
                && results[0].count <= 0) {
            result = failed;/*ww w  .ja  v a  2s.c o  m*/
            Log.e(TAG, "[checkSelectedDeleted]the selected contact has been deleted!");
        }
    }
    return result;
}