Remove config variable to disable connection service APIs

Bug: 17445268
Change-Id: I152225ffdb81dafb9bd972d7294f05a8e6e0c746
This commit is contained in:
Santos Cordon 2014-09-15 13:44:29 -07:00
parent f1863270a8
commit e3d8245f09
3 changed files with 2 additions and 28 deletions

View File

@ -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>

View File

@ -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;
}

View File

@ -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,11 +300,8 @@ 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();
return getPhoneAccountHandles(PhoneAccount.CAPABILITY_CONNECTION_MANAGER,
null /* supportedUriScheme */, false /* includeDisabled */);
}
public PhoneAccount getPhoneAccount(PhoneAccountHandle handle) {
@ -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.