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)
Loading
Please register or sign in to comment