[Galaxy Note GT-N7000 Android Development] Ofeliax:
Hi xda peoples

I ported this mods from concept showed by dictact74 & Mirko_DDD, so major credits go to their.....

There are two ways to make this mod.

Improve a new method or by use a old unused method.

Here we going to create a new method, if a lot of people will be interested about this thread, I'll post the other method

YOU CAN DOWNLOAD HERE A FLASHABLE FILE:

http://xdaforums.com/showthread.php?t=2047010

Android.policy.jar

Let's start with Android.policy.jar

smali/com/android/internal/policy/imp/LockPatternKeyguardView

Find and replace the whole method,so we'll improve the aosp lockcreen:

.method createLockScreen()Landroid/view/View;
.locals 6

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

iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;

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

move-result-object v5

const-string v4, "darboc_aosp_lock"

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

move-result v5

if-nez v5, :cond_dar
.line 1044

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

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/sec/CircleLockScreen;->(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 1274
.local v0, lockView:Landroid/view/View;
:goto_0
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V

.line 1275
return-object v0

:cond_dar

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;->(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 1274
goto :goto_0
.end method

Save and exit

Recompile and push to /system/app

SecSettings:

Open

smali/com/android/settings/LockScreenSettings

we going to improve the checkbox.......

add BLU lines

canc RED lines

.method private updateState()V
.locals 9

.prologue
const/4 v5, 0x1

const/4 v6, 0x0

.line 263
[COLOR="Blue"]iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;

invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4

const-string v8, "darboc_aosp_lock"

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

move-result v4

if-eqz v4, :cond_7

move v4, v5

invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

.line 265
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4

iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;

invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4[/COLOR]

const-string v8, "show_clock"

Find and replace

iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mClock:Landroid/preference/CheckBoxPreference;

const/4 v10, 0x0

invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V

[COLOR="blue"]const-string v9, "darboc_aosp_lock"

invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

move-result-object v9

check-cast v9, Landroid/preference/CheckBoxPreference;

iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;

.line 159
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;

const/4 v10, 0x0

invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V

[/COLOR]
.line 161
const-string v9, "weather"

invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

Find and add the condition

iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;

invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

move-result v4

if-eqz v4, [COLOR="Blue"]:cond_bbb[/COLOR]

.line 338
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4

const-string v5, "wake_up_lock_screen"

iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;

Find and add the new condition method

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

goto/16 :goto_1

:cond_a
move v2, v3

goto :goto_5
[COLOR="blue"]:cond_bbb
iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;

invoke-virtual {p2, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

move-result v4

if-eqz v4, :cond_0

.line 313
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4

const-string v5, "darboc_aosp_lock"

iget-object v6, p0, Lcom/android/settings/LockScreenSettings;->mAospLock:Landroid/preference/CheckBoxPreference;

invoke-virtual {v6}, Landroid/preference/CheckBoxPreference;->isChecked()Z

move-result v6

if-eqz v6, :cond_c

:goto_6
invoke-static {v4, v5, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

.line 314
invoke-direct {p0}, Lcom/android/settings/LockScreenSettings;->updateState()V

.line 340
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z

move-result v2

return v2

:cond_c
move v2, v3

.line 313
goto :goto_6[/COLOR]

.line 337

.end method

.method public onResume()V
.locals 0

.prologue
.line 257
invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V

Save and exit

Now we'll iprove the xml part that show the checkbox and call the mali part

Go to res/values/strings.xml

Add the following lines somewhere in this file:

<string name="enable_aosp_lock">AOSP lockscreen</string>
<string name="enable_aosp_lock_text">Enable AOSP lockscreen</string>

Save and exit

Go to res/xml/Lockscreen_Settings.xml

Add the following lines where you like that checkbox would be showed

<CheckBoxPreference android:title="@string/enable_aosp_lock" android:key="darboc_aosp_lock" android:summary="@string/enable_aosp_lock_text" />

Recompile and push to /system/app

Reboot

Now will find your new toggle in lockscreen options

Enjoy :D

MERRY X-MAS AND HAPPY MODS NEW YEAR