Methods Summary |
---|
public int | compareTo(android.preference.Preference another)
if (!(another instanceof BluetoothDevicePreference)) {
// Put other preference types above us
return 1;
}
return mLocalDevice.compareTo(((BluetoothDevicePreference) another).mLocalDevice);
|
public LocalBluetoothDevice | getDevice()
return mLocalDevice;
|
public boolean | isEnabled()
return super.isEnabled() && !mIsBusy;
|
protected void | onBindView(android.view.View view)
super.onBindView(view);
ImageView btClass = (ImageView) view.findViewById(R.id.btClass);
btClass.setImageResource(mLocalDevice.getBtClassDrawable());
btClass.setAlpha(isEnabled() ? 255 : sDimAlpha);
|
public void | onDeviceAttributesChanged(LocalBluetoothDevice device)
/*
* The preference framework takes care of making sure the value has
* changed before proceeding.
*/
setTitle(mLocalDevice.getName());
/*
* TODO: Showed "Paired" even though it was "Connected". This may be
* related to BluetoothHeadset not bound to the actual
* BluetoothHeadsetService when we got here.
*/
setSummary(mLocalDevice.getSummary());
// Used to gray out the item
mIsBusy = mLocalDevice.isBusy();
// Data has changed
notifyChanged();
// This could affect ordering, so notify that also
notifyHierarchyChanged();
|
protected void | onPrepareForRemoval()
super.onPrepareForRemoval();
mLocalDevice.unregisterCallback(this);
|