Loading src/com/android/server/telecom/CreateConnectionProcessor.java +5 −5 Original line number Diff line number Diff line Loading @@ -171,20 +171,20 @@ final class CreateConnectionProcessor { if (!mPhoneAccountRegistrar.phoneAccountRequiresBindPermission( attempt.connectionManagerPhoneAccount)) { Log.w(this, "Connection mgr does not have BIND_CONNECTION_SERVICE for attempt: %s", attempt); "Connection mgr does not have BIND_TELECOM_CONNECTION_SERVICE for " + "attempt: %s", attempt); attemptNextPhoneAccount(); return; } // If the target PhoneAccount differs from the ConnectionManager phone acount, ensure it // also requires the BIND_CONNECTION_SERVICE permission. // also requires the BIND_TELECOM_CONNECTION_SERVICE permission. if (!attempt.connectionManagerPhoneAccount.equals(attempt.targetPhoneAccount) && !mPhoneAccountRegistrar.phoneAccountRequiresBindPermission( attempt.targetPhoneAccount)) { Log.w(this, "Target PhoneAccount does not have BIND_CONNECTION_SERVICE for attempt: %s", attempt); "Target PhoneAccount does not have BIND_TELECOM_CONNECTION_SERVICE for " + "attempt: %s", attempt); attemptNextPhoneAccount(); return; } Loading src/com/android/server/telecom/PhoneAccountRegistrar.java +15 −6 Original line number Diff line number Diff line Loading @@ -470,10 +470,11 @@ public final class PhoneAccountRegistrar { // Enforce the requirement that a connection service for a phone account has the correct // permission. if (!phoneAccountRequiresBindPermission(account.getAccountHandle())) { Log.w(this, "Phone account %s does not have BIND_CONNECTION_SERVICE permission.", Log.w(this, "Phone account %s does not have BIND_TELECOM_CONNECTION_SERVICE permission.", account.getAccountHandle()); throw new SecurityException( "PhoneAccount connection service requires BIND_CONNECTION_SERVICE permission."); throw new SecurityException("PhoneAccount connection service requires " + "BIND_TELECOM_CONNECTION_SERVICE permission."); } addOrReplacePhoneAccount(account); Loading Loading @@ -569,7 +570,7 @@ public final class PhoneAccountRegistrar { /** * Determines if the connection service specified by a {@link PhoneAccountHandle} requires the * {@link Manifest.permission#BIND_CONNECTION_SERVICE} permission. * {@link Manifest.permission#BIND_TELECOM_CONNECTION_SERVICE} permission. * * @param phoneAccountHandle The phone account to check. * @return {@code True} if the phone account has permission. Loading @@ -582,8 +583,16 @@ public final class PhoneAccountRegistrar { } for (ResolveInfo resolveInfo : resolveInfos) { ServiceInfo serviceInfo = resolveInfo.serviceInfo; if (serviceInfo == null || !Manifest.permission.BIND_CONNECTION_SERVICE.equals(serviceInfo.permission)) { if (serviceInfo == null) { return false; } if (!Manifest.permission.BIND_CONNECTION_SERVICE.equals(serviceInfo.permission) && !Manifest.permission.BIND_TELECOM_CONNECTION_SERVICE.equals( serviceInfo.permission)) { // The ConnectionService must require either the deprecated BIND_CONNECTION_SERVICE, // or the public BIND_TELECOM_CONNECTION_SERVICE permissions, both of which are // system/signature only. return false; } } Loading testapps/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -34,14 +34,14 @@ <!-- Miscellaneous telecom app-related test activities. --> <service android:name="com.android.server.telecom.testapps.TestConnectionService" android:permission="android.permission.BIND_CONNECTION_SERVICE" > android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" > <intent-filter> <action android:name="android.telecom.ConnectionService" /> </intent-filter> </service> <service android:name="com.android.server.telecom.testapps.TestConnectionManager" android:permission="android.permission.BIND_CONNECTION_SERVICE" > android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" > <intent-filter> <action android:name="android.telecom.ConnectionService" /> </intent-filter> Loading Loading
src/com/android/server/telecom/CreateConnectionProcessor.java +5 −5 Original line number Diff line number Diff line Loading @@ -171,20 +171,20 @@ final class CreateConnectionProcessor { if (!mPhoneAccountRegistrar.phoneAccountRequiresBindPermission( attempt.connectionManagerPhoneAccount)) { Log.w(this, "Connection mgr does not have BIND_CONNECTION_SERVICE for attempt: %s", attempt); "Connection mgr does not have BIND_TELECOM_CONNECTION_SERVICE for " + "attempt: %s", attempt); attemptNextPhoneAccount(); return; } // If the target PhoneAccount differs from the ConnectionManager phone acount, ensure it // also requires the BIND_CONNECTION_SERVICE permission. // also requires the BIND_TELECOM_CONNECTION_SERVICE permission. if (!attempt.connectionManagerPhoneAccount.equals(attempt.targetPhoneAccount) && !mPhoneAccountRegistrar.phoneAccountRequiresBindPermission( attempt.targetPhoneAccount)) { Log.w(this, "Target PhoneAccount does not have BIND_CONNECTION_SERVICE for attempt: %s", attempt); "Target PhoneAccount does not have BIND_TELECOM_CONNECTION_SERVICE for " + "attempt: %s", attempt); attemptNextPhoneAccount(); return; } Loading
src/com/android/server/telecom/PhoneAccountRegistrar.java +15 −6 Original line number Diff line number Diff line Loading @@ -470,10 +470,11 @@ public final class PhoneAccountRegistrar { // Enforce the requirement that a connection service for a phone account has the correct // permission. if (!phoneAccountRequiresBindPermission(account.getAccountHandle())) { Log.w(this, "Phone account %s does not have BIND_CONNECTION_SERVICE permission.", Log.w(this, "Phone account %s does not have BIND_TELECOM_CONNECTION_SERVICE permission.", account.getAccountHandle()); throw new SecurityException( "PhoneAccount connection service requires BIND_CONNECTION_SERVICE permission."); throw new SecurityException("PhoneAccount connection service requires " + "BIND_TELECOM_CONNECTION_SERVICE permission."); } addOrReplacePhoneAccount(account); Loading Loading @@ -569,7 +570,7 @@ public final class PhoneAccountRegistrar { /** * Determines if the connection service specified by a {@link PhoneAccountHandle} requires the * {@link Manifest.permission#BIND_CONNECTION_SERVICE} permission. * {@link Manifest.permission#BIND_TELECOM_CONNECTION_SERVICE} permission. * * @param phoneAccountHandle The phone account to check. * @return {@code True} if the phone account has permission. Loading @@ -582,8 +583,16 @@ public final class PhoneAccountRegistrar { } for (ResolveInfo resolveInfo : resolveInfos) { ServiceInfo serviceInfo = resolveInfo.serviceInfo; if (serviceInfo == null || !Manifest.permission.BIND_CONNECTION_SERVICE.equals(serviceInfo.permission)) { if (serviceInfo == null) { return false; } if (!Manifest.permission.BIND_CONNECTION_SERVICE.equals(serviceInfo.permission) && !Manifest.permission.BIND_TELECOM_CONNECTION_SERVICE.equals( serviceInfo.permission)) { // The ConnectionService must require either the deprecated BIND_CONNECTION_SERVICE, // or the public BIND_TELECOM_CONNECTION_SERVICE permissions, both of which are // system/signature only. return false; } } Loading
testapps/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -34,14 +34,14 @@ <!-- Miscellaneous telecom app-related test activities. --> <service android:name="com.android.server.telecom.testapps.TestConnectionService" android:permission="android.permission.BIND_CONNECTION_SERVICE" > android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" > <intent-filter> <action android:name="android.telecom.ConnectionService" /> </intent-filter> </service> <service android:name="com.android.server.telecom.testapps.TestConnectionManager" android:permission="android.permission.BIND_CONNECTION_SERVICE" > android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" > <intent-filter> <action android:name="android.telecom.ConnectionService" /> </intent-filter> Loading