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

Commit e3d8245f authored by Santos Cordon's avatar Santos Cordon
Browse files

Remove config variable to disable connection service APIs

Bug: 17445268
Change-Id: I152225ffdb81dafb9bd972d7294f05a8e6e0c746
parent f1863270
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -43,8 +43,4 @@
         if this package has not registered any accounts, then it will be ignored.
         [DO NOT TRANSLATE] -->
    <string name="default_connection_manager_component" translatable="false"></string>

    <!-- Flag indicating that wi-fi calling through a connection manager is supported.
         [DO NOT TRANSLATE] -->
    <bool name="connection_manager_enabled" translatable="false">true</bool>
</resources>
+0 −7
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.server.telecom;

import android.content.Context;
import android.telecom.ParcelableConnection;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
@@ -177,12 +176,6 @@ final class CreateConnectionProcessor {
    }

    private boolean shouldSetConnectionManager() {
        Context context = TelecomApp.getInstance();
        if (!context.getResources().getBoolean(R.bool.connection_manager_enabled)) {
            // Connection Manager support has been turned off, disregard.
            return false;
        }

        if (mAttemptRecords.size() == 0) {
            return false;
        }
+2 −17
Original line number Diff line number Diff line
@@ -183,10 +183,6 @@ public final class PhoneAccountRegistrar {
    }

    public void setSimCallManager(PhoneAccountHandle callManager) {
        if (!isEnabledConnectionManager()) {
            return;
        }

        if (callManager != null) {
            PhoneAccount callManagerAccount = getPhoneAccount(callManager);
            if (callManagerAccount == null) {
@@ -207,10 +203,6 @@ public final class PhoneAccountRegistrar {
    }

    public PhoneAccountHandle getSimCallManager() {
        if (!isEnabledConnectionManager()) {
            return null;
        }

        if (mState.simCallManager != null) {
            if (NO_ACCOUNT_SELECTED.equals(mState.simCallManager)) {
                return null;
@@ -308,12 +300,9 @@ public final class PhoneAccountRegistrar {
     * @return The phone account handles.
     */
    public List<PhoneAccountHandle> getConnectionManagerPhoneAccounts() {
        if (isEnabledConnectionManager()) {
        return getPhoneAccountHandles(PhoneAccount.CAPABILITY_CONNECTION_MANAGER,
                null /* supportedUriScheme */, false /* includeDisabled */);
    }
        return Collections.emptyList();
    }

    public PhoneAccount getPhoneAccount(PhoneAccountHandle handle) {
        for (PhoneAccount m : mState.accounts) {
@@ -470,10 +459,6 @@ public final class PhoneAccountRegistrar {
        }
    }

    private boolean isEnabledConnectionManager() {
        return mContext.getResources().getBoolean(R.bool.connection_manager_enabled);
    }

    /**
     * Determines if the connection service specified by a {@link PhoneAccountHandle} has the
     * {@link Manifest.permission#BIND_CONNECTION_SERVICE} permission.