SearchFeatureProvider's context field is removed
SearchFeatureProvider was holding on to a context and outlived the SettingsActivity, thus leaking the activity. The context was passed into most methods, and thus it makes more sense to pass it in to every method. Bug: 33677967 Test: Run MakeSettingsRoboTests Change-Id: Ia82f30e7e0b83587b4baeef28e81da6b8e4303fe
This commit is contained in:
@@ -124,7 +124,7 @@ public class DashboardFeatureProviderImplTest {
|
||||
tile.intent = new Intent();
|
||||
tile.intent.setComponent(new ComponentName("pkg", "class"));
|
||||
|
||||
when(mActivity.getApplicationContext().getSystemService(Context.USER_SERVICE))
|
||||
when(mActivity.getSystemService(Context.USER_SERVICE))
|
||||
.thenReturn(mUserManager);
|
||||
|
||||
mImpl.bindPreferenceToTile(mActivity, preference, tile, "123", Preference.DEFAULT_ORDER);
|
||||
|
Reference in New Issue
Block a user