sendDialerCode API review
1. address the feeback from API review: throw exception rather than a boolean return throw Security exception for permission denial and non-default dailer app. throw invalidStateException if telephonyServie unavaialble. 2. sendDialerCode API will only check permission and package match without enforcing the format of secret code(*#*# CODE #*#*) as throwing an unchecked exception for wrong bad format seems to be an overkill regarding the API usage. Dialer calls this API for each keyboard press to check format and send the intent altogether which is no longer appropriate if we plan to return void and will reduce frquent API calls. 3. allow callers with carrier privilege 4. not require MODIFY_PHONE_STATE as third party dialer apps won't be granted 5. TODO mark android.provider.Telephony.SECRET_CODE to be protected after calling apps move to this API. Bug:35767402 Test: Manual Change-Id: I8287aa93f2f79d356935a48cf808705d9b49984b
Loading
Please register or sign in to comment