Fix crashes with OPP profile in Settings app.
Change-Id: I712667f11c0de849da48add912421dfca3e85484
This commit is contained in:
committed by
Jake Hamby
parent
436b29e68e
commit
98fc5e2570
@@ -16,10 +16,11 @@
|
|||||||
|
|
||||||
package com.android.settings.bluetooth;
|
package com.android.settings.bluetooth;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
|
|
||||||
import android.bluetooth.BluetoothClass;
|
import android.bluetooth.BluetoothClass;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
|
import android.bluetooth.BluetoothProfile;
|
||||||
import com.android.settings.R;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OppProfile handles Bluetooth OPP.
|
* OppProfile handles Bluetooth OPP.
|
||||||
@@ -48,7 +49,7 @@ final class OppProfile implements LocalBluetoothProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getConnectionStatus(BluetoothDevice device) {
|
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) {
|
public boolean isPreferred(BluetoothDevice device) {
|
||||||
@@ -56,7 +57,7 @@ final class OppProfile implements LocalBluetoothProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getPreferred(BluetoothDevice device) {
|
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) {
|
public void setPreferred(BluetoothDevice device, boolean preferred) {
|
||||||
|
Reference in New Issue
Block a user