Error on Intent Photo (solved)

On tacking photo i have this error:

criminal exposed beyond app through ClipData.Item.getUri()

using > compileSdkVersion 26

    minSdkVersion 16

It was solved using
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());

at the onCreate method