From 45ae04ab7b02fe8c7a6f2831aeec2e2c8e0cbc6f Mon Sep 17 00:00:00 2001 From: Jeremy Klein Date: Fri, 5 Feb 2016 10:37:32 -0800 Subject: [PATCH] Fix a small issue with the BT Tether callback value. It was incorrect when disabling bt tethering. Note that this had no practical effect because there's no callback for disabling, but the change is good for readability's sake. Change-Id: Id80de58b24e94ec5a8ee38d94fb3016ae7835e43 --- .../core/java/com/android/server/connectivity/Tethering.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java index a73a67a9ca7d9..760b21819420c 100644 --- a/services/core/java/com/android/server/connectivity/Tethering.java +++ b/services/core/java/com/android/server/connectivity/Tethering.java @@ -451,7 +451,7 @@ public class Tethering extends BaseNetworkObserver { ((BluetoothPan) proxy).setBluetoothTethering(enable); // TODO: Enabling bluetooth tethering can fail asynchronously here. // We should figure out a way to bubble up that failure instead of sending success. - int result = ((BluetoothPan) proxy).isTetheringOn() ? + int result = ((BluetoothPan) proxy).isTetheringOn() == enable ? ConnectivityManager.TETHER_ERROR_NO_ERROR : ConnectivityManager.TETHER_ERROR_MASTER_ERROR; sendTetherResult(receiver, result);