Merge "Don't throw runtime exceptions for permission flags" into nyc-dev