am e714898a: Merge "OutOfband pairing user dialog." into gingerbread

Merge commit 'e714898a1abfd828a239e1be7b3f75e2a3cc2120' into gingerbread-plus-aosp

* commit 'e714898a1abfd828a239e1be7b3f75e2a3cc2120':
  OutOfband pairing user dialog.
This commit is contained in:
Jaikumar Ganesh
2010-09-13 11:52:15 -07:00
committed by Android Git Automerger

View File

@@ -114,6 +114,8 @@ public class BluetoothPairingDialog extends AlertActivity implements DialogInter
} }
mPasskey = String.format("%06d", passkey); mPasskey = String.format("%06d", passkey);
createDisplayPasskeyDialog(); createDisplayPasskeyDialog();
} else if (mType == BluetoothDevice.PAIRING_VARIANT_OOB_CONSENT) {
createConsentDialog();
} else { } else {
Log.e(TAG, "Incorrect pairing type received, not showing any dialog"); Log.e(TAG, "Incorrect pairing type received, not showing any dialog");
} }
@@ -171,6 +173,9 @@ public class BluetoothPairingDialog extends AlertActivity implements DialogInter
} else if (mType == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY) { } else if (mType == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY) {
mPairingView.setVisibility(View.GONE); mPairingView.setVisibility(View.GONE);
messageView.setText(getString(R.string.bluetooth_display_passkey_msg, name, mPasskey)); messageView.setText(getString(R.string.bluetooth_display_passkey_msg, name, mPasskey));
} else if (mType == BluetoothDevice.PAIRING_VARIANT_OOB_CONSENT) {
mPairingView.setVisibility(View.GONE);
messageView.setText(getString(R.string.bluetooth_incoming_pairing_msg, name));
} else { } else {
Log.e(TAG, "Incorrect pairing type received, not creating view"); Log.e(TAG, "Incorrect pairing type received, not creating view");
} }
@@ -247,6 +252,8 @@ public class BluetoothPairingDialog extends AlertActivity implements DialogInter
mDevice.setPairingConfirmation(true); mDevice.setPairingConfirmation(true);
} else if (mType == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY) { } else if (mType == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY) {
// Do Nothing. // Do Nothing.
} else if (mType == BluetoothDevice.PAIRING_VARIANT_OOB_CONSENT) {
mDevice.setRemoteOutOfBandData();
} else { } else {
Log.e(TAG, "Incorrect pairing type received"); Log.e(TAG, "Incorrect pairing type received");
} }