core: fix arithmetic on a pointer to void

Summary:
Use char* instead of void* for this
pointer arithmetic. Fixes the following:

error: arithmetic on a pointer to void
buf = buf + offset;
      ~~~ ^

Test Plan: verify

Reviewers: randall.rushing, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D594
ZygoteInit: increase GC threshold amount when preloading to postpone GC

Patch Set 2: Hardcode it better to 1MB.

Change-Id: I7a6e195b82ebe2f4bd5bbb506e19200d452fa3e5
Fix DataInputStream leaks

Fix fixes
-In viewstateserializer, try to close before throwing or returning, and throw early if inputstream is null
-other stuff

Change-Id: I7f3b16057582566b82a85841829ff6ed11cd570e

Conflicts:
	core/java/android/webkit/ViewStateSerializer.java
fix NoSuchElementException error with CPU ProcessStats

Credit to Eugene373

p2: update commit message
p3: cleaned up tabs
p4: also added aosp changes from this commit - https://github.com/android/platform_frameworks_base/commit/ca894b396b93344ac255746e12730cb269d4d856

Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
Change-Id: I3c71dbd5fb8e42811c47d6431003101943cb388a
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

Conflicts:
	core/java/com/android/internal/os/ProcessStats.java
Fix ListView is not scrolled properly with arrows

According to ListView's layoutChildren logic, it detaches all children
and rebuilds its children based on visible area which might omit
invisible elements in the adapter.

In this case, arrowScroll methods only tries to find next scroll
candidates from its children so user is unable to scroll more with
D-pad.

This fixes the issue by look forward next child among the adapter as
well as children.

Bug: 7346868
Change-Id: I01ab19ad899b5bcb5ab420ddf08c9ffd136933d1

Conflicts:
	core/java/android/widget/ListView.java
Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter

Fix for Issue ID 18316. Make isEmpty() return false when getCount() returns a non-zero value. So that the list cannot be considered empty when a header or footer is present.

https://code.google.com/p/android/issues/detail?id=18316

Change-Id: Ib69201e9d5ef3efcbb68ea298b8cc8ca6e027246
Signed-off-by: Emma Sajic <esajic@effectivelateralsolutions.co.uk>
Remove duplicate code in Editor.java

Eliminate duplicates by calling resumeBlink()/suspendBlink().

Change-Id: Ia19ae1bf1a5c981700aa20be67ed9d557e2bfc56
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>