~singpolyma/cheogram-android

a4c9e711bfec73f849a248d504048af44084256b — Stephen Paul Weber 1 year, 16 days ago 7816381
createOpenDocumentTreeIntent added in 29
1 files changed, 1 insertions(+), 1 deletions(-)

M src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
M src/main/java/eu/siacs/conversations/ui/ConversationFragment.java => src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +1 -1
@@ 2496,7 2496,7 @@ public class ConversationFragment extends XmppFragment
        } else {
            new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "/" + dir + "/User Pack").mkdirs();
            Uri uri;
            if (Build.VERSION.SDK_INT >= 24) {
            if (Build.VERSION.SDK_INT >= 29) {
                Intent tmp = ((StorageManager) activity.getSystemService(Context.STORAGE_SERVICE)).getPrimaryStorageVolume().createOpenDocumentTreeIntent();
                uri = tmp.getParcelableExtra("android.provider.extra.INITIAL_URI");
                uri = Uri.parse(uri.toString().replace("/root/", "/document/") + "%3APictures%2F" + dir);