Fix a bug where delete alarm toast sometimes doesn't show.
Bug: 22932712 There is a race condition The show toast logic is in a DataSetObserver and it checks mDeletedAlarm must be present. Sometimes loader's onLoadFinish() happens before DataSetObserver's onChanged(), and it wipes mDeletedAlarm, so DataSetObserver doesn't have a chance to show the toast. I moved show toast logic to onPostExecute section of AsycnDeleteAlarm. This is the same mechanism for displaying the toast for adding alarm. Change-Id: I452b03ea26e22f0638c1223a0a0c64c2ec82707d
Loading
Please register or sign in to comment