From 98fc5e2570bb2c3bfe80532e57956ef59307a516 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Tue, 1 Mar 2011 11:25:27 -0800 Subject: [PATCH] Fix crashes with OPP profile in Settings app. Change-Id: I712667f11c0de849da48add912421dfca3e85484 --- src/com/android/settings/bluetooth/OppProfile.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/bluetooth/OppProfile.java b/src/com/android/settings/bluetooth/OppProfile.java index 7cbae37e8e3..3f7df38532b 100644 --- a/src/com/android/settings/bluetooth/OppProfile.java +++ b/src/com/android/settings/bluetooth/OppProfile.java @@ -16,10 +16,11 @@ package com.android.settings.bluetooth; +import com.android.settings.R; + import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; - -import com.android.settings.R; +import android.bluetooth.BluetoothProfile; /** * OppProfile handles Bluetooth OPP. @@ -48,7 +49,7 @@ final class OppProfile implements LocalBluetoothProfile { } public int getConnectionStatus(BluetoothDevice device) { - return -1; // FIXME: change to DISCONNECTED? + return BluetoothProfile.STATE_DISCONNECTED; // Settings app doesn't handle OPP } public boolean isPreferred(BluetoothDevice device) { @@ -56,7 +57,7 @@ final class OppProfile implements LocalBluetoothProfile { } public int getPreferred(BluetoothDevice device) { - return -1; // FIXME: is this correct? + return BluetoothProfile.PRIORITY_OFF; // Settings app doesn't handle OPP } public void setPreferred(BluetoothDevice device, boolean preferred) {