- Decompile android.policy.jar [guide on how to decompile jar files]
- Go to \com\android\internal\policy\impl and open LockPatternKeyguardView.smali
- Find
.field mInfoCallback:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$InfoCallbackImpl;
- Add this below
.field private mIsExternallyLoadedLockScreenEnabled:Z
- Find
# virtual methods
- Add the BLUE CODES and replace values for GREEN CODES
# virtual methods
.method public cleanUp()V
.registers 3
.prologue
const/4 v1, 0x0
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsExternallyLoadedLockScreenEnabled:Z
.line 808
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreen:Landroid/view/View;
if-eqz v0, :cond_1d
.line 809
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreen:Landroid/view/View;
check-cast v0, Lcom/android/internal/policy/impl/KeyguardScreen;
invoke-interface {v0}, Lcom/android/internal/policy/impl/KeyguardScreen;->onPause()V
.line 810
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreen:Landroid/view/View;
check-cast v0, Lcom/android/internal/policy/impl/KeyguardScreen;
invoke-interface {v0}, Lcom/android/internal/policy/impl/KeyguardScreen;->cleanUp()V
.line 811
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreen:Landroid/view/View;
invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->removeView(Landroid/view/View;)V
.line 812
iput-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreen:Landroid/view/View;
.line 814
:cond_1d
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUnlockScreen:Landroid/view/View;
if-eqz v0, :cond_36
.line 815
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUnlockScreen:Landroid/view/View;
check-cast v0, Lcom/android/internal/policy/impl/KeyguardScreen;
invoke-interface {v0}, Lcom/android/internal/policy/impl/KeyguardScreen;->onPause()V
.line 816
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUnlockScreen:Landroid/view/View;
check-cast v0, Lcom/android/internal/policy/impl/KeyguardScreen;
invoke-interface {v0}, Lcom/android/internal/policy/impl/KeyguardScreen;->cleanUp()V
.line 817
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUnlockScreen:Landroid/view/View;
invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->removeView(Landroid/view/View;)V
.line 818
iput-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUnlockScreen:Landroid/view/View;
.line 820
:cond_36
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
invoke-virtual {v0, p0}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->removeCallback(Ljava/lang/Object;)V
.line 821
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mBiometricUnlock:Lcom/android/internal/policy/impl/BiometricSensorUnlock;
if-eqz v0, :cond_44
.line 822
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mBiometricUnlock:Lcom/android/internal/policy/impl/BiometricSensorUnlock;
invoke-interface {v0}, Lcom/android/internal/policy/impl/BiometricSensorUnlock;->cleanUp()V
.line 824
:cond_44
return-void
.end method
- Find
.method createLockScreen()Landroid/view/View;
- Add the BLUE CODES delete RED CODES and replace values for GREEN CODES
.method createLockScreen()Landroid/view/View;
.registers 8
.prologue
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-static {v1, v2}, Lcom/android/internal/policy/impl/ExternalLockScreen;->getLockScreen(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)Landroid/view/View;
move-result-object v0
.local v0, lockView:Landroid/view/View;
if-eqz v0, :cond_34
const/4 v1, 0x1
:goto_b
iput-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsExternallyLoadedLockScreenEnabled:Z
.line 1038
iget-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsExternallyLoadedLockScreenEnabled:Z
if-nez v1, :cond_30
.line 918
const-string v1, "ro.ty.lockscreen"
const-string v2, "false"
invoke-static {v1, v2}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v6
.line 922
.local v6, ty_lockscreen_support:Ljava/lang/String;
const-string v1, "true"
invoke-virtual {v1, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_36
.line 923
new-instance v0, Lcom/android/internal/policy/impl/TYLockScreen;
.end local v0 #lockView:Landroid/view/View;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/TYLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.line 937
.local v0, lockView:Landroid/view/View;
:goto_1f
.restart local v0 #lockView:Landroid/view/View;
:cond_30
:goto_30
invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 938
return-object v0
:cond_34
const/4 v1, 0x0
goto :goto_b
.line 930
.end local v0 #lockView:Landroid/view/View;
:cond_36
new-instance v0, Lcom/android/internal/policy/impl/LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V
.restart local v0 #lockView:Landroid/view/View;
goto :goto_30
.end method
- Save & Compile. DO NOT PUSH IT YET!
- Download & Flash XperiaZ_Lockscreen.zip
- Push your new android.policy.jar to /system/framework