Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java

Issue 2708513002: bluetooth: Post a task when sending GATT events to simulate another thread. (Closed)
Patch Set: Remove unnecessary if statement Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
index ebe9f07ecc17dd9bfd3766920daa0b82ac47fb17..5ef691323b78b9b97b3d95102d4951adb5d92fab 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
@@ -10,7 +10,6 @@ import android.content.Context;
import android.os.Build;
import org.chromium.base.Log;
-import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.metrics.RecordHistogram;
@@ -144,7 +143,7 @@ final class ChromeBluetoothDevice {
"Bluetooth.Web.Android.onConnectionStateChange.Status.InvalidState",
status);
}
- ThreadUtils.runOnUiThread(new Runnable() {
+ Wrappers.ThreadUtilsWrapper.getInstance().runOnUiThread(new Runnable() {
@Override
public void run() {
if (mNativeBluetoothDeviceAndroid != 0) {
@@ -159,7 +158,7 @@ final class ChromeBluetoothDevice {
public void onServicesDiscovered(final int status) {
Log.i(TAG, "onServicesDiscovered status:%d==%s", status,
status == android.bluetooth.BluetoothGatt.GATT_SUCCESS ? "OK" : "Error");
- ThreadUtils.runOnUiThread(new Runnable() {
+ Wrappers.ThreadUtilsWrapper.getInstance().runOnUiThread(new Runnable() {
@Override
public void run() {
if (mNativeBluetoothDeviceAndroid != 0) {
@@ -197,7 +196,7 @@ final class ChromeBluetoothDevice {
public void onCharacteristicChanged(
final Wrappers.BluetoothGattCharacteristicWrapper characteristic) {
Log.i(TAG, "device onCharacteristicChanged.");
- ThreadUtils.runOnUiThread(new Runnable() {
+ Wrappers.ThreadUtilsWrapper.getInstance().runOnUiThread(new Runnable() {
@Override
public void run() {
ChromeBluetoothRemoteGattCharacteristic chromeCharacteristic =
@@ -217,7 +216,7 @@ final class ChromeBluetoothDevice {
public void onCharacteristicRead(
final Wrappers.BluetoothGattCharacteristicWrapper characteristic,
final int status) {
- ThreadUtils.runOnUiThread(new Runnable() {
+ Wrappers.ThreadUtilsWrapper.getInstance().runOnUiThread(new Runnable() {
@Override
public void run() {
ChromeBluetoothRemoteGattCharacteristic chromeCharacteristic =
@@ -239,7 +238,7 @@ final class ChromeBluetoothDevice {
public void onCharacteristicWrite(
final Wrappers.BluetoothGattCharacteristicWrapper characteristic,
final int status) {
- ThreadUtils.runOnUiThread(new Runnable() {
+ Wrappers.ThreadUtilsWrapper.getInstance().runOnUiThread(new Runnable() {
@Override
public void run() {
ChromeBluetoothRemoteGattCharacteristic chromeCharacteristic =
@@ -260,7 +259,7 @@ final class ChromeBluetoothDevice {
@Override
public void onDescriptorRead(
final Wrappers.BluetoothGattDescriptorWrapper descriptor, final int status) {
- ThreadUtils.runOnUiThread(new Runnable() {
+ Wrappers.ThreadUtilsWrapper.getInstance().runOnUiThread(new Runnable() {
@Override
public void run() {
ChromeBluetoothRemoteGattDescriptor chromeDescriptor =
@@ -281,7 +280,7 @@ final class ChromeBluetoothDevice {
@Override
public void onDescriptorWrite(
final Wrappers.BluetoothGattDescriptorWrapper descriptor, final int status) {
- ThreadUtils.runOnUiThread(new Runnable() {
+ Wrappers.ThreadUtilsWrapper.getInstance().runOnUiThread(new Runnable() {
@Override
public void run() {
ChromeBluetoothRemoteGattDescriptor chromeDescriptor =
« no previous file with comments | « no previous file | device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698