Make LocaleList Parcelable.

This is a preparation work to pass LocaleList from TextView to IMEs via
EditorInfo.

Marshalling and unmrshlling LocaleList via Parcel is actually not so
difficult.  We can reuse its internal data representation "localeTags"
as a canonical serialization format.

As for implementation, there are two choices.  One is making LocaleList
Parcelable and the other is having a utility method to do that.

This CL uses Parcelable approach so that not only Framework but also
application developers can reuse the code.

Bug: 22859862
Change-Id: Ib28363bd5ff74228d2abeaa95004ec8bed72bddd
5 files changed