Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80d66255 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Control PBAP Client logging with setprop" am: b98357ae

parents 0db15220 b98357ae
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@ import android.os.Bundle;
import android.util.Log;

public class Authenticator extends AbstractAccountAuthenticator {
    private static final String TAG = "PbapAuthenticator";
    private static final boolean DBG = Utils.DBG;
    private static final String TAG = "PbapClientAuthenticator";
    private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);

    public Authenticator(Context context) {
        super(context);
+7 −6
Original line number Diff line number Diff line
@@ -31,8 +31,9 @@ import java.util.Arrays;
 */
class BluetoothPbapObexAuthenticator implements Authenticator {

    private static final String TAG = "BtPbapObexAuthenticator";
    private static final boolean DBG = Utils.DBG;
    private static final String TAG = "PbapClientObexAuth";
    private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
    private static final boolean VDBG = Log.isLoggable(TAG, Log.VERBOSE);

    //Default session key for legacy devices is 0000
    @VisibleForTesting
@@ -48,14 +49,14 @@ class BluetoothPbapObexAuthenticator implements Authenticator {
    public PasswordAuthentication onAuthenticationChallenge(String description,
            boolean isUserIdRequired, boolean isFullAccess) {
        PasswordAuthentication pa = null;
        if (DBG) Log.v(TAG, "onAuthenticationChallenge: starting");
        if (DBG) Log.d(TAG, "onAuthenticationChallenge: starting");

        if (mSessionKey != null && mSessionKey.length() != 0) {
            if (DBG) Log.v(TAG, "onAuthenticationChallenge: mSessionKey=" + mSessionKey);
            if (DBG) Log.d(TAG, "onAuthenticationChallenge: mSessionKey=" + mSessionKey);
            pa = new PasswordAuthentication(null, mSessionKey.getBytes());
        } else {
            if (DBG) {
                Log.v(TAG,
                Log.d(TAG,
                        "onAuthenticationChallenge: mSessionKey is empty, timeout/cancel occured");
            }
        }
@@ -65,7 +66,7 @@ class BluetoothPbapObexAuthenticator implements Authenticator {

    @Override
    public byte[] onAuthenticationResponse(byte[] userName) {
        if (DBG) Log.v(TAG, "onAuthenticationResponse: " + Arrays.toString(userName));
        if (VDBG) Log.v(TAG, "onAuthenticationResponse: " + Arrays.toString(userName));
        /* required only in case PCE challenges PSE which we don't do now */
        return null;
    }
+2 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ import java.io.InputStream;

abstract class BluetoothPbapRequest {

    private static final String TAG = "BluetoothPbapRequest";
    private static final boolean DBG = Utils.DBG;
    static final String TAG = "PbapClient.BaseRequest";
    private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);

    protected static final byte OAP_TAGID_ORDER = 0x01;
    protected static final byte OAP_TAGID_SEARCH_VALUE = 0x02;
+2 −4
Original line number Diff line number Diff line
@@ -28,10 +28,8 @@ import java.io.InputStream;
import java.util.ArrayList;

final class BluetoothPbapRequestPullPhoneBook extends BluetoothPbapRequest {

    private static final boolean VDBG = Utils.VDBG;

    private static final String TAG = "BtPbapReqPullPhoneBook";
    private static final String TAG = "PbapClient.PullPb";
    private static final boolean VDBG = Log.isLoggable(TAG, Log.VERBOSE);

    private static final String TYPE = "x-bt/phonebook";

+2 −4
Original line number Diff line number Diff line
@@ -22,10 +22,8 @@ import com.android.bluetooth.ObexAppParameters;
import com.android.obex.HeaderSet;

final class BluetoothPbapRequestPullPhoneBookSize extends BluetoothPbapRequest {

    private static final boolean VDBG = Utils.VDBG;

    private static final String TAG = "BtPbapReqPullPhoneBookSize";
    private static final String TAG = "PbapClient.PullPbSize";
    private static final boolean VDBG = Log.isLoggable(TAG, Log.VERBOSE);

    private static final String TYPE = "x-bt/phonebook";

Loading