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

Commit c87c400b authored by Sanket Agarwal's avatar Sanket Agarwal Committed by Gerrit Code Review
Browse files

Merge "Remove contacts at shutdown."

parents caad481d ac430171
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -101,8 +101,9 @@ class PbapClientConnectionHandler extends Handler {
                     * connect via an OBEX session */
                    mSocket = mDevice.createRfcommSocketToServiceRecord(
                            BluetoothUuid.PBAP_PSE.getUuid());
                    if (DBG) Log.d(TAG, "Socket created.");
                    mSocket.connect();

                    if (DBG) Log.d(TAG, "Socket connected.");
                    BluetoothPbapObexTransport transport;
                    transport = new BluetoothPbapObexTransport(mSocket);

@@ -131,14 +132,17 @@ class PbapClientConnectionHandler extends Handler {
                break;

            case MSG_DISCONNECT:
                if (DBG) Log.d(TAG,"Starting Disconnect");
                try {
                    if (mObexSession != null) {
                        mObexSession.disconnect(null);
                    }
                    if (DBG) Log.d(TAG, "Closing Socket");
                    closeSocket();
                } catch (IOException e) {
                    Log.w(TAG,"DISCONNECT Failure " + e.toString());
                    Log.w(TAG, "DISCONNECT Failure ", e);
                }
                Log.d(TAG, "Completing Disconnect");
                removeAccount(mAccount);
                mContext.getContentResolver()
                        .delete(CallLog.Calls.CONTENT_URI, null, null);
+5 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ final class PbapClientStateMachine extends StateMachine {
        mConnecting = new Connecting();
        mDisconnecting = new Disconnecting();
        mConnected = new Connected();
        removeUncleanAccounts();

        addState(mDisconnected);
        addState(mConnecting);
@@ -353,6 +354,10 @@ final class PbapClientStateMachine extends StateMachine {
    }

    void doQuit() {
        removeUncleanAccounts();
        if (mHandlerThread != null) {
            mHandlerThread.quitSafely();
        }
        quitNow();
    }