Use FileProvider when sending intents with files.
Fixes:
AndroidRuntime: Process: com.google.android.tag, PID: 14951
AndroidRuntime: android.os.FileUriExposedException: file:///.. exposed beyond app through Intent.getData()
AndroidRuntime: at android.os.StrictMode.onFileUriExposed(StrictMode.java:1960)
AndroidRuntime: at android.net.Uri.checkFileUriExposed(Uri.java:2348)
AndroidRuntime: at android.content.Intent.prepareToLeaveProcess(Intent.java:9881)
AndroidRuntime: at android.content.Intent.prepareToLeaveProcess(Intent.java:9835)
AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1610)
AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:4487)
Test: Read tag with file based Uri
Bug: 72087046
Change-Id: I4094b8dd2c1653f6ce9e1d94b1e718edf6d10d7c
(cherry picked from commit 7b4591e6be1856765dd8824878e377236eacfbc5)
4 files changed