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

Commit cf2a3643 authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "Remove config variable to disable connection service APIs" into lmp-dev

parents ee9649b8 e3d8245f
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.