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

Skip to content
Commit e6b33d71 authored by Moritz Horstmann's avatar Moritz Horstmann Committed by Jochen Sprickerhof
Browse files

Calendar: Always set timezone when populating CalendarEventModel

An event may not always contain a timezone, leaving the model with a timezone set to null.
This causes the following NullPointerException, so use default timezone if the cursor has none.

java.lang.NullPointerException: key == null
       at libcore.util.BasicLruCache.get(BasicLruCache.java:46)
       at libcore.util.ZoneInfoDB$TzData.makeTimeZone(ZoneInfoDB.java:253)
       at android.text.format.Time$TimeCalculator.lookupZoneInfo(Time.java:1111)
       at android.text.format.Time$TimeCalculator.updateZoneInfoFromTimeZone(Time.java:1105)
       at android.text.format.Time$TimeCalculator.setTimeInMillis(Time.java:1091)
       at android.text.format.Time.set(Time.java:766)
       at com.android.calendar.event.EditEventView.setModel(EditEventView.java:1089)
       at com.android.calendar.event.EditEventFragment.setModelIfDone(EditEventFragment.java:427)
       at com.android.calendar.event.EditEventFragment.-wrap1(EditEventFragment.java)
       at com.android.calendar.event.EditEventFragment$QueryHandler.onQueryComplete(EditEventFragment.java:382)

Change-Id: If215cab45909b01fa39481c6a544abba9dde7baf

(cherry picked from commit 3e2f221)
parent ea6576c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment