Change the permission labels to lowercase.
In the summary for Apps permissions, change the list of permissions lable to lowercase instead. Change-Id: I5b3133c33de7110dbec6ab179c6f1308c4ed481e Fixes: 65049565 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -111,7 +111,7 @@ public class AppPermissionsPreferenceController extends AbstractPreferenceContro
|
|||||||
}
|
}
|
||||||
|
|
||||||
private CharSequence concatSummaryText(CharSequence currentSummary, String permission) {
|
private CharSequence concatSummaryText(CharSequence currentSummary, String permission) {
|
||||||
final CharSequence label = getPermissionGroupLabel(permission);
|
final String label = getPermissionGroupLabel(permission).toString().toLowerCase();
|
||||||
if (TextUtils.isEmpty(currentSummary)) {
|
if (TextUtils.isEmpty(currentSummary)) {
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
@@ -178,33 +178,33 @@ public class AppPermissionsPreferenceControllerTest {
|
|||||||
permissions[2] = mPermCamera;
|
permissions[2] = mPermCamera;
|
||||||
permissions[3] = mPermSms;
|
permissions[3] = mPermSms;
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
verify(mPreference).setSummary("Apps using Location, Microphone, Camera");
|
verify(mPreference).setSummary("Apps using location, microphone, camera");
|
||||||
|
|
||||||
permissions[0] = mPermPhone;
|
permissions[0] = mPermPhone;
|
||||||
permissions[1] = mPermMic;
|
permissions[1] = mPermMic;
|
||||||
permissions[2] = mPermCamera;
|
permissions[2] = mPermCamera;
|
||||||
permissions[3] = mPermSms;
|
permissions[3] = mPermSms;
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
verify(mPreference).setSummary("Apps using Microphone, Camera, Sms");
|
verify(mPreference).setSummary("Apps using microphone, camera, sms");
|
||||||
|
|
||||||
permissions[0] = mPermPhone;
|
permissions[0] = mPermPhone;
|
||||||
permissions[1] = mPermMic;
|
permissions[1] = mPermMic;
|
||||||
permissions[2] = mPermContacts;
|
permissions[2] = mPermContacts;
|
||||||
permissions[3] = mPermSms;
|
permissions[3] = mPermSms;
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
verify(mPreference).setSummary("Apps using Microphone, Sms, Contacts");
|
verify(mPreference).setSummary("Apps using microphone, sms, contacts");
|
||||||
|
|
||||||
permissions = new PermissionInfo[2];
|
permissions = new PermissionInfo[2];
|
||||||
info.permissions = permissions;
|
info.permissions = permissions;
|
||||||
permissions[0] = mPermLocation;
|
permissions[0] = mPermLocation;
|
||||||
permissions[1] = mPermCamera;
|
permissions[1] = mPermCamera;
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
verify(mPreference).setSummary("Apps using Location, Camera");
|
verify(mPreference).setSummary("Apps using location, camera");
|
||||||
|
|
||||||
permissions = new PermissionInfo[1];
|
permissions = new PermissionInfo[1];
|
||||||
info.permissions = permissions;
|
info.permissions = permissions;
|
||||||
permissions[0] = mPermCamera;
|
permissions[0] = mPermCamera;
|
||||||
mController.updateState(mPreference);
|
mController.updateState(mPreference);
|
||||||
verify(mPreference).setSummary("Apps using Camera");
|
verify(mPreference).setSummary("Apps using camera");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user