'ContentResolver takePersistableUriPermission with zero flag. Why?

According to official documentation parameter takeFlags of method of ContentResolver takePersistableUriPermission may be zero. Why?

Also in guide Persist permissions

final int takeFlags = intent.getFlags()
            & (Intent.FLAG_GRANT_READ_URI_PERMISSION
            | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
// Check for the freshest data.
getContentResolver().takePersistableUriPermission(uri, takeFlags);

This code means that intent.getFlags() can return zero and we will take zero permission. So, in this case I must call to user with message "can not take permission" but why it may happen? There is no information.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source