Post Reply

[INQUIRY][DEV] Does SE have Rotation Animation inside stock ROM? Please give info

19th February 2012, 04:38 PM   |  #11  
hansip87's Avatar
OP Senior Member
Flag Jakarta
Thanks Meter: 1,828
 
2,527 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by jjdoctor

Interesting thing I found here regarding Orientation


I grabbed PhoneWindowManager$MyOrientationListener.smali file from HTC android.policy.jar on 2.3.4 and Compared it with Sony SE.. They are mostly Identical but some Lines missing and slightly changed numbers in HTC's file..


In SE its Like This
(Check the BOLD RED Lines..they are missing or changed in HTC's file)

Code:
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
    .locals 0
    .parameter
    .parameter "context"

    .prologue
    .line 468
    iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;

    .line 469
    invoke-direct {p0, p2}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;)V

    .line 470
    return-void
.end method


# virtual methods
.method public onOrientationChanged(I)V
    .locals 3
    .parameter "rotation"

    .prologue
    .line 477
    const-string v0, "WindowManager"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "onOrientationChanged, rotation changed to "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

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

    .line 480
    :try_start_0
    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;

    iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWindowManager:Landroid/view/IWindowManager;

    const/4 v1, 0x0

    iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;

    iget v2, v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I

    invoke-interface {v0, p1, v1, v2}, Landroid/view/IWindowManager;->setRotation(IZI)V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 486
    :goto_0
    return-void

    .line 482
    :catch_0
    move-exception v0

    goto :goto_0
.end method

NOW CHECK IN HTC's file

Code:
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Landroid/content/Context;)V
    .locals 0
    .parameter
    .parameter "context"

    .prologue
    .line 438
    iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;

    .line 439
    invoke-direct {p0, p2}, Landroid/view/WindowOrientationListener;-><init>(Landroid/content/Context;)V

    .line 440
    return-void
.end method


# virtual methods
.method public onOrientationChanged(I)V
    .locals 3
    .parameter "rotation"

    .prologue
    .line 447























    :try_start_0
    iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;

    iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mWindowManager:Landroid/view/IWindowManager;

    const/4 v1, 0x0

    iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;

    iget v2, v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->mFancyRotationAnimation:I

    invoke-interface {v0, p1, v1, v2}, Landroid/view/IWindowManager;->setRotation(IZI)V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 453
    :goto_0
    return-void

    .line 449
    :catch_0
    move-exception v0

    goto :goto_0
.end method
I modded the HTC one to fit the SE lines, named it HTCModdedforSE.zip and attached it for testing.. ont have my SE now...

But just incase I attached the whole android.policy.jar file from HTC Sensation.. You can fully replace SE with HTC one without modding.. maybe that works out...

Give it a go..

the line code that SE have is just for logging purpose, nothing essential mate.
22nd February 2012, 01:13 PM   |  #12  
hansip87's Avatar
OP Senior Member
Flag Jakarta
Thanks Meter: 1,828
 
2,527 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by hansip87

the line code that SE have is just for logging purpose, nothing essential mate.

As i scan all the code, it is actually depends on native function which resides on libsurfaceflinger.so. So no mod can be done about that unless somebody can crack the .so file. Case closed, thanks for the input.
The Following User Says Thank You to hansip87 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Xperia Arc Q&A, Help & Troubleshooting by ThreadRank