well, thats Xiaomi... you can't be shure that camera module supports some features like focusing. one and only almost always properly working feature is taking photo/bitmap. all other may be not supported by camera module - even if there is an app on device which can use some feature (e.g. focus) there is no guarantee that manufacturer implemented this feature in Camera2 API (or any other API)
consider using CameraX lib, which tries to resolve problems with very different ways for accessing some features/resolutions/params. still it may also fail (but rarely) or return info that camera doesn't support such feature
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…