Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c6f4ae1 authored by Tetiana Meronyk's avatar Tetiana Meronyk
Browse files

Remove "Allow guest to use phone" from devices without telephony.

Bug: 282741809
Test: atest UserSettingsTest
Change-Id: I8c24dc021f1461c00765b41bf80f352948d14e43
parent f2f89910
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6419,7 +6419,7 @@
    <!-- Search keywords for the "Delete Guest Activity" section in Multiple Users Screen. [CHAR LIMIT=NONE] -->
    <string name="remove_guest_on_exit_keywords">delete, guest, activity, remove, data, visitor, erase</string>
    <!-- Title of preference to enable guest calling[CHAR LIMIT=40] -->
    <string name="enable_guest_calling">Allow guest to use phone</string>
    <string name="enable_guest_calling">Allow guest to make phone calls</string>
    <!-- Summary of preference to enable guest calling [CHAR LIMIT=NONE] -->
    <string name="enable_guest_calling_summary">Call history will be shared with guest user</string>
+3 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settings.users;

import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.UserManager;

@@ -73,6 +74,7 @@ public class GuestTelephonyPreferenceController extends TogglePreferenceControll
    public void updateState(Preference preference) {
        super.updateState(preference);
        mUserCaps.updateAddUserCapabilities(mContext);
        preference.setVisible(isAvailable() && mUserCaps.mUserSwitcherEnabled);
        preference.setVisible(isAvailable() && mUserCaps.mUserSwitcherEnabled && mContext
                .getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY));
    }
}