Commit cd2fe26e authored by Wenzhao Zang's avatar Wenzhao Zang Committed by Commit Bot

cros: Customize wrong password alert message in tablet mode

A small customization: in tablet mode, it doesn't make sense to display
a message related to a keyboard shortcut.

Bug: 887984
Change-Id: Ife9dbd11a0077b3c8001124b0224d50eac683b9c
Reviewed-on: https://chromium-review.googlesource.com/1242079Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594789}
parent eb751802
......@@ -35,6 +35,7 @@
#include "ash/system/status_area_widget.h"
#include "ash/system/status_area_widget_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/wm/tablet_mode/tablet_mode_controller.h"
#include "base/command_line.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
......@@ -212,6 +213,12 @@ bool IsPublicAccountUser(const mojom::LoginUserInfoPtr& user) {
return user->basic_user_info->type == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
}
bool IsTabletMode() {
return Shell::Get()
->tablet_mode_controller()
->IsTabletModeWindowManagerEnabled();
}
//
// Computes a layout described as follows:
//
......@@ -1483,8 +1490,8 @@ void LockContentsView::ShowAuthErrorMessage() {
base::Optional<int> bold_start;
int bold_length = 0;
// Display a hint to switch keyboards if there are other active input
// methods.
if (ime_controller->available_imes().size() > 1) {
// methods in clamshell mode.
if (ime_controller->available_imes().size() > 1 && !IsTabletMode()) {
error_text += base::ASCIIToUTF16(" ");
bold_start = error_text.length();
base::string16 shortcut =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment