Part3 - Don't add padlock if the restriction is not set by admin.

Bug: 26687435
Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
This commit is contained in:
Sudheer Shanka
2016-02-11 18:48:14 +00:00
parent 7f2a013619
commit 9e9e63b7b3
21 changed files with 207 additions and 84 deletions

View File

@@ -171,6 +171,9 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
if (isUiRestricted()) {
setDeviceListGroup(getPreferenceScreen());
if (!isUiRestrictedByOnlyAdmin()) {
getEmptyTextView().setText(R.string.bluetooth_empty_list_user_restricted);
}
removeAllDevices();
return;
}
@@ -294,6 +297,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
mDevicePreferenceMap.clear();
if (isUiRestricted()) {
messageId = R.string.bluetooth_empty_list_user_restricted;
break;
}
@@ -355,7 +359,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
case BluetoothAdapter.STATE_OFF:
setOffMessage();
if (isUiRestricted()) {
messageId = 0;
messageId = R.string.bluetooth_empty_list_user_restricted;
}
break;