[Epic 4G Android Development] AmericanJedi001:
Deprecated (Old, Archaic) Rotation Lag Fix How-to

Introduction

This is the old, deprecated fix for minimizing rotation lag in EpicMTD CM7. It has been superceded by the method described in the OP above. Feel free to play with this hack, but know that I will not be supporting it, nor will I go any deeper into the how-to guide: this is a moderately broad overview, and the details of learning how to hack .jar files will be left to the reader to discover. I learned 95% of this hack by searching and reading what others had done, not by asking people to spoon-feed me instructions. Take that to heart!

DISCLAIMER

I have tested the framework.jar file and the flashable .zip on my own phone, with awesome results. However, I refuse to be held accountable for any issues you may have.

Installation

-- "framework.jar" Replacement Method

Delete or rename /system/framework/framework.jar (I recommend you simply rename it so that if you have issues you can easily switch back to your "stock" file

Copy framework.jar to /system/framework, then reboot.

???

Profit from the blazing rotation speed!*

-- Flashable .zip Method

Copy EpicMTD_CM7_Rotation_Lag_Eliminator.zip to the root of your SD card

Boot into CWM Recovery (or possibly ACS Recovery?)

Flash the "EpicMTD_CM7_Rotation_Lag_Eliminator.zip" file

Breakdance.

Reboot and enjoy a lag-free* experience!

-- Caveats

THIS METHOD IS DEPRECATED! USE THE METHOD IN THE OP TO FIX YOUR ROTATION LAG PERMANENTLY, RATHER THAN HAVING TO HACK framework.jar FOR EACH NEW RELEASE!

* At least one person has successfully replaced framework.jar, but was not impressed with the improvement in rotation speed

Users of previous versions of this fix reported their phones hanging during boot (I have never experienced this)

One person reported that menus were changed, but I suspect he flashed this fix (created specifically for CM7) on top of another ROM

For other GB ROMs the fix should be basically the same, though I would recommend using the framework.jar from that specific ROM. See the Resources section below if you're interested in learning the technical end of the fix.

Downloads

-- Standalone File

framework.jar - Pulled from CM7 Nightly-10 (4G Toggle in Notification Widgets)

-- Flashable .zip

EpicMTD_CM7_Rotation_Lag_Eliminator.zip - Pulled from CM7 Nightly-10 (4G Toggle in Notification Widgets)

-- Resources

my post in Chris41g's EF02 Rotation Lagfix topic

Chris41g's original fix for EF02

ISSUES / PROBLEMS / BUGS?

I will no longer support this hack. I have since learned of a much better method for almost eliminating rotation lag, a method that persists across ROM flashes and therefore does not require updating periodically when new versions of framework.jar accompany a new release of CM7. This is here simply because I can't delete the topic, and for historical interest.

Thanks and Acknowledgements

Thanks to Chris41g for the original fix, without stumbling upon that topic I would never have figured this out myself!

How-to Overview

With chris41g's original fix, here's what he had to say about it:

I pulled my "/system/framework/framework.jar", then pulled "classes.dex" from there and smali'd it, then browsed "...\classout\android\view\WindowOrientationListener.smali" in Eclipse. I found

.method public constructor <init>(Landroid/content/Context;)V
.registers 3
.parameter "context"

.prologue
.line 67
const/4 v0, 0x3

invoke-direct {p0, p1, v0}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;I)V

.line 68
return-void
.end method

which is the closest to what chris41g posted for the original fix. I changed the "0x3" to read "0x0".

I then baksmali'd it into "classes.dex" and inserted that back into framework.jar, which is then copied into /system/framework, replacing the stock framework.jar. Done!

If anybody has any insight, tips, improvements, etc., send 'em! This is my first real contribution that involved any coding (not that I did much!) and I want to learn anything you Grand Masters have to share.