I have a Service and diverse Build variants and each build variants have different manifests. What I want to do is to not use the Service in specific build variant, for example, A, without adding any conditional statements in Java code.
To do this, Can I exclude Service registration on build variant A's manifest on purpose?
Now, as I tested without registering the service on manifest, I had system_server log saying "Unable to start service Intent ...." and no other problem seen. So there were no other issues but I'm feeling a little uncomfortable about this.
Can I intentionally unregister the Service from manifest?