Fix layoutlib [DO NOT MERGE]

Fix a NPE, and update an ICU method to return the right value as
required by DatePicker widget.

The cherry-pick differs slightly from the original to remove changes not
relevant to the current branch.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
(cherry-picked from 39e75835399f4d979cf82069dae2bd1ec496fb81)
2 files changed