[Galaxy S II Android Development] gerryS2:
I have port the LensFlareView with change the id and insert some missing file in android.policy like ImageViewBlembed and UnlockView, but I have noticed the existence of a method in CircleLockscreen that connects the CircleUnlockView only with insert a "new-instance". I tried to create an array list to create a connection with the CircleUnlockView and LensFlareView, but I get an error in the compilation. The error is "regcount doesn't match the argument of the method".

The original method in CircleLockscreen is:

.method private createUnlockWidget()Landroid/view/View;
.locals 3

.prologue
.line 897
const/4 v0, 0x0

.line 898
.local v0, unlockWidget:Landroid/view/View;
iget-boolean v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mIsWaterRipple:Z

if-eqz v1, :cond_f

.line 899
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleUnlockRipple;

.end local v0 #unlockWidget:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct {v0, v1, v2}, Lcom/android/internal/policy/impl/sec/CircleUnlockRipple;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V

.line 903
.restart local v0 #unlockWidget:Landroid/view/View;
:goto_e
return-object v0

.line 901
:cond_f
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;

.end local v0 #unlockWidget:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct {v0, v1, v2}, Lcom/android/internal/policy/impl/sec/CircleUnlockView;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V

.restart local v0 #unlockWidget:Landroid/view/View;
goto :goto_e
.end method

The modded method is:

.method private createUnlockWidget()Landroid/view/View;
.locals 6

.prologue
.line 897
const/4 v0, 0x0

.line 898
.local v0, unlockWidget:Landroid/view/View;
iget-boolean v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mIsWaterRipple:Z

if-eqz v1, :cond_f

.line 899
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleUnlockRipple;

.end local v0 #unlockWidget:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct {v0, v1, v2}, Lcom/android/internal/policy/impl/sec/CircleUnlockRipple;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V

.line 903
.restart local v0 #unlockWidget:Landroid/view/View;
:goto_e
return-object v0

.line 901
:cond_f
iget-object v3, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

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

move-result-object v3

const-string v4, "list_clock_theme"

const v5, 0x0

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

move-result v3

const v4, 0x0

if-eq v4, v3, :cond_34

const v4, 0x1

if-eq v4, v3, :cond_3c

const v4, 0x2

if-eq v4, v3, :cond_3d

new-instance v0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;

.end local v0 #unlockWidget:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct {v0, v1, v2}, Lcom/android/internal/policy/impl/sec/CircleUnlockView;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V

.restart local v0 #unlockWidget:Landroid/view/View;
goto :goto_e

:cond_34
new-instance v0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;

.end local v0 #unlockWidget:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct {v0, v1, v2}, Lcom/android/internal/policy/impl/sec/CircleUnlockView;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V

.restart local v0 #unlockWidget:Landroid/view/View;
goto :goto_e

:cond_3c
new-instance v0, Lcom/android/internal/policy/impl/keyguard/sec/LensFlareView;

.end local v0 #unlockWidget:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;

invoke-direct {v0, v1, v2}, Lcom/android/internal/policy/impl/keyguard/sec/LensFlareView;-><init>(Landroid/content/Context;)V

.restart local v0 #unlockWidget:Landroid/view/View;
goto :goto_e

:cond_3d
new-instance v0, Lcom/android/internal/policy/impl/keyguard/sec/LensFlareView;

.end local v0 #unlockWidget:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;->mContext:Landroid/content/Context;

invoke-direct {v0, v1}, Lcom/android/internal/policy/impl/keyguard/sec/LensFlareView;-><init>(Landroid/content/Context;)V

.restart local v0 #unlockWidget:Landroid/view/View;
goto :goto_e
.end method