Fix "Turn on phone calls" for guest user

Move "Turn on phone calls" from guest detail user screen to user screen.
Optimisation: Applying restrictions to default guest user has been moved
to UserManagerService -> setDefaultGuestRestrictions.

Following UX there is no need for confirmation dialog.

Bug: 191483069
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER="com.android.settings.users.GuestTelephonyPreferenceControllerTest"
       make RunSettingsRoboTests -j128 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: Id7391d3f85954ea7f9c94791f24174105ec8073e
This commit is contained in:
Anna Bauza
2022-04-27 13:07:09 +00:00
parent 25fd957190
commit 935b735fb4
10 changed files with 286 additions and 100 deletions

View File

@@ -145,21 +145,6 @@ public final class UserDialogs {
.create();
}
/**
* Creates a dialog to confirm that the user is ok to enable phone calls (no SMS).
*
* @param onConfirmListener Callback object for positive action
*/
public static Dialog createEnablePhoneCallsDialog(Context context,
DialogInterface.OnClickListener onConfirmListener) {
return new AlertDialog.Builder(context)
.setTitle(R.string.user_enable_calling_confirm_title)
.setMessage(R.string.user_enable_calling_confirm_message)
.setPositiveButton(R.string.okay, onConfirmListener)
.setNegativeButton(android.R.string.cancel, null)
.create();
}
/**
* Creates a dialog to confirm that the user is ok to start setting up a new user.
*