Fix profile picture picking for restricted profiles
Due to the new file picker UI and incorrect assumptions of access to sd card,
have to use content provider Uris instead of file paths.
Also makes the cropping robust in the event of not having a cropping intent
on the platform.
This should make the code play well with third party image
and camera apps as well.
Bug: 10666584
Change-Id: Ie8d834fe7aac96bc14829a7be084512a15ef4001
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 493d7f4..49e8977 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1691,5 +1691,14 @@
</intent-filter>
</receiver>
+ <provider
+ android:name="android.support.v4.content.FileProvider"
+ android:authorities="com.android.settings.files"
+ android:grantUriPermissions="true"
+ android:exported="false">
+ <meta-data
+ android:name="android.support.FILE_PROVIDER_PATHS"
+ android:resource="@xml/file_paths" />
+ </provider>
</application>
</manifest>