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

Commit 86492860 authored by Michael W's avatar Michael W
Browse files

Dialer: Fix crash in CallLog

* CallLogAdapter calls (via other methods) into this and causes a
  concurrent modification
* Prevent this by synchronizing the block

Change-Id: I24ff5aeda9af636b3a0c6b8b1c32b12ee0b7bf42
parent 73fe72e4
Loading
Loading
Loading
Loading
+18 −15
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ public class PhoneCallDetailsHelper {
   * @return The call location and date string.
   */
  public CharSequence getCallLocationAndDate(PhoneCallDetails details) {
    synchronized (this) {
      descriptionItems.clear();

      if (details.callTypes[0] != Calls.VOICEMAIL_TYPE) {
@@ -218,8 +219,10 @@ public class PhoneCallDetailsHelper {
      descriptionItems.add(getCallDate(details));

      // Create a comma separated list from the call type or location, and call date.

      return DialerUtils.join(descriptionItems);
    }
  }

  /**
   * For a call, if there is an associated contact for the caller, return the known call type (e.g.