Revert "Revert "AppOps refactor for mode watchers.""

This reverts commit 31c2991950682e5e446d7200a54dab2682e34f01.

Reason for revert: Fixing the bug that caused the initial revert

The cause for the revert was that we called notifyOpChanged asyncly but
in the refactor we separated the listener callback and listener details
in OpModeChangedListener and ModeChangedListenerDetails respectively.
But we only passed OpModeChangedListener to notifyOpChanged relying on
an internal map to get the corresponding ModeChangedListenerDetails but
this relied on the call being synchronous.

With this CL we pass an object of ModeChangedListenerDetails within
OpModeChangedListener.

BUG: 240200048

Test: Manual

Change-Id: I5484eddb0a4081145dfdc8a638950b437ca15e8f
4 files changed