[Tether10]Remove UserManagerInternal usage in Tethering
To be the unbundled application, tethering can not use UserManagerInternal
method anymore. Replace it by listening user restriction change intent.
Also fix some cleanup from
https://android-review.googlesource.com/c/platform/frameworks/base/+/1131002
Bug: 143195885
Test: -build, flash, boot
-atest TetheringTests
-manual test. Add a trigger point to call
UserManager.setUserRestriction(DISALLOW_CONFIG_TETHERING) from
Settings. Open hotspot -> restrict tethering from new adding trigger
point -> hotspot is OFF and Tethering settings are not available.
Change-Id: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
5 files changed