fix bugs in EMUI gallery/camera patch