This is my first post in the XDA OnePlus 7/Pro Forums! After many months of development, I'm finally ready to reveal my app to the world. I've already published the app to the Play Store and I highly recommend grabbing it from there, as it will ensure you get the latest updates the fastest. Now, this app is something I'd always wanted on my OnePlus phone, and I've heard many requests from users on forums for OnePlus to add this feature. However, as far as I know, no app with similar functionality existed for OnePlus phones... until today.
About the app itself:
This app allows OnePlus users running Android 10 to set a Quick Settings tile that allows them to switch between the OP system-wide light and dark themes (this will affect all supported OnePlus, Google, and user apps, just like the actual setting in 'Customization > Tone' does). In addition, I've added in automatic theme switching based on time of day, meaning that when it's sunset, the phone will automatically switch over to dark theme, and when it's sunrise, the phone will automatically switch over to light theme. This aforementioned feature is toggleable, so if you discover that you don't like it, you can always disable it (as there are some drawbacks to this feature, discussed below). Also, I've added automatic wallpaper switching when the themes are changed, allowing for custom wallpapers depending on whether the light or dark theme is active (also toggleable, in case you don't want this feature).
Note about auto-switch feature:
Due to the stubbornness of System UI, when this feature is enabled and the phone is off and the phone detects sunrise/sunset, it has to quickly turn on the screen, then turn it off, in order to ensure that Ambient Display continues to work after switching themes. This only happens when the screen is off, and the screen "flicker" is almost unnoticeable from the sheer speed at which it occurs (but, if you stare at your screen when it's off for long enough during sunrise/sunset, you may notice it happen briefly). In addition, the auto-switch may kick in while the screen is on, which COULD, in very RARE CIRCUMSTANCES, cause you to lose some temporary unsaved work on your phone. I've never encountered this (at least, yet), but I have heard it is possible for things like the Google search bar or other small text inputs, etc.
After much thought, I decided to make the app free to use with no ads and no (paid) "premium" features. I am an independent developer and full-time high school student; if you found my app useful, please do consider donating to me through PayPal: paypal.me/opdarktoggler.
Grab the app from the Play Store (highly recommended): https://play.google.com/store/apps/d...arkmodetoggler, or download the app from the apk posted below.