Skip to content

Commit

Permalink
Do not show adapter discoverable toast when in kiosk app mode
Browse files Browse the repository at this point in the history
Return early if we are running in AppMode when trying to show the
`kBluetoothAdapterDiscoverable` toast.

Buganizer issue: b/219804107

Change-Id: Ia3104209bdeddce2075749f5f715626207882fdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565138
Reviewed-by: Alex Newcomer <newcomer@chromium.org>
Commit-Queue: Kevin Radtke <kradtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988109}
  • Loading branch information
Kevin Radtke authored and Chromium LUCI CQ committed Apr 1, 2022
1 parent 39aa779 commit e91cbfe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ash/system/bluetooth/bluetooth_notification_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "ash/public/cpp/system_tray_client.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/services/nearby/public/cpp/nearby_client_uuids.h"
#include "ash/session/session_controller_impl.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/model/system_tray_model.h"
Expand Down Expand Up @@ -308,6 +309,10 @@ void BluetoothNotificationController::OnGetAdapter(
}

void BluetoothNotificationController::NotifyAdapterDiscoverable() {
// Do not show toast in kiosk app mode.
if (Shell::Get()->session_controller()->IsRunningInAppMode())
return;

// If Nearby Share has made the local device discoverable, do not
// unnecessarily display this toast.
// TODO(crbug.com/1155669): Generalize this logic to prevent leaking Nearby
Expand Down

0 comments on commit e91cbfe

Please sign in to comment.