Android Tablets Forum banner
1 - 11 of 11 Posts

·
Registered
Joined
·
954 Posts
Okay so every generic tablet is suffering from this problem. They all could use fixing. The screen wants to rotate upside down in portage mode. Where is this controlled, services.jar under PhoneWindowManager.java?If you tell me at least I can tell the ODMs in Shenzhen to get it right.I recall you did some sort of rotation fix. But what do I modify to get the thing to rotate so that the power jack is on the top instead of on the bottom? ie: I want the top of the device to be where the charging and other ports are located.Right now portrait mode is upside down of what I want it to be.
 

·
Registered
Joined
·
160 Posts
From here:
You need to recompile it yourself, actually you only need to change one line in a PhoneWindowManager.java file.see function public int rotationForOrientation(int orientation), there you need to change:Code: // case for nosensor meaning ignore sensor and consider only lid // or orientation sensor disabled //or case.unspecified if(mLidOpen) { return Surface.ROTATION_90; } else { return Surface.ROTATION_0; }toCode: // case for nosensor meaning ignore sensor and consider only lid // or orientation sensor disabled //or case.unspecified if(mLidOpen) { return Surface.ROTATION_270; } else { return Surface.ROTATION_0; }
 

·
Registered
Joined
·
954 Posts
Ya I'm looking at it. I just figured it out lol What was so bad about it having rotated to 90 degrees in the first place?Rotating that way means the jacks are all on top. Does this screw up other stuff?It might sound a little counter intuitive, but I think the way it was makes senseEdit:nvm I figured it out. I've been using hybrid firmware for so long that the thought completely eluded me. The reason is that the accelerometer only triggers rotation upon rotating the device clockwise to change from landscape to portrait. We should ACTUALLY fix the accelerometer so that it triggers rotating the tablet clockwise when going landscape to portait. That allows the use of the ports at the 'top' while in portrait mode. I hope I'm making sense.WindowOrientationListener.javaFor example, modifying onSensorChangedThere's a bunch of constants under SensorEventListenerImplThe other thing I wasn't sure about was... In the original firmware, the definitions for landscape and portrait seemed to be flipped. It was treating landscape views as portrait, and vice versa. Was this the main cause of apps breaking?
 

·
Registered
Joined
·
784 Posts
The flipped resolution breaks many apps that don't expect it. Some apps recover from it (better programmed?). For example, Bust-A-Move tries to goto portrait, and ends up in landscape using 25% of the screen.. same happens with 'Radiant' for example.If you rotate the apad in your hands to portrait, and start Bust-A-Move, it FC's I'm guessing when the app doesn't expect this and does not handle the case of a 'wierd screen' it FC's on us. Many apps can handle this situation, others not, so they bomb out
 

·
Registered
Joined
·
160 Posts
[quote name='xaueious;30186]The other thing I wasn't sure about was... In the original firmware' date=' the definitions for landscape and portrait seemed to be flipped. It was treating landscape views as portrait, and vice versa. Was this the main cause of apps breaking?[/QUOTE'] Yes. This stuff is programmed soooo bad...
 

·
Registered
Joined
·
954 Posts
Discussion Starter · #6 ·
Ok so let me get this straight. hellomrang discovered that the Archos ROM sets orientations correctly, and that's the only reason we have decent application compatibility today. Basically that's it? I can't imagine that the Archos ROM has been modded that much. Is it one constant in one of the java files that determins this? Did you do any digging?I'll probably try to get the orientations listener and rotation tweaked for the other orientation. Hopefully it doesn't screw anything else up. I just want to be able to listen to music with the tablet in portrait mode.
 

·
Registered
Joined
·
7 Posts
I haven't tested it, but I'm guessing they messed up the accelerometer driver. You need to adjust the readings based on the part's orientation on the PC board. I expect they never did that. To really fix it properly you need the kernel source.
 

·
Registered
Joined
·
7 Posts
You can see the values using getevent in adb. Comparing against a device that is known to be good would tell you if the orientation is messed up.As long as programs only get orientation data from android you can compensate in the framework. If they use the raw accelerometer data directly then there's a problem.
 

·
Registered
Joined
·
198 Posts
Would this the games like the aTilt ball labyrinth? In the calibration screen you can see that up is left and right is up, etc.
 
1 - 11 of 11 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top