Merge "Change the permission labels to lowercase."
This commit is contained in:
committed by
Android (Google) Code Review
commit
475df3c678
@@ -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