Merge "Use std::optional instead of std::unique_ptr" am: 85486fc425 am: 17f086a93a am: 61c1e0c729 am: 91e25c3871

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1501913

Change-Id: Ibfb967b4191fe332ef9ed5b2ca3d7e219e9d2be0