[Galaxy S 4 Themes and Apps] grgsiocl:
great mod! Diff file is below if anyone needs it!

.super Ljava/lang/Object;
.source "DisplayPowerController.java"

+# interfaces
+.implements Landroid/animation/Animator$AnimatorListener;
+

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
@@ -113,6 +116,14 @@

.field private mElectronBeamFadesConfig:Z

+.field private mElectronBeamOff:I
+
+.field private mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+.field private mElectronBeamOn:I
+
+.field private mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
.field private final mHandler:Lcom/android/server/power/DisplayPowerController$DisplayControllerHandler;

.field private mHighHysteresis:F
@@ -3211,6 +3222,58 @@
goto :goto_1
.end method

+.method static getBeamCfg(Ljava/lang/String;I)I
+ .locals 3
+ .parameter
+ .parameter
+
+ .prologue
+ move v0, p1
+
+ invoke-static {p0}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
+
+ move-result-object v1
+
+ const-string v2, "none"
+
+ invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
+
+ move-result v2
+
+ if-eqz v2, :cond_0
+
+ const v0, 0x0
+
+ return v0
+
+ :cond_0
+ const-string v2, "crt"
+
+ invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
+
+ move-result v2
+
+ if-eqz v2, :cond_1
+
+ const v0, 0x1
+
+ return v0
+
+ :cond_1
+ const-string v2, "fade"
+
+ invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
+
+ move-result v2
+
+ if-eqz v2, :cond_2
+
+ const v0, 0x2
+
+ :cond_2
+ return v0
+.end method
+
.method private getDynamicAutoBrightnessHighHysteresis(F)F
.locals 11
.parameter "cd"
@@ -4408,6 +4471,92 @@

iput-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

+ const v4, 0x2
+
+ iget-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ sget-object v1, Lcom/android/server/power/DisplayPowerState;->ELECTRON_BEAM_LEVEL:Landroid/util/FloatProperty;
+
+ new-array v2, v4, [F
+
+ fill-array-data v2, :array_0
+
+ invoke-static {v0, v1, v2}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
+
+ move-result-object v0
+
+ iput-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ .line 6120
+ iget-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ const-wide/16 v1, 0xfa
+
+ invoke-virtual {v0, v1, v2}, Landroid/animation/ObjectAnimator;->setDuration(J)Landroid/animation/ObjectAnimator;
+
+ .line 6130
+ iget-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v0, p0}, Landroid/animation/ObjectAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
+
+ .line 6150
+ iget-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ sget-object v1, Lcom/android/server/power/DisplayPowerState;->ELECTRON_BEAM_LEVEL:Landroid/util/FloatProperty;
+
+ new-array v2, v4, [F
+
+ fill-array-data v2, :array_1
+
+ invoke-static {v0, v1, v2}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
+
+ move-result-object v0
+
+ iput-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ .line 6170
+ iget-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ const-wide/16 v1, 0x190
+
+ invoke-virtual {v0, v1, v2}, Landroid/animation/ObjectAnimator;->setDuration(J)Landroid/animation/ObjectAnimator;
+
+ .line 6180
+ iget-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v0, p0}, Landroid/animation/ObjectAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V
+
+ const-string v2, "persist.sys.screen_off"
+
+ const v3, 0x1
+
+ invoke-static {v2, v3}, Lcom/android/server/power/DisplayPowerController;->getBeamCfg(Ljava/lang/String;I)I
+
+ move-result v4
+
+ iput v4, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOff:I
+
+ const-string v2, "persist.sys.screen_on"
+
+ const v3, 0x2
+
+ invoke-static {v2, v3}, Lcom/android/server/power/DisplayPowerController;->getBeamCfg(Ljava/lang/String;I)I
+
+ move-result v2
+
+ const v3, 0x1
+
+ if-ne v3, v2, :cond_0
+
+ const v3, 0x2
+
+ if-ne v3, v4, :cond_0
+
+ move v2, v4
+
+ :cond_0
+ iput v2, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOn:I
+
.line 618
new-instance v0, Lcom/android/server/power/RampAnimator;

@@ -4421,6 +4570,21 @@

.line 620
return-void
+
+ nop
+
+ :array_0
+ .array-data 0x4
+ 0x0t 0x0t 0x0t 0x0t
+ 0x0t 0x0t 0x80t 0x3ft
+ .end array-data
+
+ .line 615
+ :array_1
+ .array-data 0x4
+ 0x0t 0x0t 0x80t 0x3ft
+ 0x0t 0x0t 0x0t 0x0t
+ .end array-data
.end method

.method private isTablet()Z
@@ -7121,7 +7285,15 @@

move-result v6

- if-eqz v6, :cond_1d
+ if-eqz v6, :cond_21
+
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->isStarted()Z
+
+ move-result v6
+
+ if-nez v6, :cond_9

.line 842
invoke-direct {p0, v7}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V
@@ -7133,6 +7305,18 @@

if-eqz v6, :cond_1c

