Quantcast
Channel: xda-developers - Galaxy S II Android Development
Viewing all articles
Browse latest Browse all 397

[MOD][HOW TO][LSJ] CRT-off

$
0
0
Hello xda'ers, here is a quick method to get CRT OFF working on LSJ roms.


Decompile services.jar and navigate to:
smali\com\android\server\PowerManagerService$Scree nBrightnessAnimator.smali

look for .line 3022
Code:

    .line 3022
    iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;

    #getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
    invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7200(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;

    move-result-object v7

    const/16 v9, 0xa

    invoke-virtual {v7, v9, p1, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;

    move-result-object v2

focus on "const/16 v9, 0xa" and take a look on static fields.

Code:

# static fields
.field static final ANIMATE_LIGHTS:I = 0xa

.field static final ANIMATE_POWER_OFF:I = 0xb

So we miss "ANIMATE_POWER_OFF:I = 0xb", let s add it

final code is this, add the red lines

Code:

    .line 3022
    iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;

    #getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
    invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7200(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;

    move-result-object v7

    if-eqz p2, :cond_mi

    const/16 v9, 0xb

    const/4 v10, 0x0

    const v2, 0x10

    invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;

    move-result-object v9

    invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V

    :cond_mi

    const/16 v9, 0xa

    invoke-virtual {v7, v9, p1, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;

    move-result-object v2


Recompile and you got it :)


for lazy ones here is the zip

DOWNLOAD


if u shouldn t like and want to restore download here

Viewing all articles
Browse latest Browse all 397

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>