Commit b0117dcb authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS PhoneHub] Fix crash in debug UI

Issue was caused by trying to read a "phoneName" field as part of the
phone status, but that field is part of another API call. This was
mistakenly left in by an earlier CL.

Bug: 1106937
Change-Id: Ia6b2123921955354e96115d8334b915011384ece
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417291
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarRegan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808088}
parent 6ab54f81
...@@ -234,9 +234,6 @@ void MultidevicePhoneHubHandler::HandleSetFakePhoneStatus( ...@@ -234,9 +234,6 @@ void MultidevicePhoneHubHandler::HandleSetFakePhoneStatus(
const base::DictionaryValue* phones_status_dict = nullptr; const base::DictionaryValue* phones_status_dict = nullptr;
CHECK(args->GetDictionary(0, &phones_status_dict)); CHECK(args->GetDictionary(0, &phones_status_dict));
base::string16 phone_name;
CHECK(phones_status_dict->GetString("phoneName", &phone_name));
int mobile_status_as_int; int mobile_status_as_int;
CHECK(phones_status_dict->GetInteger("mobileStatus", &mobile_status_as_int)); CHECK(phones_status_dict->GetInteger("mobileStatus", &mobile_status_as_int));
auto mobile_status = static_cast<phonehub::PhoneStatusModel::MobileStatus>( auto mobile_status = static_cast<phonehub::PhoneStatusModel::MobileStatus>(
......
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