Base: fix MultiSelectListPreference NPE

Error AndroidRuntime 25851  Caused by: java.lang.NullPointerException
Error AndroidRuntime 25851         at android.preference.MultiSelectListPreference.onGetDefaultValue(MultiSelectListPreference.java:212)
Error AndroidRuntime 25851         at android.preference.Preference.<init>(Preference.java:268)
Error AndroidRuntime 25851         at android.preference.DialogPreference.<init>(DialogPreference.java:69)
Error AndroidRuntime 25851         at android.preference.DialogPreference.<init>(DialogPreference.java:90)
Error AndroidRuntime 25851         at android.preference.MultiSelectListPreference.<init>

also Cleanup whitespace :/

Change-Id: I3f0a1fba8f6651522e4f0c4e4750b2ce0042314f

Conflicts:
	core/java/android/preference/MultiSelectListPreference.java

Signed-off-by: Shubhang <shubhang92@gmail.com>
Handle NullPointerException

When clearClientLocked() is called twice in a row,
(ex. When Spooler Service is killed by LMK, it is called by unbindLocked() and onServiceDisconnected())
it could cause NullPointerException.
So add 'catch' clause to handle it.

Change-Id: I60540c35f09ffe309836b207d2d354ef77b00ff0

Signed-off-by: Shubhang <shubhang92@gmail.com>
Fix "Email" App data lost when screen rotated.

Bug Description:
1.Open "Email" App contained in AOSP.
2.Setup your email account if not.
3.Click "Compose" button on the left bottom.
4.In "To", enter more than 3 email addresses, like "test1@gmail.com,test2@gmail.com,test3@gmail.com,test4@gmail.com,test5@gmail".
5.Click "Subject" or "Compose email", and the "To" data will be shrank.It will be like "test1@gmail.com test2@gmail.com +3". The "+3" means there are 3 more addresses shrank.
6.Rotate screen, either from vertical to horizontal or from horizontal to vertical.
7.The "To" data is lost, it will be "test1@gmail.com test2@gmail +1".When you click to expand, there are only 3 addresses left.
Why and how to solve:
Data lost when screen rotated because RecipientEditTextView doesn't save data on orientation changed.
So, create a static class save the data when needed and restore later on.

Change-Id: I0c709cbb59515338aa903c611139aee727785670
Signed-off-by: Paul Quei <paulquei@gmail.com>
Signed-off-by: Shubhang <shubhang92@gmail.com>
Get rid of noise during boot.

This log is not an error, it is a warning, don't spam a stack
crawl when it happens.

Change-Id: I6038e3625cc0c16af9e54887b5e7ec451d9f864d
Signed-off-by: houst0nn <houstonn@gmail.com>
Signed-off-by: Shubhang <shubhang92@gmail.com>