Fix App permission doesn't show summary

Since AppPermissionsPreferenceController assigns
a fixed preference key in constructor, so it can't
be used by same controller in Privacy page.

So, we change contructor directly, let controller
read preference key from xml file.

- Also remove unused imports.

Test: visual
Bug: 116628158
Change-Id: I42d6e978e91f0a2fe796d290cb9f34db596aa1f4
This commit is contained in:
tmfang
2018-11-14 15:57:11 +08:00
parent d6cdafc0d7
commit 057539f186
3 changed files with 3 additions and 6 deletions

View File

@@ -143,7 +143,7 @@ public class AppPermissionsPreferenceControllerTest {
when(mPackageManager.queryPermissionsByGroup(anyString(), anyInt()))
.thenReturn(permissions);
mController = spy(new AppPermissionsPreferenceController(mContext));
mController = spy(new AppPermissionsPreferenceController(mContext, "pref_key"));
}
@Test