Refactor onActivityResult
CB-1826 Catch OOM on gallery image resize