[Galaxy S II Themes and Apps] sphinx02:
the problem is, that I can only edit the decompiled .smali file and there it looks very different from that what it is in java..

I try to find the right position in the code but till now I havent found the correct place where I have to edit things!

Perhaps you can give me the update () function in com.android.server.PowerManagerService$SettingsObserver from s2 so I can compare it to the one in the s3!

For me it looks like this:

# virtual methods
.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
.registers 17
.parameter "o"
.parameter "arg"

.prologue
.line 536
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mLocks:Lcom/android/server/PowerManagerService$LockList;
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$700(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$LockList;

move-result-object v13

monitor-enter v13

.line 538
:try_start_7
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

const-string v1, "stay_on_while_plugged_in"

const/4 v2, 0x1

invoke-direct {p0, v1, v2}, Lcom/android/server/PowerManagerService$SettingsObserver;->getInt(Ljava/lang/String;I)I

move-result v1

#setter for: Lcom/android/server/PowerManagerService;->mStayOnConditions:I
invoke-static {v0, v1}, Lcom/android/server/PowerManagerService;->access$1502(Lcom/android/server/PowerManagerService;I)I

.line 540
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#calls: Lcom/android/server/PowerManagerService;->updateWakeLockLocked()V
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$1000(Lcom/android/server/PowerManagerService;)V

.line 542
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mScreenOffTimeoutSetting:I
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$1600(Lcom/android/server/PowerManagerService;)I

move-result v10

.line 544
.local v10, prevScreenOffTimeoutSetting:I
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

const-string v1, "screen_off_timeout"

const/16 v2, 0x3a98

invoke-direct {p0, v1, v2}, Lcom/android/server/PowerManagerService$SettingsObserver;->getInt(Ljava/lang/String;I)I

move-result v1

#setter for: Lcom/android/server/PowerManagerService;->mScreenOffTimeoutSetting:I
invoke-static {v0, v1}, Lcom/android/server/PowerManagerService;->access$1602(Lcom/android/server/PowerManagerService;I)I

.line 547
const/4 v8, 0x0

.line 548
.local v8, bButtonSettingChanged:Z
const-string v0, "button_key_light"

const/16 v1, 0x5dc

invoke-direct {p0, v0, v1}, Lcom/android/server/PowerManagerService$SettingsObserver;->getInt(Ljava/lang/String;I)I

move-result v9

.line 549
.local v9, newButtonOffTimeoutSetting:I
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mButtonOffTimeoutSetting:I
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$1700(Lcom/android/server/PowerManagerService;)I

move-result v0

if-eq v0, v9, :cond_42

.line 550
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#setter for: Lcom/android/server/PowerManagerService;->mButtonOffTimeoutSetting:I
invoke-static {v0, v9}, Lcom/android/server/PowerManagerService;->access$1702(Lcom/android/server/PowerManagerService;I)I

.line 551
const/4 v8, 0x1

.line 555
:cond_42
iget-object v1, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$1900(Lcom/android/server/PowerManagerService;)Landroid/content/Context;

move-result-object v0

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v2, "intelligent_sleep_mode"

const/4 v3, 0x0

invoke-static {v0, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-eqz v0, :cond_f1

iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$1900(Lcom/android/server/PowerManagerService;)Landroid/content/Context;

move-result-object v0

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v2, "intelligent_screen_mode"

const/4 v3, 0x0

invoke-static {v0, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-eqz v0, :cond_f1

const/4 v0, 0x1

:goto_6b
#setter for: Lcom/android/server/PowerManagerService;->mSmartSleepEnabled:Z
invoke-static {v1, v0}, Lcom/android/server/PowerManagerService;->access$1802(Lcom/android/server/PowerManagerService;Z)Z

.line 561
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

const-string v1, "screen_brightness_mode"

const/4 v2, 0x0

invoke-direct {p0, v1, v2}, Lcom/android/server/PowerManagerService$SettingsObserver;->getInt(Ljava/lang/String;I)I

move-result v1

#calls: Lcom/android/server/PowerManagerService;->setScreenBrightnessMode(I)V
invoke-static {v0, v1}, Lcom/android/server/PowerManagerService;->access$2000(Lcom/android/server/PowerManagerService;I)V

.line 565
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#calls: Lcom/android/server/PowerManagerService;->setScreenOffTimeoutsLocked()V
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$2100(Lcom/android/server/PowerManagerService;)V

.line 569
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mScreenOffTimeoutSetting:I
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$1600(Lcom/android/server/PowerManagerService;)I

move-result v0

if-eq v10, v0, :cond_98

.line 570
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

move-result-wide v1

iget-object v3, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mTimeoutTask:Lcom/android/server/PowerManagerService$TimeoutTask;
invoke-static {v3}, Lcom/android/server/PowerManagerService;->access$2200(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$TimeoutTask;

move-result-object v3

iget v3, v3, Lcom/android/server/PowerManagerService$TimeoutTask;->nextState:I

#calls: Lcom/android/server/PowerManagerService;->setTimeoutLocked(JI)V
invoke-static {v0, v1, v2, v3}, Lcom/android/server/PowerManagerService;->access$2300(Lcom/android/server/PowerManagerService;JI)V

.line 574
:cond_98
const/4 v0, 0x1

if-ne v8, v0, :cond_c6

.line 575
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

invoke-virtual {v0}, Lcom/android/server/PowerManagerService;->isScreenOn()Z

move-result v0

if-eqz v0, :cond_c6

.line 576
const-string v0, "PowerManagerService"

const-string v1, "SettingsObserver : update : userActivity()"

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

.line 577
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

move-result-wide v1

const-wide/16 v3, -0x1

const/4 v5, 0x0

const/4 v6, 0x3

const/4 v7, 0x0

#calls: Lcom/android/server/PowerManagerService;->userActivity(JJZIZ)V
invoke-static/range {v0 .. v7}, Lcom/android/server/PowerManagerService;->access$2400(Lcom/android/server/PowerManagerService;JJZIZ)V

.line 578
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

move-result-wide v1

const-wide/16 v3, -0x1

const/4 v5, 0x0

const/4 v6, 0x1

const/4 v7, 0x0

#calls: Lcom/android/server/PowerManagerService;->userActivity(JJZIZ)V
invoke-static/range {v0 .. v7}, Lcom/android/server/PowerManagerService;->access$2400(Lcom/android/server/PowerManagerService;JJZIZ)V

.line 582
:cond_c6
const-string v0, "window_animation_scale"

const/high16 v1, 0x3f80

invoke-direct {p0, v0, v1}, Lcom/android/server/PowerManagerService$SettingsObserver;->getFloat(Ljava/lang/String;F)F

move-result v12

.line 583
.local v12, windowScale:F
const-string v0, "transition_animation_scale"

const/high16 v1, 0x3f80

invoke-direct {p0, v0, v1}, Lcom/android/server/PowerManagerService$SettingsObserver;->getFloat(Ljava/lang/String;F)F

move-result v11

.line 584
.local v11, transitionScale:F
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

const/4 v1, 0x0

#setter for: Lcom/android/server/PowerManagerService;->mAnimationSetting:I
invoke-static {v0, v1}, Lcom/android/server/PowerManagerService;->access$2502(Lcom/android/server/PowerManagerService;I)I

.line 585
const/high16 v0, 0x3f00

cmpl-float v0, v12, v0

if-lez v0, :cond_e9

.line 586
iget-object v0, p0, Lcom/android/server/PowerManagerService$SettingsObserver;->this$0:Lcom/android/server/PowerManagerService;

const/16 v1, 0x10

invoke-static {v0, v1}, Lcom/android/server/PowerManagerService;->access$2576(Lcom/android/server/PowerManagerService;I)I

.line 588
:cond_e9
const/high16 v0, 0x3f00

cmpl-float v0, v11, v0

if-lez v0, :cond_ef

.line 592
:cond_ef
monitor-exit v13

.line 593
return-void

.line 555
.end local v11 #transitionScale:F
.end local v12 #windowScale:F
:cond_f1
const/4 v0, 0x0

goto/16 :goto_6b

.line 592
.end local v8 #bButtonSettingChanged:Z
.end local v9 #newButtonOffTimeoutSetting:I
.end local v10 #prevScreenOffTimeoutSetting:I
:catchall_f4
move-exception v0

monitor-exit v13
:try_end_f6
.catchall {:try_start_7 .. :try_end_f6} :catchall_f4

throw v0
.end method

btw the nativeStartSurfaceFlingerAnimation function is mentioned in the PowerManagerService like this:

.method private native nativeStartSurfaceFlingerAnimation(I)V
.end method

but it is never called anywhere...