[HOW TO] Enable auto-rotating Calling Screen [ICS] [UPDATED 12 JUN 2012]

I wanted to share with YOU, users and rom developers.
Please give credits to Mirko ddd if you re gonna put it into your rom, and consider a little donation if u like it.

EDIT: some source tells it works on AOSP too, same concept

this is the result (just rearrange your layout to customize it) with default layout




(this feature will be included in the next Simplistic Disaster ROM planned for the next week.)

This is a little different, and simpler, than the one proposed by Pawtip for gingerbread roms one year ago.

What I did:
I looked for mIsDockConnected:Z command and then erase the condition to make enable it, making it active by default for normal callings.

Why you looked for mIsDockConnected:Z command?
Because if dock is connected you have the chance to make landscape callings I guess

How to:

-Decompile Phone.apk and go to smali/com/android/phone/InCallScreen.smali

-Open this smali file with a text editor and look for

Code:
.line 6299
:cond_5b
sget-boolean v0, Lcom/android/phone/PhoneApp;->mIsDockConnected:Z

if-ne v0, v2, :cond_be

.line 6300
iget v3, p1, Landroid/content/res/Configuration;->orientation:I
this sets the landscape mode (or better, it tells to phone to set the accelerometer current orientation) in calling screen only when dock is connected.

-Remove from the previous code:

Code:
if-ne v0, v2, :cond_be
this to remove the condition, and to have the current accelerometer orientation even if dock is not connected, then in normal calling state, that is what we need.

So final result is:


Code:
.line 6299
:cond_5b
sget-boolean v0, Lcom/android/phone/PhoneApp;->mIsDockConnected:Z

.line 6300
iget v3, p1, Landroid/content/res/Configuration;->orientation:I
-Recompile and enjoy your auto rotating call screen

Note: this mod has been tested only on LPF, may be some difference on other bases.
via

0 comments:

Post a Comment

Open Panel

Blogroll

counter