Skip to content
Commit 8d8ef00c authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Fix NPE in DateFormat.is24HourFormat.

In some cases, we end up being called by code that doesn't have a valid
Context. It got away with this historically because it wasn't formatting
times (just dates), so it never went down a path that tried to query the
user's 12/24-hour preference. This patch just ensures that we don't try
to get the preference unless we actually need it.

Bug: 10339015
Change-Id: I2df466d85cdeba14dbf882498808cbad9bbb57f4
parent 82461951
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