Merge "Update icons and text for guest user"
This commit is contained in:
committed by
Android (Google) Code Review
commit
7810e62094
@@ -1377,7 +1377,7 @@
|
||||
<!-- Label for adding a new guest in the user switcher [CHAR LIMIT=35] -->
|
||||
<string name="guest_new_guest">Add guest</string>
|
||||
<!-- Label for exiting and removing the guest session in the user switcher [CHAR LIMIT=35] -->
|
||||
<string name="guest_exit_guest">Remove guest</string>
|
||||
<string name="guest_exit_guest">End guest session</string>
|
||||
<!-- Name for the guest user [CHAR LIMIT=35] -->
|
||||
<string name="guest_nickname">Guest</string>
|
||||
|
||||
|
||||
27
packages/SystemUI/res/drawable/ic_exit_to_app.xml
Normal file
27
packages/SystemUI/res/drawable/ic_exit_to_app.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<!--
|
||||
~ Copyright (C) 2020 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"/>
|
||||
|
||||
</vector>
|
||||
@@ -1096,13 +1096,13 @@
|
||||
<string name="user_new_user_name">New user</string>
|
||||
|
||||
<!-- Title of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] -->
|
||||
<string name="guest_exit_guest_dialog_title">Remove guest?</string>
|
||||
<string name="guest_exit_guest_dialog_title">End guest session?</string>
|
||||
|
||||
<!-- Message of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] -->
|
||||
<string name="guest_exit_guest_dialog_message">All apps and data in this session will be deleted.</string>
|
||||
|
||||
<!-- Label for button in confirmation dialog when exiting guest session [CHAR LIMIT=35] -->
|
||||
<string name="guest_exit_guest_dialog_remove">Remove</string>
|
||||
<string name="guest_exit_guest_dialog_remove">End session</string>
|
||||
|
||||
<!-- Title of the notification when resuming an existing guest session [CHAR LIMIT=NONE] -->
|
||||
<string name="guest_wipe_session_title">Welcome back, guest!</string>
|
||||
|
||||
@@ -691,7 +691,11 @@ public class UserSwitcherController implements Dumpable {
|
||||
if (item.isAddUser) {
|
||||
iconRes = R.drawable.ic_add_circle;
|
||||
} else if (item.isGuest) {
|
||||
iconRes = R.drawable.ic_avatar_guest_user;
|
||||
if (item.isCurrent) {
|
||||
iconRes = R.drawable.ic_exit_to_app;
|
||||
} else {
|
||||
iconRes = R.drawable.ic_avatar_guest_user;
|
||||
}
|
||||
} else {
|
||||
iconRes = R.drawable.ic_avatar_user;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public abstract class TunerService {
|
||||
dialog.setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(R.string.cancel),
|
||||
(OnClickListener) null);
|
||||
dialog.setButton(DialogInterface.BUTTON_POSITIVE,
|
||||
context.getString(R.string.guest_exit_guest_dialog_remove), new OnClickListener() {
|
||||
context.getString(R.string.qs_customize_remove), new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
// Tell the tuner (in main SysUI process) to clear all its settings.
|
||||
|
||||
Reference in New Issue
Block a user