My new app doesn't support dark mode. When I install it on Xiaomi (with dark mode truned on) MIUI applies dark mode on it. MIUI has settings at "Settings -> Display -> More Dark mode options" (screenshot of "More Dark mode options"). This options is turned on for my app and forces dark mode despite that my app doesn't support it. Most other apps do not have this mode enabled. There are apps that are "white", but for them this mode is not enabled and they work correctly.
I found solution with adding the below line to the themes.xml:
<item name="android:forceDarkAllowed">false</item>
The problem is that, this line requires setting minSdkVersion = 29. How to prevent MIUI enabling the option at "More Dark mode options" and forcing dark mode in my app (like in most other "white" apps) with keeping SDK version at 21?
MIUI 12 based on Android 10