Summary
Since I saw the Galaxy S4 multi-window implement, I feel like to implement a multi-window by myself. Occasionally, when surfing on the internet to search multi-window info, I find that there is an open source project which has implemented the multi-window, CornerStone
I download the patch and apply to official guide specified branch android-4.1.1_r6, build and run an emulator, the emulator can not start, there are some errors show in logcat. Although there is some one in CornerStone google groups said that CornerStone can not run in emulator because of it needs a new kernel image, I don't believe this, what this patch change is the architecture of framework and add some apps, I believe that emulator do can run CornerStone successfully, then I try the v0.85 patch, which is for android-4.0.3_r1. It runs in emulator successfully finally.
Procedure
After applying the v0.85 patch in android-4.0.3_r1,
1. make and start emulator,
the emulator can not start but blocks, the logcat shows there are some problems when ServerThread.run(), according to the log, I comment off the "mWindowManager.showBootMessage(msg, always); " in ActivityManagerService.java::showBootMessage().
2. then make and run,
this time the emulator works, but a dialog show and say the CornerStone is stopped, by checking the error log, it says "StaleDexCacheError when reading apk: ", I try "make droidcore" by refering this.
3. then make and run,
the emulator works, but after clicking the CornerStone app, no panel shows, I check the log find that no error output, so I try some other skins, finally, when I use WXGA800 as emulator's skin, the CornerStone panel shows, cheers.