ProcessStats: Fix another crasher

Prevent occurences of:

java.util.NoSuchElementException
	at java.util.StringTokenizer.nextToken(StringTokenizer.java:208)
	at com.android.internal.os.ProcessStats.getCpuSpeedTimes(ProcessStats.java:574)
	at com.android.internal.os.ProcessStats.getLastCpuSpeedTimes(ProcessStats.java:546)
	at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1676)
	at com.android.server.am.ActivityManagerService.batteryNeedsCpuUpdate(ActivityManagerService.java:1728)
	at com.android.internal.os.BatteryStatsImpl$MyHandler.handleMessage(BatteryStatsImpl.java:129)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1431)

Change-Id: I66f30739455dd726b708467f814f53c445f327b2
Fix Photosphere/Camera FCs

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.

On TF101 (and probably other devices) the camera HAL doesn't handle
FLASH_MODE & SCENE_MODE and so it sends the required RuntimeException
for these, which makes Photosphere FC the Camera app.

=> Fix: check device capabilities & ignore these 2 parameters if the device doesn't support them.

Fix based on following Team EOS patch: https://review.teameos.org/#/c/1598/

Change-Id: Idd80299802e9213a3c40414ace3d516d39f47783
framework: Allow specifying max wallpaper width

For some devices with very high-res screen (1920x1200), the wallpaper
width suggested by the launcher may be too large for the GPU and so
we need to limit it. (2048 for the above mentioned screen)

We don't need to limit the height since that's the height of the
screen.

Change-Id: I5b25bd931db0b2610e260921f28b92d8b0966aa6
Revert "Auto-close if you swipe away the last notification."

This reverts commit 8cc36e572876f3bb9197f0109db3042466e5f917.

It didn't work as advertised anyway: It only worked if there are no
persistent notifications, and it also closes the notification area if
the notification is closed by the app itself.

Change-Id: I16f0fb6cf41d20c3a3bd4278446edab780c1fc77

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Fixes for clang:
PackageInfo is a class, not a struct.
String16 is contained in the android namespace. Do not namespace prefix it
within the android namespace.
Explicitly specify which std classes are necessary to prevent ambiguous
type errors. (map, set)

Change-Id: I0d01477a976e770821ebae8847f8d11b132a15d6
Return the actual interpolator of the ViewPropertyAnimator

The implementation of getInterpolator() was always returning null
(probably a quick copy-paste from the default Animator implementation).
This patch fixes the problem by returning the interpolator set by
setInterpolator(TimeInterpolator) or the default one if none has been
set yet.

This patch also avoid creating multiple instances of ValueAnimator in
order to retrieve some default values.

Change-Id: I8880f419f021a8b980fb32bebe927915fde19bf7
remove dependency if airplane mode is not set

Change-Id: I8c01b4ac9cea8271b4a8140b24cfa56280435448
Copy/paste text in gtalk

Change-Id: I9fe3634dfdc64cb37ece7f431d12845c164d639b
Delay closing the notification area after swiping a little closer.

Use the same value as when removing all notifications.

Change-Id: Id11a48bc47487fd7763503dcbc769d9dbf5ad16a
Don't include flags in configuration change if their value hasn't changed.

This makes the check in updateFrom() match the logic in diff().

Change-Id: I3ab4e8460f7fbf985ef55b9514a8aa90d401d486
Allow adjusting progress on touch events.

Change-Id: Ide0a7ae057a62f3631a32eeaa63f3e04dec5bf54
Prefer artist over album artist.

E.g. when playing a compilation title, one very likely wants to see the real
artist instead of 'Various artists'.

Change-Id: Ie200f2f8b0b90d3470c2e2e4ca6f91f9b117fb1f