5d351b96ea07a6e963ce1ccd0cb6fbf034866078 |
|
29-Jul-2016 |
Ta-wei Yen <twyen@google.com> |
Fix NPE on phone boot and SIM removal In some cases TelecomManager.getCallCapablePhoneAccounts() might return a PhoneAccountHandle with a invalid subId on boot, which will cause a NPE when trying to convert the subId back to a PhoneAccountHandle in SimChangeReceiver.processSubId(). SimChangeReceiver also might be triggered with a invalid subId that is not SubscriptionManager.INVALID_SUBSCRIPTION_ID. SubscriptionManager.isValidSubscriptionId() should be used instead of comparing with the constant. In this CL the subId is validated on the above events. PhoneAccountHandleConverter.fromSubId() will also handle invalid subId gracefully and return null. The null return value is checked in all usages. Change-Id: Ie703b1a2a826a2951e8cc90fccc6badd76928bd3 Fixes: 30474294
/packages/services/Telephony/src/com/android/phone/vvm/omtp/scheduling/RetryPolicy.java
|
016df6b594d4a5aba8c1e325a646a0bcf5d6d263 |
|
22-Jul-2016 |
Ta-wei Yen <twyen@google.com> |
Postpone error until no more retries are available Error messages generated from tasks that have retries are often short lived and not actionable. These errors should wait until no more retries are available before being shown. Before this CL, All error codes are written directly to the database when a event is triggered. After this CL, writing to the database requires a VoicemailStatus.Editor() object to be passed in. Usually the object will be the same direct-write object as before. But in retrying tasks, the object passed in will have the writes deferred until the result of the task is determined. The writes will only be committed if the task is successful or no more retries are left. Passing a error handling object deep down is not ideal. A better way will be throwing a exception back up so the task can decide how to handle it. Unfortunately, deeper codes cannot handle escaping exceptions gracefully, and changing it involves too much risk at this moment. + Subsequent activation does not show the activating message Fixes: 30284894 Change-Id: I523e8aa2f89ff3af13016eccd2392cee302e79dc
/packages/services/Telephony/src/com/android/phone/vvm/omtp/scheduling/RetryPolicy.java
|
ccb523db571855a8bcffe8e1a719d0221e01919b |
|
13-Jul-2016 |
Ta-wei Yen <twyen@google.com> |
Implement VVM Task Scheduling Before CL multiple activate events will be fired during boot and each one of them will be processed, which is redundant. The activation will also trigger multiple sync events. During the initial download of multiple voicemails an upload will also be trigger for each voicemail. The flood of connections is know to have the client banned by the server. Codes exists for retrying, but does not actually do anything. In this CL TaskSchedulerService is implemented which will prevent duplicated tasks from being queued, throttle requests, and handle retries. "Activate" event is not in scheduling yet. - OmtpVvmSyncService is no longer a service. It will be renamed later. It can now be called to sync voicemail in a single threaded manner. Fixes: 28729940 Bug: 28730056 Change-Id: I3678d8a16326e9a181bb401c003574928f02ae00
/packages/services/Telephony/src/com/android/phone/vvm/omtp/scheduling/RetryPolicy.java
|