[One (M7) Android Development] Hero:
With all of the ROMs coming out with CRT animation, I decided to just release the tutorial for devs so they can get it to work on their ROMs should they not have it. I have only tested this on the 2.24.401.1 base, but believe it will work on older bases as well. I have confirmed it to work on the following ROMs:

AxisOne v1.0.2

Renovate Milestone 4

Android Revolution HD 12.1

Let's get on with the tutorial. We'll be working with two files: services.jar and framework-res.apk

PART 1

Decompile services.jar and open up DisplayPowerController.smali in smali/com/android/server/power/

Find the following code:

:cond_10
:goto_8
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mLightSensor:Landroid/hardware/Sensor;

if-eqz v8, :cond_11

iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerRequest:Lcom/android/server/power/DisplayPowerRequest;

iget v8, v8, Lcom/android/server/power/DisplayPowerRequest;->screenState:I

invoke-static {v8}, Lcom/android/server/power/DisplayPowerController;->wantScreenOn(I)Z

move-result v8

[COLOR="red"]if-eqz v8, :cond_2a

iget-boolean v8, p0, Lcom/android/server/power/DisplayPowerController;->mScreenOffBecauseOfProximity:Z

if-nez v8, :cond_2a

move v8, v9[/COLOR]

Replace the code in RED with the following:

if-eqz v8, :cond_2d

iget-boolean v8, p0, Lcom/android/server/power/DisplayPowerController;->mScreenOffBecauseOfProximity:Z

if-nez v8, :cond_2d

const/4 v8, 0x1

Find the following code:

invoke-virtual {v8, v11}, Lcom/android/server/power/DisplayPowerState;->setElectronBeamLevel(F)V

iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

invoke-virtual {v8}, Lcom/android/server/power/DisplayPowerState;->dismissElectronBeam()V

goto/16 :goto_8

:cond_29
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;

invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->isStarted()Z

move-result v8

if-nez v8, :cond_10

[COLOR="red"]invoke-direct {p0, v10, v10, v10, v13}, Lcom/android/server/power/DisplayPowerController;->animateScreenBrightness(IIII)V

iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

invoke-virtual {v8, v14}, Lcom/android/server/power/DisplayPowerState;->setElectronBeamLevel(F)V

invoke-direct {p0, v10}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V

goto/16 :goto_8

:cond_2a
move v8, v10[/COLOR]

goto/16 :goto_9

:catchall_1
move-exception v8

:try_start_3
monitor-exit v9
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1

throw v8
.end method

Replace the code in RED with the following:

iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;

invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->isStarted()Z

move-result v8

if-nez v8, :cond_10

iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

invoke-virtual {v8}, Lcom/android/server/power/DisplayPowerState;->getElectronBeamLevel()F

move-result v8

const/4 v9, 0x0

cmpl-float v8, v8, v9

if-nez v8, :cond_2a

const/4 v8, 0x0

invoke-direct {p0, v8}, Lcom/android/server/power/DisplayPowerController;->setScreenOn(Z)V

goto/16 :goto_8

:cond_2a
iget-object v9, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

iget-boolean v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamFadesConfig:Z

if-eqz v8, :cond_2b

const/4 v8, 0x2

:goto_c
invoke-virtual {v9, v8}, Lcom/android/server/power/DisplayPowerState;->prepareElectronBeam(I)Z

move-result v8

if-eqz v8, :cond_2c

iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

invoke-virtual {v8}, Lcom/android/server/power/DisplayPowerState;->isScreenOn()Z

move-result v8

if-eqz v8, :cond_2c

iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;

invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->start()V

goto/16 :goto_8

:cond_2b
const/4 v8, 0x1

goto :goto_c

:cond_2c
iget-object v8, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;

invoke-virtual {v8}, Landroid/animation/ObjectAnimator;->end()V

goto/16 :goto_8

:cond_2d
const/4 v8, 0x0

Recompile services.jar.

PART 2

Decompile framework-res.apk and open up bools.xml in res/values/

Change the following instance:

<bool name="config_animateScreenLights">[COLOR="Red"]true[/COLOR]</bool>

to

<bool name="config_animateScreenLights">[COLOR="Red"]false[/COLOR]</bool>

recompile framework-res.apk

You are now done!

Full credit for this mod goes to myself and mwilky.