Java Code Examples for android.content.Intent#FLAG_GRANT_PREFIX_URI_PERMISSION

The following examples show how to use android.content.Intent#FLAG_GRANT_PREFIX_URI_PERMISSION . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 2
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 3
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 4
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 5
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 6
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 7
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 8
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 9
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 10
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}
 
Example 11
Source Project: android_9.0.0_r45   File: ContextImpl.java    License: Apache License 2.0 6 votes vote down vote up
private String uriModeFlagToString(int uriModeFlags) {
    StringBuilder builder = new StringBuilder();
    if ((uriModeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
        builder.append("read and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
        builder.append("write and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
        builder.append("persistable and ");
    }
    if ((uriModeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
        builder.append("prefix and ");
    }

    if (builder.length() > 5) {
        builder.setLength(builder.length() - 5);
        return builder.toString();
    } else {
        throw new IllegalArgumentException("Unknown permission mode flags: " + uriModeFlags);
    }
}