Remove toggle "Turn on phone calls & SMS" from User Details of Main user

Admins should not be able to disable phone calls and SMS from the device owner.

Bug: 294846327
Test: atest UserDetailsSettingsTest
Change-Id: Ibb8532379c6e1e22fe45f2acb5191f8f6c7f3b0a
This commit is contained in:
Tetiana Meronyk
2023-08-08 09:49:11 +00:00
parent 317bfca133
commit 30ca0fbb3d

View File

@@ -376,7 +376,9 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
if (!Utils.isVoiceCapable(context)) { // no telephony
removePreference(KEY_ENABLE_TELEPHONY);
}
if (mUserInfo.isMain()) {
removePreference(KEY_ENABLE_TELEPHONY);
}
if (mUserInfo.isRestricted()) {
removePreference(KEY_ENABLE_TELEPHONY);
if (isNewUser) {