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

Commit 68d1a6b0 authored by Santos Cordon's avatar Santos Cordon
Browse files

Move BluetoothPhoneService to telecom.

BluetoothPhoneService needs to be in telecom to be aware of all types of
calls.  While in telephony, there's no way for it to know about
third-party sourced calls.

Additionally, conference calls for CDMA are no longer functional in the
telephony layer and needs to move to telecom to support BT commands on
CDMA calls.

Bug: 17475562
Change-Id: I443431291a3b0120d92b52dba2acca17a4c0c983
parent ad3355a3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -212,6 +212,5 @@
            android:exported="false">
        </receiver>


    </application>
</manifest>
+567 −0

File added.

Preview size limit exceeded, changes collapsed.

+24 −0
Original line number Diff line number Diff line
@@ -299,6 +299,14 @@ public final class CallsManager extends Call.ListenerBase {
        return mTtyManager.getCurrentTtyMode();
    }

    void addListener(CallsManagerListener listener) {
        mListeners.add(listener);
    }

    void removeListener(CallsManagerListener listener) {
        mListeners.remove(listener);
    }

    /**
     * Starts the process to attach the call to a connection service.
     *
@@ -794,6 +802,22 @@ public final class CallsManager extends Call.ListenerBase {
        return true;
    }

    Call getRingingCall() {
        return getFirstCallWithState(CallState.RINGING);
    }

    Call getActiveCall() {
        return getFirstCallWithState(CallState.ACTIVE);
    }

    Call getDialingOrConnectingCall() {
        return getFirstCallWithState(CallState.DIALING, CallState.CONNECTING);
    }

    Call getHeldCall() {
        return getFirstCallWithState(CallState.ON_HOLD);
    }

    Call getFirstCallWithState(int... states) {
        return getFirstCallWithState(null, states);
    }
+4 −1
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@ import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.UserHandle;
import android.os.ServiceManager;
import android.os.UserHandle;

/**
 * Top-level Application class for Telecom.
@@ -67,6 +67,9 @@ public final class TelecomApp extends Application {
            mTelecomService = new TelecomServiceImpl(mMissedCallNotifier, mPhoneAccountRegistrar,
                    mCallsManager, this);
            ServiceManager.addService(Context.TELECOM_SERVICE, mTelecomService);

            // Start the BluetoothPhoneService
            BluetoothPhoneService.start(this);
        }
    }