New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 764819 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 0
Type: Bug

Blocking:
issue 741962



Sign in to add a comment

Chrome reads IsPowered from bluez before bluez initializes its correct value

Project Member Reported by sonnysasaka@chromium.org, Sep 13 2017

Issue description

When saving to local state pref, Chrome reads bluez's IsPowered before bluez initializes its correct value.
 
Blocking: 741962
Cc: mcchou@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/07ec3391d61597f476afdcd8c240545024a7ad0e

commit 07ec3391d61597f476afdcd8c240545024a7ad0e
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Sep 14 22:58:53 2017

Delay running bluetooth tasks until bluez has finished power initialization.

Bluez doesn't currently have a signal to indicate that it has finished
initialization, but empirically most of the time it finishes power
initialization less than 200 ms after adapter registration. So giving it
1000 ms delay is safe enough.

BUG= 764819 
TEST=Remove the chromebook's local state (rm /home/chronos/Local State),
enable bluetooth directly from bluez (bluetoothctl power on), reboot and
verify that Chrome saves the correct value after bluez power
initialization.

Change-Id: I5d439c8993f7105bd788263bfe5898b81d241530
Reviewed-on: https://chromium-review.googlesource.com/667413
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502079}
[modify] https://crrev.com/07ec3391d61597f476afdcd8c240545024a7ad0e/ash/system/bluetooth/bluetooth_power_controller.cc

Labels: Merge-Request-61 Merge-Request-62
Labels: -Merge-Request-62 Merge-Approved-62
Merge approved for 62, please verify this CL makes it through the Chrome OS PFQ before merging, the branch has no PFQ protection.
Labels: -Merge-Request-61 Merge-Approved-61
Approving merge to M61.
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 15 2017

Labels: -merge-approved-62 merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/53d750a8b98d461056f6e8144ccffb6e5201b53d

commit 53d750a8b98d461056f6e8144ccffb6e5201b53d
Author: Alexander Alekseev <alemate@chromium.org>
Date: Fri Sep 15 23:02:52 2017

Delay running bluetooth tasks until bluez has finished power initialization.

Bluez doesn't currently have a signal to indicate that it has finished
initialization, but empirically most of the time it finishes power
initialization less than 200 ms after adapter registration. So giving it
1000 ms delay is safe enough.

BUG= 764819 
TEST=Remove the chromebook's local state (rm /home/chronos/Local State),
enable bluetooth directly from bluez (bluetoothctl power on), reboot and
verify that Chrome saves the correct value after bluez power
initialization.

TBR=sonnysasaka@chromium.org

(cherry picked from commit 07ec3391d61597f476afdcd8c240545024a7ad0e)

Change-Id: I5d439c8993f7105bd788263bfe5898b81d241530
Reviewed-on: https://chromium-review.googlesource.com/667413
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#502079}
Reviewed-on: https://chromium-review.googlesource.com/669482
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/branch-heads/3202@{#269}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/53d750a8b98d461056f6e8144ccffb6e5201b53d/ash/system/bluetooth/bluetooth_power_controller.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 15 2017

Labels: -merge-approved-61 merge-merged-3163
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/321bf348f8612f18cf278a4d0d16f3a4d4620a84

commit 321bf348f8612f18cf278a4d0d16f3a4d4620a84
Author: Alexander Alekseev <alemate@chromium.org>
Date: Fri Sep 15 23:05:44 2017

Delay running bluetooth tasks until bluez has finished power initialization.

Bluez doesn't currently have a signal to indicate that it has finished
initialization, but empirically most of the time it finishes power
initialization less than 200 ms after adapter registration. So giving it
1000 ms delay is safe enough.

BUG= 764819 
TEST=Remove the chromebook's local state (rm /home/chronos/Local State),
enable bluetooth directly from bluez (bluetoothctl power on), reboot and
verify that Chrome saves the correct value after bluez power
initialization.

TBR=sonnysasaka@chromium.org

(cherry picked from commit 07ec3391d61597f476afdcd8c240545024a7ad0e)

Change-Id: I5d439c8993f7105bd788263bfe5898b81d241530
Reviewed-on: https://chromium-review.googlesource.com/667413
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#502079}
Reviewed-on: https://chromium-review.googlesource.com/669806
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#1210}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/321bf348f8612f18cf278a4d0d16f3a4d4620a84/ash/system/bluetooth/bluetooth_power_controller.cc

Status: Fixed (was: Assigned)

Sign in to add a comment