public javax.obex.PasswordAuthentication | onAuthenticationChallenge(java.lang.String description, boolean isUserIdRequired, boolean isFullAccess)
PasswordAuthentication pa = null;
mReplied = false;
Log.d(TAG, "onAuthenticationChallenge: sending request");
mCallback.obtainMessage(BluetoothPbapObexSession.OBEX_SESSION_AUTHENTICATION_REQUEST)
.sendToTarget();
synchronized (this) {
while (!mReplied) {
try {
Log.v(TAG, "onAuthenticationChallenge: waiting for response");
this.wait();
} catch (InterruptedException e) {
Log.e(TAG, "Interrupted while waiting for challenge response");
}
}
}
if (mSessionKey != null && mSessionKey.length() != 0) {
Log.v(TAG, "onAuthenticationChallenge: mSessionKey=" + mSessionKey);
pa = new PasswordAuthentication(null, mSessionKey.getBytes());
} else {
Log.v(TAG, "onAuthenticationChallenge: mSessionKey is empty, timeout/cancel occured");
}
return pa;
|