1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-22 08:13:43 +02:00

Merge pull request #210 from erijo/export-fix

Verify that it's possible to get filename from old export
This commit is contained in:
OliE
2018-02-28 19:07:49 +01:00
committed by GitHub

View File

@@ -604,6 +604,7 @@ public class MainActivity extends AppCompatActivity
String exportUri = prefs.getString(getExportPreferenceKey(selectedScaleUser), "");
uri = Uri.parse(exportUri);
getContentResolver().takePersistableUriPermission(uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
openScale.getFilenameFromUri(uri);
}
catch (Exception ex) {
uri = null;