Fixed
Status Update
Comments
am...@gmail.com <am...@gmail.com> #2
Here is a leak example for a real-life use case. Again, the MediaSession was released, but the leak sticks around:
* GC ROOT android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21$ExtraSession.this$0
* references android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.mSessionObj
* references android.media.session.MediaSession.mController
* references android.media.session.MediaController.mContext
* leaks com.bubenheimer.rucksack.d.q instance
* GC ROOT android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21$ExtraSession.this$0
* references android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.mSessionObj
* references android.media.session.MediaSession.mController
* references android.media.session.MediaController.mContext
* leaks com.bubenheimer.rucksack.d.q instance
bo...@google.com <bo...@google.com> #3
Thank you for your feedback. We assure you that we are doing our best to address the issue reported, however our product team has shifted work priority that doesn't include this issue. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with latest bug report here https://goo.gl/TbMiIO .
d4...@gmail.com <d4...@gmail.com> #4
deleted
Description
Path:
/extSdCard/_documentTest
Uri:
content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3A_documentTest
SingleDocumentFile doesn't support any write features, so we are left with TreeDocumentFile which is created with:
public static DocumentFile fromTreeUri(Context context, Uri treeUri) {
final int version = Build.VERSION.SDK_INT;
if (version >= 21) {
return new TreeDocumentFile(null, context,
DocumentsContractApi21.prepareTreeUri(treeUri));
} else {
return null;
}
}
However DocumentsContractApi21.prepareTreeUri(treeUri) truncates the document id returning a DocumentFile pointing to:
content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3A
This is NOT the same URI! It simply truncated this URI down to the tree root...
I cannot see a workaround without reflection into TreeDocumentFile.