Update NPMS.setRestrictBackgroundUL to notify listeners.

- Move the notifying listeners part to setRestrictBackgroundUL so
  that we can avoid notifying if the restrict background update fails.
- Add tracing code for setRestrictBackgroundUL.
- Remove any existing restrict_background_changed messages in the queue
  before posting a new one so that listeners will be notified only for
  the latest update.

Fixes: 36328002
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Change-Id: I83c6270aa9f2d38cd418d2d88bfe59394b111692
2 files changed