wallpaper: limit wallpaper width to sys.max_texture_size

Image wallpapers are created ~1.5x screen size.  On some devices this
may exceed the maximum supported texture size, which will either fail
allocation or fail to composite.

https://android-review.googlesource.com/95111

Bug 991597

Change-Id: I9948b09f6e00a724212e73d36901f2bbea42e2f4
Signed-off-by: houst0nn <houstonn@gmail.com>
Remove stray logging statement.

bug: https://code.google.com/p/android/issues/detail?id=66974
Change-Id: Ie34c102de143cf6aeb16c78778dda3ef5e928380
Activity chooser "Always" button is not working

When ResolverActivity is created with a custom list of matching
applications (rList) as in NFC case, and the alwaysUseOption is
set to true, the prferredActivity is not saved even if the user
presses the "always" button.

When a list is provided the variable mBaseResolveList will be
!= null. This will set mOrigResolveList = null.

When an activity is choosen and one of the buttons are pressed
onIntentSelected is called. The first thing this method does
is to check mAdapter.mOrigResolveList != null, however in this
case mOrigResolveList is always null, and the value is not
saved as PreferredActivity.

This problem was introduced in
6d8dfbd8149942f25f2b9643a12f1fb38f3be834.

Change-Id: I9eac41b7861b5e68ad3978af0dc0285f2a34eb88
Check for null in LocalSocketImpl.SocketInputStream.available()

Calling available() on a local socket after close() will cause a native
crash. Other methods that pass LocalSocketImpl.fd to native code copy
the fd and check for null.

Change-Id: I2d0b573f34ae47a23009760bbb1c02933ab0a20e