Part3 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435 Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user