The issue is resolved. There was indeed an occurrence of "onAttachedToWindow" in one of the empty base classes. It worked after removing that override. As I mentioned in my original post, I had come across this solution in another post. Here is a reference to that post.
In my case however this code wasn't in any of the user-facing activities. It was in a blank parent activity which my landing page was inheriting. Hope someone saves a few hours after this post.