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

Commit 45ff273e authored by Thomas Stuart's avatar Thomas Stuart
Browse files

update the BIND_TELECOM_CONNECTION_SERVICE error msg

The error message in PhoneAccountRegistrar#registerPhoneAccount is
outdated with the new development in U. Starting in U, apps do not
need a ConnectionService in order to register a PhoneAccount. This
is due to the fact that there is a new way of managing calls via a
transactional way. Apps indicate this with the PhoneAccount capability
called CAPABILITY_SUPPORTS_TRANSACTIONAL_OPERATIONS.

bug: 263413874
Test: manual
Change-Id: I189af17db5fc7c664ec7d148882a3c02accda5b8
parent a8618ee9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -878,8 +878,12 @@ public class PhoneAccountRegistrar {
            Log.w(this,
                    "Phone account %s does not have BIND_TELECOM_CONNECTION_SERVICE permission.",
                    account.getAccountHandle());
            throw new SecurityException("PhoneAccount connection service requires "
                    + "BIND_TELECOM_CONNECTION_SERVICE permission.");
            throw new SecurityException("Registering a PhoneAccount requires either: "
                    + "(1) The Service definition requires that the ConnectionService is guarded"
                    + " with the BIND_TELECOM_CONNECTION_SERVICE, which can be defined using the"
                    + " android:permission tag as part of the Service definition. "
                    + "(2) The PhoneAccount capability called"
                    + " CAPABILITY_SUPPORTS_TRANSACTIONAL_OPERATIONS.");
        }
        enforceCharacterLimit(account);
        enforceIconSizeLimit(account);