[SettingsProvider] fix mock leakage in NameValueCacheTest

Settings.java keeps a reference of ContentProvider in ContentProviderHolder so it doesn't have to call contentResolver.acquireProvider on repeated calls. However, when we pass in a mock ContentProvider there, it doesn't get automatically removed and remains active in the same test process, unless the cleanup was called specifically. This may affect other tests that use the Settings class in the same test process. This CL fixes that.

Change-Id: I2d1f169fdc48a9defe54c45f99e2f75302632417
BUG: 297724333
FIXES: 297724333
Test: presubmit
1 file changed