+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ invoke-virtual {v6}, Lcom/android/server/power/DisplayPowerState;->getElectronBeamLevel()F
+
+ move-result v6
+
+ const v10, 0x0
+
+ cmpl-float v6, v6, v10
+
+ if-nez v6, :cond_1c
+
.line 844
invoke-direct {p0}, Lcom/android/server/power/DisplayPowerController;->blockScreenOn()V

@@ -7145,6 +7329,22 @@

if-nez v6, :cond_0

+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->isStarted()Z
+
+ move-result v6
+
+ if-nez v6, :cond_0
+
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->isStarted()Z
+
+ move-result v6
+
+ if-nez v6, :cond_0
+
iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

iget-object v7, p0, Lcom/android/server/power/DisplayPowerController;->mCleanListener:Ljava/lang/Runnable;
@@ -7499,10 +7699,87 @@
:cond_1c
invoke-direct {p0}, Lcom/android/server/power/DisplayPowerController;->unblockScreenOn()V

+ .line 7840
+ iget v10, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOn:I
+
+ if-nez v10, :cond_1d
+
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ const/high16 v7, 0x3f80
+
+ invoke-virtual {v6, v7}, Lcom/android/server/power/DisplayPowerState;->setElectronBeamLevel(F)V
+
+ invoke-virtual {v6}, Lcom/android/server/power/DisplayPowerState;->dismissElectronBeam()V
+
goto/16 :goto_9

- .line 849
:cond_1d
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->isStarted()Z
+
+ move-result v6
+
+ if-nez v6, :cond_9
+
+ .line 7720
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ invoke-virtual {v6}, Lcom/android/server/power/DisplayPowerState;->getElectronBeamLevel()F
+
+ move-result v6
+
+ const/high16 v7, 0x3f80
+
+ cmpl-float v6, v6, v7
+
+ if-nez v6, :cond_1e
+
+ .line 7850
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ invoke-virtual {v6}, Lcom/android/server/power/DisplayPowerState;->dismissElectronBeam()V
+
+ goto/16 :goto_9
+
+ :cond_1e
+ const v6, 0x2
+
+ if-eq v6, v10, :cond_1f
+
+ const v10, 0x0
+
+ :cond_1f
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ invoke-virtual {v6, v10}, Lcom/android/server/power/DisplayPowerState;->prepareElectronBeam(I)Z
+
+ move-result v6
+
+ if-eqz v6, :cond_20
+
+ .line 778
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->start()V
+
+ goto/16 :goto_9
+
+ .line 780
+ :cond_20
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->end()V
+
+ goto/16 :goto_9
+
+ .line 849
+ :cond_21
+ iget v10, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOff:I
+
+ if-nez v10, :cond_22
+
invoke-direct {p0, v8}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V

.line 851
@@ -7517,6 +7794,76 @@

goto/16 :goto_9

+ :cond_22
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->isStarted()Z
+
+ move-result v6
+
+ if-nez v6, :cond_9
+
+ .line 7930
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->isStarted()Z
+
+ move-result v6
+
+ if-nez v6, :cond_9
+
+ .line 7940
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ invoke-virtual {v6}, Lcom/android/server/power/DisplayPowerState;->getElectronBeamLevel()F
+
+ move-result v6
+
+ const v10, 0x0
+
+ cmpl-float v6, v6, v10
+
+ if-nez v6, :cond_23
+
+ invoke-direct {p0, v8}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V
+
+ goto/16 :goto_9
+
+ .line 7960
+ :cond_23
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ iget v10, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOff:I
+
+ invoke-virtual {v6, v10}, Lcom/android/server/power/DisplayPowerState;->prepareElectronBeam(I)Z
+
+ move-result v6
+
+ if-eqz v6, :cond_24
+
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;
+
+ invoke-virtual {v6}, Lcom/android/server/power/DisplayPowerState;->isScreenOn()Z
+
+ move-result v6
+
+ if-eqz v6, :cond_24
+
+ .line 8010
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->start()V
+
+ goto/16 :goto_9
+
+ .line 8030
+ :cond_24
+ iget-object v6, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;
+
+ invoke-virtual {v6}, Landroid/animation/ObjectAnimator;->end()V
+
+ goto/16 :goto_9
+
.line 936
:catchall_1
move-exception v6
@@ -7936,6 +8283,40 @@
const/4 v0, 0x0

goto :goto_0
+.end method
+
+.method public onAnimationCancel(Landroid/animation/Animator;)V
+ .locals 0
+ .parameter "animation"
+
+ .prologue
+ return-void
+.end method
+
+.method public onAnimationEnd(Landroid/animation/Animator;)V
+ .locals 0
+ .parameter "animation"
+
+ .prologue
+ invoke-direct {p0}, Lcom/android/server/power/DisplayPowerController;->sendUpdatePowerState()V
+
+ return-void
+.end method
+
+.method public onAnimationRepeat(Landroid/animation/Animator;)V
+ .locals 0
+ .parameter "animation"
+
+ .prologue
+ return-void
+.end method
+
+.method public onAnimationStart(Landroid/animation/Animator;)V
+ .locals 0
+ .parameter "animation"
+
+ .prologue
+ return-void
.end method

.method public requestPowerState(Lcom/android/server/power/DisplayPowerRequest;ZZ)Z