Don't know about Xuamaiu phones, but Pixel phones already warn you if the camera lens is dirty when you take a picture.
How much time do you think they spent to write an algo to detect dirty lenses, and how much megacycles is spent to run it? So much for an annoying popup.
Compared to all the other things running when using the camera ? Nothing. Modern phone camera are like 50% cpu processing, both preview and capture.
By comparison it's rather easy to figure out there is something in focus far below minimal distance.
> So much for an annoying popup.
The very vast majority of people prefer to be warned about it and correct, than figure out later that the photo they wanted is ruined.
https://www.blog.google/products/pixel/pixel-visual-core-ima...