Finished shuffling files.

Change-Id: Ifb0a1458fa9aa5c5143e876242e03e1eee2044b9
diff --git a/Makefile.android b/Makefile.android
index 74d6fc6..dfbfdd3 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -609,12 +609,34 @@
                     qemu-char-android.c \
                     disas.c \
                     arm-dis.c \
+                    aes.c \
+                    d3des.c \
+                    vnc-android.c \
+                    acl.c \
+                    buffered_file.c \
+                    cbuffer.c \
+                    gdbstub.c \
+                    ioport.c \
+                    shaper.c \
+                    charpipe.c \
+                    tcpdump.c \
+                    qemu-malloc.c \
+                    qemu-option.c \
+                    savevm.c \
+                    net-android.c \
+                    aio-android.c \
+                    dma-helpers.c \
+                    qemu-sockets-android.c \
+                    bt-host.c \
+                    bt-vhci.c \
+                    module.c \
                     android/boot-properties.c \
                     android/hw-kmsg.c \
                     android/hw-lcd.c \
                     android/gps.c \
                     android/hw-events.c \
                     android/hw-control.c \
+                    android/console.c \
                     android/avd/hw-config.c \
                     android/avd/info.c \
                     android/utils/ini.c \
@@ -640,8 +662,24 @@
   CORE_MISC_SOURCES   += tap-win32.c
 endif
 
+# sources inherited from upstream, but not fully
+# integrated into android emulator
+#
+CORE_UPSTREAM_SOURCES = json-lexer.c \
+                        json-parser.c \
+                        json-streamer.c \
+                        qjson.c \
+                        qbool.c \
+                        qdict.c \
+                        qfloat.c \
+                        qint.c \
+                        qlist.c \
+                        qstring.c \
+
+
 CORE_SOURCES = $(CORE_BLOCK_SOURCES) $(CORE_HW_SOURCES)
 CORE_SOURCES += $(CORE_MIGRATION_SOURCES) $(CORE_MISC_SOURCES)
+CORE_SOURCES += $(CORE_UPSTREAM_SOURCES)
 # temp file used to collect UI->Core exchange protocol.
 CORE_SOURCES += android/ui-core-protocol.c
 
@@ -649,7 +687,9 @@
 # lists of source files used to build the emulator UI
 #
 
-UI_SOURCES = android/user-config.c \
+UI_SOURCES = loadpng.c \
+             keymaps.c \
+             android/user-config.c \
              android/resource.c \
              android/qemulator.c \
              android/keycode.c \
@@ -746,41 +786,10 @@
 # include other sources
 #
 VL_SOURCES := vl-android.c \
-              aes.c d3des.c \
-              buffered_file.c \
-              cbuffer.c \
-              gdbstub.c \
-              ioport.c \
-              vnc-android.c \
-              shaper.c charpipe.c loadpng.c \
               framebuffer.c \
-              tcpdump.c \
-              qemu-malloc.c \
-              qemu-option.c \
-              savevm.c \
-              net-android.c \
-              acl.c \
-              aio-android.c \
-              dma-helpers.c \
-              qemu-sockets-android.c \
-              keymaps.c \
-              bt-host.c \
-              bt-vhci.c \
-              module.c \
-              json-lexer.c \
-              json-parser.c \
-              json-streamer.c \
-              qbool.c \
-              qdict.c \
-              qfloat.c \
-              qint.c \
-              qjson.c \
-              qlist.c \
-              qstring.c \
               user-events-qemu.c \
               android/cmdline-option.c \
               android/config.c \
-              android/console.c \
               android/hw-sensors.c \
               android/main.c \
 
diff --git a/android/main.c b/android/main.c
index b18e494..9248992 100644
--- a/android/main.c
+++ b/android/main.c
@@ -33,7 +33,6 @@
 
 #include "android/charmap.h"
 #include "modem_driver.h"
-#include "shaper.h"
 #include "proxy_http.h"
 
 #include "android/utils/debug.h"
diff --git a/vl-android.c b/vl-android.c
index 4e88d66..4a373b3 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -49,12 +49,10 @@
 #include "qemu_file.h"
 #include "android/android.h"
 #include "charpipe.h"
-#include "shaper.h"
 #include "modem_driver.h"
 #include "android/gps.h"
 #include "android/hw-qemud.h"
 #include "android/hw-kmsg.h"
-#include "tcpdump.h"
 #include "targphys.h"
 
 #include <unistd.h>
diff --git a/vnc-android.c b/vnc-android.c
index 66f1753..af39dd2 100644
--- a/vnc-android.c
+++ b/vnc-android.c
@@ -1591,7 +1591,7 @@
 static void set_pixel_conversion(VncState *vs)
 {
     if ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) ==
-        (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) && 
+        (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) &&
         !memcmp(&(vs->clientds.pf), &(vs->ds->surface->pf), sizeof(PixelFormat))) {
         vs->write_pixels = vnc_write_pixels_copy;
         switch (vs->ds->surface->pf.bits_per_pixel) {
@@ -1699,7 +1699,7 @@
         vnc_write_u8(vs, 0);  /* msg id */
         vnc_write_u8(vs, 0);
         vnc_write_u16(vs, 1); /* number of rects */
-        vnc_framebuffer_update(vs, 0, 0, ds_get_width(vs->ds), 
+        vnc_framebuffer_update(vs, 0, 0, ds_get_width(vs->ds),
                                ds_get_height(vs->ds), VNC_ENCODING_WMVi);
         pixel_format_message(vs);
         vnc_flush(vs);
@@ -2179,7 +2179,7 @@
 char *vnc_display_local_addr(DisplayState *ds)
 {
     VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
-    
+
     return vnc_socket_local_addr("%s:%s", vs->lsock);
 }