Merge "Fix InstantiationException crash" into main am: adb236d284

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Gallery2/+/2796112

Change-Id: Ib388ee42e0ca6725075338aab050d8abe3daff4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>