[G2 Android Development] xdabbeb:
Sorry it took so long for me to write this up.

Following these steps will allow you to add the full split window implementation from the GPro2 and G3 KK roms that for whatever reason LG decided to leave (mostly) out of the stock G2 4.4.x roms. This guide is geared more towards rom devs or people that are familiar with using smali/baksmali and doing minor dalvik/smali edits.

Prerequisites:

Get smali/baksmali v2.0.3

Get a copy of the framework directory for the rom you're implementing this on

Download the source files/zip linked below

Quick notes on smali/baksmali usage:

If you're running baksmali on an odex your basic command to use for this guide is baksmali -a 19 -b -d <path/to/framework/dir> -o <path/to/baksmali/outdir> - x filename.odex

If you're working with an extracted classes.dex (i.e. from from roms that support art) it's just baksmali -a 19 -b -o <path/to/baksmali/outdir> classes.dex

The basic smali command to use for these purposes is smali -a 19 -o classes.dex <path/to/baksmali/outdir>

Step 1:

Baksmali telephony-common (from your framework dir) and find the following line in generated/ConfigBuildBase.smali:

sput-boolean v0, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

and change the boolean to true like so:

sput-boolean v1, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

Step 2:

Smali that file back to a new classes.dex and zip it back into telephony-common.jar

Step 3:

Baksmali com.lge.frameworks and find the same line in generated/ConfigBuildBase.smali:

sput-boolean v0, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

and change the boolean to true like so:

sput-boolean v1, Lgenerated/ConfigBuildBase;->CAPP_SPLITWINDOW:Z

Step 4:

Open up com/lge/loader/splitwindow/SplitWindowCreatorHelper.smali and add the following to your static fields declarations:

.field private static TAG:Ljava/lang/String;

so that it will now appear as:

# static fields
.field private static SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;

.field private static TAG:Ljava/lang/String;

Step 5:

In the same smali file a few lines down, you'll need to add the following to your direct methods:

const-string v0, "SplitWindowCreatorHelper"

sput-object v0, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;

so that it will now apprear as:

sput-object v0, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;

const-string v0, "SplitWindowCreatorHelper"

sput-object v0, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;

return-void
.end method

Step 6:

Again, in the same smali scroll all the way down as you'll need to add the following public method at the end of the file:

* keep in mind you'll need to keep a blank line between the .end method above and this new method below

.method public static recoverService()Lcom/lge/loader/splitwindow/ISplitWindow$ISplitWindowPolicy;
.registers 4

const/4 v3, 0x0

sget-object v1, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;

const-string v2, "recoverService"

invoke-static {v1, v2}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I

sget-object v1, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;

if-eqz v1, :cond_20

sget-object v1, Lcom/lge/loader/RuntimeLibraryLoader;->SPLIT_WINDOW:Ljava/lang/String;

invoke-static {v1}, Lcom/lge/loader/RuntimeLibraryLoader;->getCreator(Ljava/lang/String;)Lcom/lge/loader/InstanceCreator;

move-result-object v0

if-eqz v0, :cond_1e

invoke-virtual {v0, v3}, Lcom/lge/loader/InstanceCreator;->setDefaultInstance(Ljava/lang/Object;)V

sget-object v1, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->TAG:Ljava/lang/String;

const-string v2, "Set default InstanceCreator as null to make NEW instance"

invoke-static {v1, v2}, Landroid/util/Slog;->v(Ljava/lang/String;Ljava/lang/String;)I

:cond_1e
sput-object v3, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->SPLITWINDOW_INSTANCE:Lcom/lge/loader/splitwindow/ISplitWindow;

:cond_20
invoke-static {}, Lcom/lge/loader/splitwindow/SplitWindowCreatorHelper;->getPolicyService()Lcom/lge/loader/splitwindow/ISplitWindow$ISplitWindowPolicy;

move-result-object v1

return-object v1
.end method

Step 7:

Open up com/lge/loader/splitwindow/ISplitWindow$ISplitWindowPolicy.smali and add the following public method after the getMinimumScreenSize public method (again, minding your blank lines)

.method public abstract getRecentStackBoxes()Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List",
"<",
"Landroid/app/ActivityManager$StackBoxInfo;",
">;"
}
.end annotation
.end method

Step 8:

Smali all of that to a new classes.dex and zip it back into com.lge.frameworks.jar

Step 9:

Put your newly modified com.lge.frameworks.jar and telephony-common.jar into place (I also re-odex them and copy the original signatures over)

Step 10:

Put all of the files contained in the download provided below into their respective directories with the proper permissions (644 all around)

Step 11:

Add the following two lines to your build.prop

ro.lge.capp_splitwindow=true
persist.splitwindow.support_all=true

* if you don't want all apps showing up in the selection window, change support_all to false

That's it...you should be good to go. There's always the possibility that your framework will be slightly different, but that's the general idea and you should be able to make small changes to adjust to your particular variant

Feel free to include this in your roms (that's why I posted it). Just give credit in your OP.

Downloads:

SplitWindow Files - G Pro 2

SplitWindow Files - G3

The only real difference between them is the color of the outline box