Fix isFileUri to recognize URIs with spaces.

The underlying framework recognizes " file://..." as a valid URI and fetches the file, allowing for a possible exploit (see b/209965112). This trims the URI so that we can properly recognize it as a file from within our code.

Bug: 209965112
Change-Id: I8d9d9100e9a8c3bd64d19015d2177a14ec2306f3
Test: See repro steps on http://b/209965112, was no longer able to repro.
diff --git a/src/com/android/messaging/util/UriUtil.java b/src/com/android/messaging/util/UriUtil.java
index 1d6a1be..6e39749 100644
--- a/src/com/android/messaging/util/UriUtil.java
+++ b/src/com/android/messaging/util/UriUtil.java
@@ -98,7 +98,7 @@
     public static boolean isFileUri(final Uri uri) {
         return uri != null &&
                 uri.getScheme() != null &&
-                TextUtils.equals(uri.getScheme().toLowerCase(),
+                TextUtils.equals(uri.getScheme().trim().toLowerCase(),
                         ContentResolver.SCHEME_FILE);
     }