[Nook Color Android Development] leapinlar:
I think I have found the solution to the problem I was having with no soft keys in any density higher than 160. I had already found the changes necessary to get the soft keys to show, but the change broke the status bar in the tablet gui. I have now found what to do there to avoid that. I can now switch back and forth between 240 in phone gui with soft keys and 160 with the tablet gui with the bottom status bar. All just by changing the density.

I will describe the changes necessary to implement this and I hope fattire or keyodi will look at those for a possible inclusion into the build.

1. Edit framework-res.apk to change bools.xml. The bool "config_showNavigationBar" should be changed to "true".

2a.Edit systemUI.apk to change the navigation_bar.xml in layout to reverse the "@id/rot0" and "@id/rot90". I think this needs to be done because of the modification fattire did in the kernel for graphics rotations. This change has no effect on the tablet UI. It is only used in phone UI mode.

2b. Edit systemUI.apk to fix a problem it had with the setting changed in framework-res.apk in step one. One of the smali scripts checked the NavigationBar setting while trying to start the Tablet Status Bar and if it was set true it would error with the message "Tablet device cannot show navigation bar and system bar" and generate an exception, crashing systemUI. I found the spot where it was testing for it and bypassed the test. Now it all works well.

The smali is "TabletStatusBar.smali". The code starts at line 3355 and ends in line 3380 in my notepad++. For my purposes I just commented it out, but a real dev would alter the code more elegantly. Here is the unmodified code snipet.

.line 459
:try_start_0
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/systemui/statusbar/tablet/TabletStatusBar;->mWindowManager:Landroid/view/IWindowManager;

invoke-interface {v15}, Landroid/view/IWindowManager;->hasNavigationBar()Z

move-result v15

if-eqz v15, :cond_0

.line 460
new-instance v15, Ljava/lang/RuntimeException;

const-string v16, "Tablet device cannot show navigation bar and system bar"

invoke-direct/range {v15 .. v16}, Ljava/lang/RuntimeException;->(Ljava/lang/String;)V

throw v15
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

.line 463
:catch_0
move-exception v15

Could someone PLEASE look at this to see if it is a valid modification, and if it is, implement it? That way no patches are needed to have soft keys in whatever density you want to run.

Edit: There is a problem with this as I discovered with further testing. On the home screen in landscape, there is a tiny vertical black bar on the right hand side where the nav bar would be. I think it is trying to show both the the nav bar and the tablet status bar at the same time. It has no icons, but does respond to some taps. I don't get that on other screens. I knew there had to be a reason for android to include this test in the script.

I think an answer might be to instead of returning an exception if it finds the nav bar to be true, to somehow set it to false via script. I don't know if that's possible or not.

I can live with the vertical bar, but I'm not sure if we should subject all users to that.