Hey, I have a use case where I’d like to encrypt t...
# android
r
Hey, I have a use case where I’d like to encrypt the output of
MediaMuxer
in memory before writing to disk. The general approach is: • Create a
MemoryFile
• Create a
CipherInputStream
from the `MemoryFile`’s
InputStream
• Give the `MemoryFile`’s
FileDescriptor
to the
MediaMuxer
constructor • Create a
FileOutputStream
from the
CipherInputStream
Right now I’m having to use reflection to get the file descriptor from
MemoryFile
and I’m curious why the getter is unsupported for app usage https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/MemoryFile.java#230.
stackoverflow 1
google 1
I guess this is the reason (commit where
@hide
as added) https://android.googlesource.com/platform/frameworks/base/+/e4f60cce8552a565efacf4907242574b9e00492d still makes my use case impossible without reflection though 🤔
d
Please check the channel topic