[MOD][GUIDE] Multiple Lockscreen MOD [JB_BLK3]

Status
Not open for further replies.
Search This thread

Didact74

Senior Member
Sep 2, 2010
609
1,877
Lake Shore, MD
Multiple Lockscreen MOD

What does this MOD do?
-Add several new selectable lockscreens to the lockscreens options menu
-Acer Cloud Lockscreen
-Blackberry 10 Lockscreen
-HTC Sense Lockscreen
-LG Optimus Lockscreen
-AOSP Lockscreen
-Galaxy S3 Circle (stock) Lockscreen
-Removes the ripple option so there is no chance of lockups


I am sorry but making a flashable zip for this MOD is virtually impossible due to the framework differences from ROM to ROM. I am putting this out there to help DEVs incorporate it into their ROMs if they want to.

Thanks goes to Alliance team for their initial work on this MOD.

So lets get on with the guide....


First just let me say that parts of this MOD are a tedius process of looking up and matching IDs from the included files to the IDs in your framework-res IDs. I have done most of the leg work for you as you will see when you open the attached files. Every ID is accompanied with a hash tag and the name of the ID for you to easily look up in your framework-res/res/values/public. I will explain a little more when we get to that part.

Next you wlll find an attached zip file containing the necessary files for you to get this MOD up and running. They are

1. The "didact" folder
-this folder goes in android.policy.jar. Drop it in the "COM" folder. Once you drop it in you will then have 4 files in that folder. They are android, didact, samsung, vlingo.

2. The contents of the other files get dropped in the folders that the folder they are in are named.
-For example, the contents of the folder "framework_res_drawable-xhdpi", get put in framework-res/res/drawable-xhdmi :)

Once your done moving the files its time to get started.

Decompile framework-res

Navigate to res/values/attrs
add the following lines:
Code:
<attr name="rightChevronDrawable" format="reference" />
    <attr name="topChevronDrawable" format="reference" />
    <attr name="bottomChevronDrawable" format="reference" />
    <attr name="hitRadius" format="dimension" />
    <attr name="verticalOffset" format="dimension" />
    <attr name="horizontalOffset" format="dimension" />

Navigate to res/values/dimens
add the following lines
Code:
<dimen name="multiwaveview_hit_radius">60.0dip</dimen>
    <dimen name="multiwaveview_target_placement_radius">135.0dip</dimen>
    <dimen name="multiwaveview_snap_margin">20.0dip</dimen>
    <dimen name="htc_lockscreen_target_inset">25.0dip</dimen>
    <dimen name="lg_keyguard_lockscreen_status_line_clockfont_top_margin">14.0dip</dimen>
    <dimen name="lg_keyguard_lockscreen_status_line_font_size">14.0dip</dimen>

Navigate to res/values/ids
add the following lines
Code:
<item type="id" name="rotary">false</item>
    <item type="id" name="status2">false</item>
    <item type="id" name="timeDisplay">false</item>
    <item type="id" name="status_box">false</item>
    <item type="id" name="status_charging">false</item>
    <item type="id" name="status_alarm">false</item>
    <item type="id" name="status_calendar">false</item>
    <item type="id" name="customMsg">false</item>
    <item type="id" name="albumArt">false</item>
    <item type="id" name="musicNowPlaying">false</item>
    <item type="id" name="tab_selector2">false</item>
    <item type="id" name="tab_selector">false</item>
    <item type="id" name="rotary_selector">false</item>
    <item type="id" name="ring_selector">false</item>
    <item type="id" name="musicControlPlay">false</item>
    <item type="id" name="musicControlPause">false</item>
    <item type="id" name="musicControlPrevious">false</item>
    <item type="id" name="musicControlNext">false</item>
    <item type="id" name="gestures">false</item>

At this point you need to compile framework-res just as you normally would. Then immediately decompile it. The IDs for all the new files you just added will now be generated and we can move on to the next step.

Still in framework-res

Navigate to res/values/public

Leave the folder open in your editor.

Now android.policy.jar should be decompiled from when you dropped the files from the attached zip in it.

(in android.policy.jar) Navigate to smali/com/android/internal/policy/impl

Find the files you just copied in. If you want to move them to a temp folder while you do this next step thats fine too. You will need to go througheach file and find all the IDs (0x109014c) and look to the right to see what the ID represents. There will be a hashtag and the ID name to look for. It will look like this
Code:
0x109014c     #keyguard_screen_bb_unlock

Copy "keyguard_screen_bb_unlock" and look it up in your already opened framework-res/public folder. If the ID matches whats already in the file great, if not, change it to the correct one. You will need to do this for all the new files placed in android.policy. Not all files will have IDs but carefully go through each one and make sure they are all correct.

Navigate to smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali

Find the following method
Code:
.method createLockScreen()Landroid/view/View;

Replace the entire method with the following
Code:
.method createLockScreen()Landroid/view/View;
    .locals 6

    const/4 v2, 0x1

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

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

    move-result-object v3

    const-string v4, "lockscreen_type_key"

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

    move-result v0

    const/4 v2, 0x1

    if-eq v2, v0, :cond_0

    const/4 v2, 0x2

    if-eq v2, v0, :cond_1

    const/4 v2, 0x3

    if-eq v2, v0, :cond_2

    const/4 v2, 0x4

    if-eq v2, v0, :cond_3

    const/4 v2, -0x1

    if-eq v2, v0, :cond_4

    const/4 v2, -0x2

    if-eq v2, v0, :cond_5

    iget-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsTabletDevice:Z

    if-eqz v1, :cond_1

    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

    :goto_0
    invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V

    return-object v0

    :cond_0
    new-instance v0, Lcom/android/internal/policy/impl/AcerLockScreen;

    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/AcerLockScreen;-><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

    goto :goto_0

    :cond_1
    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;-><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

    goto :goto_0

    :cond_2
    new-instance v0, Lcom/android/internal/policy/impl/BBLockScreen;

    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/BBLockScreen;-><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

    goto :goto_0

    :cond_3
    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

    goto :goto_0

    :cond_4
    new-instance v0, Lcom/android/internal/policy/impl/HtcLockScreen;

    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/HtcLockScreen;-><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

    goto/16 :goto_0

    :cond_5
    new-instance v0, Lcom/android/internal/policy/impl/LgLockScreen;

    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/LgLockScreen;-><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

    goto :goto_0
.end method

Now you are done with framework-res and android.policy.jar. Recompile both files and set them aside.


Go to the next post to continue......
 

Attachments

  • lock_files.zip
    929.8 KB · Views: 1,401
  • Screenshot_2013-01-20-22-56-00.jpg
    Screenshot_2013-01-20-22-56-00.jpg
    29.2 KB · Views: 42,811
  • Screenshot_2013-01-21-09-28-07.jpg
    Screenshot_2013-01-21-09-28-07.jpg
    10.3 KB · Views: 3,735
  • Screenshot_2013-01-21-09-28-26.jpg
    Screenshot_2013-01-21-09-28-26.jpg
    18.5 KB · Views: 3,681
  • Screenshot_2013-01-21-09-28-41.jpg
    Screenshot_2013-01-21-09-28-41.jpg
    21.2 KB · Views: 42,487
  • Screenshot_2013-01-21-09-28-58.jpg
    Screenshot_2013-01-21-09-28-58.jpg
    22.6 KB · Views: 3,661
  • Screenshot_2013-01-21-09-29-10.jpg
    Screenshot_2013-01-21-09-29-10.jpg
    20.9 KB · Views: 41,448
Last edited:

Didact74

Senior Member
Sep 2, 2010
609
1,877
Lake Shore, MD
Part TWO



Decompile SecSettings.apk

Navigate to res/values/arrays
Add the followin lines
Code:
<string-array name="lockscreen_entries">
        <item>Acer Cloud</item>
        <item>Galaxy SIII Ripple/Circle</item>
        <item>BlackBerry 10</item>
        <item>AOSP LockScreen</item>
        <item>HTC Sense 4.0</item>
        <item>LG Optimus</item>
    </string-array>
    <string-array name="lockscreen_values">
        <item>1</item>
        <item>2</item>
        <item>3</item>
        <item>4</item>
        <item>-1</item>
        <item>-2</item>
    </string-array>

Navigate to res/xml/lockscreen_settings.xml
Replace all the code with the following
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/lock_screen"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
    <ListPreference android:persistent="true" android:entries="@array/lockscreen_entries" android:title="Choose Your LockScreen" android:key="lockscreen_type_key" android:defaultValue="1" android:entryValues="@array/lockscreen_values" />
    <CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />
    <SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
        <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
    </SwitchPreferenceScreen>
    <SwitchPreferenceScreen android:title="@string/information_ticker" android:key="information_ticker" android:summary="@string/information_ticker_summary" android:fragment="com.android.settings.InformationTicker" />
    <CheckBoxPreference android:title="@string/clock" android:key="clock" android:summary="@string/clock_summary" />
    <SwitchPreferenceScreen android:title="@string/dualclock_settings_title" android:key="dualclock_settings" android:summary="@string/dualclock_settings_summary" android:dependency="clock" android:fragment="com.android.settings.dualclock.DualClockSetting" />
    <SwitchPreferenceScreen android:title="@string/weather" android:key="weather" android:summary="@string/weather_summary" />
    <CheckBoxPreference android:title="@string/ripple_effect" android:key="ripple_effect" android:summary="@string/ripple_effect_summary" />
    <PreferenceScreen android:title="@string/ink_effect" android:key="ink_effect">
        <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.InkeffectPreview" />
    </PreferenceScreen>
    <CheckBoxPreference android:title="@string/help_text_title" android:key="help_text" android:summary="@string/help_text_summary" />
    <PreferenceCategory android:title="@string/features_category_title" android:key="feature_category" />
    <SwitchPreferenceScreen android:title="@string/motion_camera_short_cut_title" android:key="camera_short_cut" android:summary="@string/motion_camera_short_cut_summary" android:fragment="com.android.settings.motion.MotionView">
        <extra android:name="title" android:value="@string/motion_camera_short_cut_title" />
        <extra android:name="sensitivity" android:value="false" />
    </SwitchPreferenceScreen>
    <CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />
    <PreferenceScreen android:title="@string/samsung_unlock_option_set_wakeup_command" android:key="set_wakeup_command">
        <intent android:action="android.intent.action.VOICE_SETTING_SET_WAKEUP_COMMAND" />
    </PreferenceScreen>
</PreferenceScreen>

Navigate to smali/com/android/settings/LockScreenSettings.smali
Add the following code at the top of the file
Code:
.field private mLockScreenStylePref:Landroid/preference/ListPreference;

Find the following method
Code:
.method private updateState()V

Replace the entire method with the following code
Code:
.method private updateState()V
    .locals 9

    .prologue
    const/4 v5, 0x1

    const/4 v6, 0x0

    .line 263
    iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;

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

    move-result-object v4

    const-string v8, "enable_lockscreen_torch"

    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_12

    move v4, v5

    :goto_0
    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

    const-string v8, "show_clock"

    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

    :goto_1
    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

    const-string v7, "aw_daemon_service_key_app_service_status"

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

    move-result v4

    and-int/lit8 v2, v4, 0x1

    .line 267
    .local v2, mAppLockScreen:I
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const-string v7, "pen_hovering_ink_effect"

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

    move-result v3

    .line 269
    .local v3, mInkEffectColor:I
    const-string v4, "LockScreenSettings"

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "mInkEffectColor : "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v4, v7}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

    .line 271
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;

    if-eqz v4, :cond_0

    .line 272
    if-ne v2, v5, :cond_8

    .line 273
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;

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

    .line 278
    :cond_0
    :goto_2
    iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;

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

    move-result-object v4

    const-string v8, "dualclock_menu_settings"

    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_9

    move v4, v5

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

    .line 279
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

    if-eqz v4, :cond_1

    .line 280
    iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

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

    move-result-object v4

    const-string v8, "information_ticker"

    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_a

    move v4, v5

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

    .line 282
    :cond_1
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;

    if-eqz v4, :cond_2

    .line 283
    iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;

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

    move-result-object v4

    const-string v8, "motion_unlock_camera_short_cut"

    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_b

    move v4, v5

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

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

    move-result-object v4

    const-string v7, "lockscreen_wallpaper"

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

    move-result v4

    if-ne v4, v5, :cond_c

    move v0, v6

    .line 287
    .local v0, isLiveWallpaper:Z
    :goto_6
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const-string v7, "lock_motion_tilt_to_unlock"

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

    move-result v1

    .line 289
    .local v1, isMotionLock:I
    if-nez v0, :cond_3

    if-lez v1, :cond_d

    .line 290
    :cond_3
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;

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

    .line 293
    :goto_7
    iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;

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

    move-result-object v4

    const-string v8, "lockscreen_ripple_effect"

    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_e

    move v4, v5

    :goto_8
    invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
	
	invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const-string v7, "lockscreen_type_key"

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

    move-result v1
	
	const/4 v0, 0x1

    if-eq v1, v0, :cond_13
    
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
	
	invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
	
	:goto_9
	

    :goto_a
    .line 294
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;

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

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

    move-result v7

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

    .line 295
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mInkEffectSummary:[I

    aget v8, v8, v3

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V

    .line 297
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;

    if-eqz v4, :cond_4

    .line 298
    iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;

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

    move-result-object v4

    const-string v8, "unlock_text"

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

    move-result v4

    if-eqz v4, :cond_f

    move v4, v5

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

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

    if-eqz v4, :cond_5

    .line 301
    iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;

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

    move-result-object v4

    const-string v8, "wake_up_lock_screen"

    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_10

    move v4, v5

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

    .line 304
    :cond_5
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;

    if-eqz v4, :cond_6

    .line 305
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;

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

    move-result-object v7

    const-string v8, "lock_screen_shortcut"

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

    move-result v7

    if-ne v7, v5, :cond_11

    :goto_d
    invoke-virtual {v4, v5}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V

    .line 308
    :cond_6
    return-void

    .end local v0           #isLiveWallpaper:Z
    .end local v1           #isMotionLock:I
    .end local v2           #mAppLockScreen:I
    .end local v3           #mInkEffectColor:I
    :cond_7
    move v4, v6

    .line 263
    goto/16 :goto_1

    .line 275
    .restart local v2       #mAppLockScreen:I
    .restart local v3       #mInkEffectColor:I
    :cond_8
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;

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

    goto/16 :goto_2

    :cond_9
    move v4, v6

    .line 278
    goto/16 :goto_3

    :cond_a
    move v4, v6

    .line 280
    goto/16 :goto_4

    :cond_b
    move v4, v6

    .line 283
    goto/16 :goto_5

    :cond_c
    move v0, v5

    .line 286
    goto/16 :goto_6

    .line 292
    .restart local v0       #isLiveWallpaper:Z
    .restart local v1       #isMotionLock:I
    :cond_d
    iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;

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

    goto/16 :goto_7

    :cond_e
    move v4, v6

    .line 293
    goto :goto_8

    :cond_f
    move v4, v6

    .line 298
    goto :goto_b

    :cond_10
    move v4, v6

    .line 301
    goto :goto_c

    :cond_11
    move v5, v6

    .line 305
    goto :goto_d

    :cond_12
    move v4, v6

    .line 263
    goto/16 :goto_0
	
	:cond_13
	iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
	
	invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
	
	goto/16 :goto_9
	
	:cond_14
	move v4, v6
	
	goto/16 :goto_a
.end method


Go to the next post to continue.....
 
Last edited:

Didact74

Senior Member
Sep 2, 2010
609
1,877
Lake Shore, MD
Part Three (last part)



Find the following method
Code:
.method public onCreate(Landroid/os/Bundle;)V

Replace the entire method with the following code
Code:
.method public onCreate(Landroid/os/Bundle;)V
    .locals 13
    .parameter "savedInstanceState"

    .prologue
    .line 139
    invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;

    move-result-object v9

    invoke-virtual {v9}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v6

    .line 142
    .local v6, resolver:Landroid/content/ContentResolver;
    new-instance v9, Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;

    move-result-object v10

    invoke-direct {v9, v10}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V

    iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    .line 144
    const v9, 0x7f070036

    invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->addPreferencesFromResource(I)V

    const-string v9, "lockscreen_type_key"

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

    move-result-object v9

    check-cast v9, Landroid/preference/ListPreference;

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

    const-string v9, "lockscreen_type_key"

    const/4 v11, 0x0

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

    move-result v9

    iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;

    invoke-static {v9}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v12, v11}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V

    iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;

    invoke-virtual {v12, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 147
    const-string v9, "lock_screen_shortcut"

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

    move-result-object v9

    check-cast v9, Landroid/preference/SwitchPreferenceScreen;

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

    .line 148
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 149
    iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;

    const-string v9, "lock_screen_shortcut"

    const/4 v11, 0x0

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

    move-result v9

    const/4 v11, 0x1

    if-ne v9, v11, :cond_e

    const/4 v9, 0x1

    :goto_0
    invoke-virtual {v10, v9}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V

    .line 150
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;

    if-eqz v9, :cond_0

    .line 151
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z

    move-result v9

    if-eqz v9, :cond_0

    .line 153
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

    iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 158
    :cond_0
    const-string v9, "clock"

    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;->mClock:Landroid/preference/CheckBoxPreference;

    .line 159
    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

    const-string v9, "enable_lockscreen_torch"

    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;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;

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

    const/4 v10, 0x0

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

    .line 161
    const-string v9, "weather"

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

    move-result-object v9

    check-cast v9, Landroid/preference/SwitchPreferenceScreen;

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

    .line 162
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 163
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v9

    const v10, 0x1110048

    invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v9

    iput-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z

    .line 164
    iget-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z

    if-nez v9, :cond_1

    .line 165
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

    iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 169
    :cond_1
    const-string v9, "dualclock_settings"

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

    move-result-object v9

    check-cast v9, Landroid/preference/SwitchPreferenceScreen;

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

    .line 170
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 172
    const-string v9, "information_ticker"

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

    move-result-object v9

    check-cast v9, Landroid/preference/SwitchPreferenceScreen;

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

    .line 173
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 175
    invoke-static {}, Lcom/android/settings/Utils;->isChinaModel()Z

    move-result v9

    if-eqz v9, :cond_10

    .line 176
    const-string v9, "CHM"

    const-string v10, "ro.csc.sales_code"

    invoke-static {v10}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_f

    .line 177
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v10

    const v11, 0x7f0909bf

    invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V

    .line 186
    :goto_1
    invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;

    move-result-object v9

    const-string v10, "CscFeature_Setting_RemoveMenuInLockScreenTicker"

    invoke-virtual {v9, v10}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 187
    .local v0, ContentsTypeFeature:Ljava/lang/String;
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

    if-eqz v9, :cond_2

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v9

    const v10, 0x1110046

    invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v9

    if-eqz v9, :cond_11

    :cond_2
    invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z

    move-result v9

    if-nez v9, :cond_11

    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z

    move-result v9

    if-nez v9, :cond_11

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_3

    const-string v9, "-1"

    invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-nez v9, :cond_11

    .line 197
    :cond_3
    :goto_2
    const-string v9, "camera_short_cut"

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

    move-result-object v9

    check-cast v9, Landroid/preference/SwitchPreferenceScreen;

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

    .line 198
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;

    if-eqz v9, :cond_5

    .line 199
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 200
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;

    move-result-object v9

    invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z

    move-result v9

    if-nez v9, :cond_4

    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z

    move-result v9

    if-eqz v9, :cond_5

    .line 202
    :cond_4
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

    iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 207
    :cond_5
    invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z

    move-result v9

    if-nez v9, :cond_6

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;

    move-result-object v9

    invoke-static {v9}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z

    move-result v9

    if-eqz v9, :cond_7

    .line 209
    :cond_6
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

    iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 210
    const-string v9, "LockScreenSettings"

    const-string v10, " remove Dualclock menu"

    invoke-static {v9, v10}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

    .line 213
    :cond_7
    const-string v9, "ripple_effect"

    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;->mRippleEffect:Landroid/preference/CheckBoxPreference;

    .line 214
    const-string v9, "ja"

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v10

    invoke-virtual {v10}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v10

    iget-object v10, v10, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    invoke-virtual {v10}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_12

    const-string v1, ""

    .line 215
    .local v1, dot:Ljava/lang/String;
    :goto_3
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;

    new-instance v10, Ljava/lang/StringBuilder;

    invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v11

    const v12, 0x7f090cdc

    invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v10

    invoke-virtual {v10, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v10

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v11

    const v12, 0x7f090d26

    invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setSummary(Ljava/lang/CharSequence;)V

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

    move-result-object v9

    const-string v10, "pen_hovering_ink_effect"

    const/4 v11, 0x0

    invoke-static {v9, v10, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v3

    .line 218
    .local v3, mInkEffectColor:I
    const-string v9, "ink_effect"

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

    move-result-object v9

    check-cast v9, Landroid/preference/PreferenceScreen;

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

    .line 219
    const-string v9, "help_text"

    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;->mHelpText:Landroid/preference/CheckBoxPreference;

    .line 220
    const-string v9, "say_your_wakeup"

    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;->mSayCommand:Landroid/preference/CheckBoxPreference;

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

    if-eqz v9, :cond_8

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;

    move-result-object v9

    invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z

    move-result v9

    if-eqz v9, :cond_8

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v9

    const v10, 0x1110049

    invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v9

    if-eqz v9, :cond_9

    :cond_8
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z

    move-result v9

    if-eqz v9, :cond_a

    .line 225
    :cond_9
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

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

    invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 229
    :cond_a
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v5

    .line 230
    .local v5, ps:Landroid/preference/PreferenceScreen;
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;

    invoke-virtual {v5, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 234
    const-string v9, "set_wakeup_command"

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

    move-result-object v7

    check-cast v7, Landroid/preference/PreferenceScreen;

    .line 235
    .local v7, setWakeupCommand:Landroid/preference/PreferenceScreen;
    if-eqz v7, :cond_d

    .line 236
    invoke-virtual {v7}, Landroid/preference/PreferenceScreen;->getIntent()Landroid/content/Intent;

    move-result-object v8

    .line 237
    .local v8, set_wakeup_commant_intent:Landroid/content/Intent;
    if-eqz v8, :cond_d

    .line 238
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;

    move-result-object v9

    invoke-virtual {v9}, Landroid/app/Activity;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v4

    .line 239
    .local v4, pm:Landroid/content/pm/PackageManager;
    const/4 v9, 0x0

    invoke-virtual {v4, v8, v9}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v2

    .line 240
    .local v2, list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v9

    const/4 v10, 0x1

    if-ge v9, v10, :cond_d

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

    if-eqz v9, :cond_b

    .line 242
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

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

    invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 243
    :cond_b
    if-eqz v7, :cond_c

    .line 244
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

    invoke-virtual {v9, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 246
    :cond_c
    const/4 v9, 0x0

    invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z

    move-result v9

    if-eqz v9, :cond_d

    .line 247
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v10

    const-string v9, "feature_category"

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

    move-result-object v9

    check-cast v9, Landroid/preference/PreferenceCategory;

    invoke-virtual {v10, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 253
    .end local v2           #list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    .end local v4           #pm:Landroid/content/pm/PackageManager;
    .end local v8           #set_wakeup_commant_intent:Landroid/content/Intent;
    :cond_d
    return-void

    .line 149
    .end local v0           #ContentsTypeFeature:Ljava/lang/String;
    .end local v1           #dot:Ljava/lang/String;
    .end local v3           #mInkEffectColor:I
    .end local v5           #ps:Landroid/preference/PreferenceScreen;
    .end local v7           #setWakeupCommand:Landroid/preference/PreferenceScreen;
    :cond_e
    const/4 v9, 0x0

    goto/16 :goto_0

    .line 179
    :cond_f
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v10

    const v11, 0x7f0909be

    invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V

    goto/16 :goto_1

    .line 182
    :cond_10
    iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;

    move-result-object v10

    const v11, 0x7f0909bd

    invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V

    goto/16 :goto_1

    .line 193
    .restart local v0       #ContentsTypeFeature:Ljava/lang/String;
    :cond_11
    invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v9

    iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;

    invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    goto/16 :goto_2

    .line 214
    :cond_12
    const-string v1, ". "

    goto/16 :goto_3
.end method

Recompile SecSettings and push all files.

Enjoy!
 
Last edited:

barrackOBAMA

Senior Member
Jan 17, 2013
629
366
Haha funny to scroll through and see all the winky faces because of the code.

Thank you for this.



How ever I guess I missed the purpose of this as it must be the base and not compatible with all ROMs yet. Haha glad I didn't read the op.....
Figured it out real quick when it aborted every time.
Love to see this on clean ROM ;)


sent from that young galaxy on clean ROM!
 
Last edited:

andybones

Recognized Contributor / Inactive Recognized Devel
May 18, 2010
14,502
14,676
Google Pixel 5
c'mon guy only 12 "thanks"!? this man is a beast providing his free time, the least we can do is hit that thanks button to show some appreciation.
 

dan_joegibbsfan

Senior Member
Sep 19, 2010
235
193
Waverly, OH
I'm not to the level to be able to successfully port these types of tutorials yet but I still wanted to say how much I appreciate what you do! I look over your code daily. One day I'll be able to do more but right now I'm still learning.

Thanks a lot man!

Sent from my ASUS Transformer Pad TF700T using xda app-developers app
 

phenomarc

Senior Member
Nov 17, 2011
218
119
What are the issues you are having? Won't build? No arrays? Fcs? Etc?

Sent from my SPH-L710 using xda app-developers app

When I flash the mod, I can't unlock the phone and the lockscreen settings FC. The clock in lockscreen has changed but I can't unlock. I' ve seen the files to mod in the alliance Rom for S2 and there are differences between this guide and the files. Thanks!
 

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
New Jersey
I am in a similar situation. The default lockscreen for the mod (see 2nd screenshot on OP) works fine, but lockscreen settings FC's.

I did notice a few things while working on this mod.

There were two strings missing when I tried to compile SecSettings.apk (enable_lockscreen_torch and enable_lockscreen_torch_text).

These missing strings are for lockscreen_settings.xml from this code:

Code:
<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />

I am guessing that this line assumes you have the lockscreen torch mod already on your device since it is not included in this mod.

But whether I added the missing strings or removed the code from the code box above lockscreen settings still FC's.

Need to play with this some more....

(Don't get me wrong, I am not complaining. I want to get his bad boy working!)



Edit:

The line of code in green should be added to lockscreen_settings.xml and the line of code in red should be deleted (or made invisible) unless you already have the lockscreen torch mod:

Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/lock_screen"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
    [COLOR="Green"]<PreferenceCategory android:title="@string/display_settings" />[/COLOR]
	<ListPreference android:persistent="true" android:entries="@array/lockscreen_entries" android:title="Choose Your LockScreen" android:key="lockscreen_type_key" android:defaultValue="1" android:entryValues="@array/lockscreen_values" />
    [COLOR="Red"]<CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />[/COLOR]
    <SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
        <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
    </SwitchPreferenceScreen>
ETC...

These are the missing strings I mentioned earlier:
Code:
<string name="enable_lockscreen_torch">Lockscreen Torch</string>
<string name="enable_lockscreen_torch_text">Enable torch through lockscreen</string>
 
Last edited:

Didact74

Senior Member
Sep 2, 2010
609
1,877
Lake Shore, MD
For settings to be FC'ing your issue is in LockScreenSettings.smali.

Start simple.......

Begin with SecSettings. Make no alterations to android.policy yet.

Add everything EXCEPT the smali changes to SecSettings first. Push SecSettings to your phone and verify you have the menus and everything is there. You should be able to click the lockscreen options but they wont be functional until you add the smali code.

Next, add the changes needed to android.policy. Push android policy to the phone and check everything again. The MOD still wont be functional but you should not get any FC's.

Lastly, add the smali code to SecSettings. If your working wiht a different carrier you must make sure to change the registers accordingly.

If your still having issues post up your OnCreate and OnPreferenceChange methods here using the hide tags and we can tke a look to see where the issues may be.
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 67
    Multiple Lockscreen MOD

    What does this MOD do?
    -Add several new selectable lockscreens to the lockscreens options menu
    -Acer Cloud Lockscreen
    -Blackberry 10 Lockscreen
    -HTC Sense Lockscreen
    -LG Optimus Lockscreen
    -AOSP Lockscreen
    -Galaxy S3 Circle (stock) Lockscreen
    -Removes the ripple option so there is no chance of lockups


    I am sorry but making a flashable zip for this MOD is virtually impossible due to the framework differences from ROM to ROM. I am putting this out there to help DEVs incorporate it into their ROMs if they want to.

    Thanks goes to Alliance team for their initial work on this MOD.

    So lets get on with the guide....


    First just let me say that parts of this MOD are a tedius process of looking up and matching IDs from the included files to the IDs in your framework-res IDs. I have done most of the leg work for you as you will see when you open the attached files. Every ID is accompanied with a hash tag and the name of the ID for you to easily look up in your framework-res/res/values/public. I will explain a little more when we get to that part.

    Next you wlll find an attached zip file containing the necessary files for you to get this MOD up and running. They are

    1. The "didact" folder
    -this folder goes in android.policy.jar. Drop it in the "COM" folder. Once you drop it in you will then have 4 files in that folder. They are android, didact, samsung, vlingo.

    2. The contents of the other files get dropped in the folders that the folder they are in are named.
    -For example, the contents of the folder "framework_res_drawable-xhdpi", get put in framework-res/res/drawable-xhdmi :)

    Once your done moving the files its time to get started.

    Decompile framework-res

    Navigate to res/values/attrs
    add the following lines:
    Code:
    <attr name="rightChevronDrawable" format="reference" />
        <attr name="topChevronDrawable" format="reference" />
        <attr name="bottomChevronDrawable" format="reference" />
        <attr name="hitRadius" format="dimension" />
        <attr name="verticalOffset" format="dimension" />
        <attr name="horizontalOffset" format="dimension" />

    Navigate to res/values/dimens
    add the following lines
    Code:
    <dimen name="multiwaveview_hit_radius">60.0dip</dimen>
        <dimen name="multiwaveview_target_placement_radius">135.0dip</dimen>
        <dimen name="multiwaveview_snap_margin">20.0dip</dimen>
        <dimen name="htc_lockscreen_target_inset">25.0dip</dimen>
        <dimen name="lg_keyguard_lockscreen_status_line_clockfont_top_margin">14.0dip</dimen>
        <dimen name="lg_keyguard_lockscreen_status_line_font_size">14.0dip</dimen>

    Navigate to res/values/ids
    add the following lines
    Code:
    <item type="id" name="rotary">false</item>
        <item type="id" name="status2">false</item>
        <item type="id" name="timeDisplay">false</item>
        <item type="id" name="status_box">false</item>
        <item type="id" name="status_charging">false</item>
        <item type="id" name="status_alarm">false</item>
        <item type="id" name="status_calendar">false</item>
        <item type="id" name="customMsg">false</item>
        <item type="id" name="albumArt">false</item>
        <item type="id" name="musicNowPlaying">false</item>
        <item type="id" name="tab_selector2">false</item>
        <item type="id" name="tab_selector">false</item>
        <item type="id" name="rotary_selector">false</item>
        <item type="id" name="ring_selector">false</item>
        <item type="id" name="musicControlPlay">false</item>
        <item type="id" name="musicControlPause">false</item>
        <item type="id" name="musicControlPrevious">false</item>
        <item type="id" name="musicControlNext">false</item>
        <item type="id" name="gestures">false</item>

    At this point you need to compile framework-res just as you normally would. Then immediately decompile it. The IDs for all the new files you just added will now be generated and we can move on to the next step.

    Still in framework-res

    Navigate to res/values/public

    Leave the folder open in your editor.

    Now android.policy.jar should be decompiled from when you dropped the files from the attached zip in it.

    (in android.policy.jar) Navigate to smali/com/android/internal/policy/impl

    Find the files you just copied in. If you want to move them to a temp folder while you do this next step thats fine too. You will need to go througheach file and find all the IDs (0x109014c) and look to the right to see what the ID represents. There will be a hashtag and the ID name to look for. It will look like this
    Code:
    0x109014c     #keyguard_screen_bb_unlock

    Copy "keyguard_screen_bb_unlock" and look it up in your already opened framework-res/public folder. If the ID matches whats already in the file great, if not, change it to the correct one. You will need to do this for all the new files placed in android.policy. Not all files will have IDs but carefully go through each one and make sure they are all correct.

    Navigate to smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali

    Find the following method
    Code:
    .method createLockScreen()Landroid/view/View;

    Replace the entire method with the following
    Code:
    .method createLockScreen()Landroid/view/View;
        .locals 6
    
        const/4 v2, 0x1
    
        iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
    
        invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "lockscreen_type_key"
    
        invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v0
    
        const/4 v2, 0x1
    
        if-eq v2, v0, :cond_0
    
        const/4 v2, 0x2
    
        if-eq v2, v0, :cond_1
    
        const/4 v2, 0x3
    
        if-eq v2, v0, :cond_2
    
        const/4 v2, 0x4
    
        if-eq v2, v0, :cond_3
    
        const/4 v2, -0x1
    
        if-eq v2, v0, :cond_4
    
        const/4 v2, -0x2
    
        if-eq v2, v0, :cond_5
    
        iget-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsTabletDevice:Z
    
        if-eqz v1, :cond_1
    
        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
    
        :goto_0
        invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
    
        return-object v0
    
        :cond_0
        new-instance v0, Lcom/android/internal/policy/impl/AcerLockScreen;
    
        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/AcerLockScreen;-><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
    
        goto :goto_0
    
        :cond_1
        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;-><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
    
        goto :goto_0
    
        :cond_2
        new-instance v0, Lcom/android/internal/policy/impl/BBLockScreen;
    
        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/BBLockScreen;-><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
    
        goto :goto_0
    
        :cond_3
        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
    
        goto :goto_0
    
        :cond_4
        new-instance v0, Lcom/android/internal/policy/impl/HtcLockScreen;
    
        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/HtcLockScreen;-><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
    
        goto/16 :goto_0
    
        :cond_5
        new-instance v0, Lcom/android/internal/policy/impl/LgLockScreen;
    
        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/LgLockScreen;-><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
    
        goto :goto_0
    .end method

    Now you are done with framework-res and android.policy.jar. Recompile both files and set them aside.


    Go to the next post to continue......
    33
    Part Three (last part)



    Find the following method
    Code:
    .method public onCreate(Landroid/os/Bundle;)V

    Replace the entire method with the following code
    Code:
    .method public onCreate(Landroid/os/Bundle;)V
        .locals 13
        .parameter "savedInstanceState"
    
        .prologue
        .line 139
        invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v9
    
        invoke-virtual {v9}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v6
    
        .line 142
        .local v6, resolver:Landroid/content/ContentResolver;
        new-instance v9, Lcom/android/internal/widget/LockPatternUtils;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v10
    
        invoke-direct {v9, v10}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
    
        .line 144
        const v9, 0x7f070036
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->addPreferencesFromResource(I)V
    
        const-string v9, "lockscreen_type_key"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/ListPreference;
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
    
        const-string v9, "lockscreen_type_key"
    
        const/4 v11, 0x0
    
        invoke-static {v6, v9, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v9
    
        iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
    
        invoke-static {v9}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
    
        move-result-object v11
    
        invoke-virtual {v12, v11}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
    
        iget-object v12, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenStylePref:Landroid/preference/ListPreference;
    
        invoke-virtual {v12, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
    
        .line 147
        const-string v9, "lock_screen_shortcut"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/SwitchPreferenceScreen;
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
    
        .line 148
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
    
        .line 149
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
    
        const-string v9, "lock_screen_shortcut"
    
        const/4 v11, 0x0
    
        invoke-static {v6, v9, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v9
    
        const/4 v11, 0x1
    
        if-ne v9, v11, :cond_e
    
        const/4 v9, 0x1
    
        :goto_0
        invoke-virtual {v10, v9}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
    
        .line 150
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
    
        if-eqz v9, :cond_0
    
        .line 151
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
    
        invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
    
        move-result v9
    
        if-eqz v9, :cond_0
    
        .line 153
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 158
        :cond_0
        const-string v9, "clock"
    
        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;->mClock:Landroid/preference/CheckBoxPreference;
    
        .line 159
        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
    
        const-string v9, "enable_lockscreen_torch"
    
        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;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
    
        .line 159
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
    
        const/4 v10, 0x0
    
        invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setPersistent(Z)V
    
        .line 161
        const-string v9, "weather"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/SwitchPreferenceScreen;
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
    
        .line 162
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
    
        .line 163
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v9
    
        const v10, 0x1110048
    
        invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
    
        move-result v9
    
        iput-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z
    
        .line 164
        iget-boolean v9, p0, Lcom/android/settings/LockScreenSettings;->isWeatherEnabled:Z
    
        if-nez v9, :cond_1
    
        .line 165
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 169
        :cond_1
        const-string v9, "dualclock_settings"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/SwitchPreferenceScreen;
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
    
        .line 170
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
    
        .line 172
        const-string v9, "information_ticker"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/SwitchPreferenceScreen;
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        .line 173
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
    
        .line 175
        invoke-static {}, Lcom/android/settings/Utils;->isChinaModel()Z
    
        move-result v9
    
        if-eqz v9, :cond_10
    
        .line 176
        const-string v9, "CHM"
    
        const-string v10, "ro.csc.sales_code"
    
        invoke-static {v10}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;
    
        move-result-object v10
    
        invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    
        move-result v9
    
        if-eqz v9, :cond_f
    
        .line 177
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v10
    
        const v11, 0x7f0909bf
    
        invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
    
        move-result-object v10
    
        invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
    
        .line 186
        :goto_1
        invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;
    
        move-result-object v9
    
        const-string v10, "CscFeature_Setting_RemoveMenuInLockScreenTicker"
    
        invoke-virtual {v9, v10}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
    
        move-result-object v0
    
        .line 187
        .local v0, ContentsTypeFeature:Ljava/lang/String;
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        if-eqz v9, :cond_2
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v9
    
        const v10, 0x1110046
    
        invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
    
        move-result v9
    
        if-eqz v9, :cond_11
    
        :cond_2
        invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z
    
        move-result v9
    
        if-nez v9, :cond_11
    
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
    
        invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
    
        move-result v9
    
        if-nez v9, :cond_11
    
        invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
    
        move-result v9
    
        if-nez v9, :cond_3
    
        const-string v9, "-1"
    
        invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    
        move-result v9
    
        if-nez v9, :cond_11
    
        .line 197
        :cond_3
        :goto_2
        const-string v9, "camera_short_cut"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/SwitchPreferenceScreen;
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
    
        .line 198
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
    
        if-eqz v9, :cond_5
    
        .line 199
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, p0}, Landroid/preference/SwitchPreferenceScreen;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
    
        .line 200
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v9
    
        invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
    
        move-result v9
    
        if-nez v9, :cond_4
    
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
    
        invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
    
        move-result v9
    
        if-eqz v9, :cond_5
    
        .line 202
        :cond_4
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 207
        :cond_5
        invoke-static {}, Lcom/android/settings/Utils;->isDomesticModel()Z
    
        move-result v9
    
        if-nez v9, :cond_6
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v9
    
        invoke-static {v9}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z
    
        move-result v9
    
        if-eqz v9, :cond_7
    
        .line 209
        :cond_6
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 210
        const-string v9, "LockScreenSettings"
    
        const-string v10, " remove Dualclock menu"
    
        invoke-static {v9, v10}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
    
        .line 213
        :cond_7
        const-string v9, "ripple_effect"
    
        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;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        .line 214
        const-string v9, "ja"
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v10
    
        invoke-virtual {v10}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
    
        move-result-object v10
    
        iget-object v10, v10, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
    
        invoke-virtual {v10}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;
    
        move-result-object v10
    
        invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    
        move-result v9
    
        if-eqz v9, :cond_12
    
        const-string v1, ""
    
        .line 215
        .local v1, dot:Ljava/lang/String;
        :goto_3
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        new-instance v10, Ljava/lang/StringBuilder;
    
        invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v11
    
        const v12, 0x7f090cdc
    
        invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
    
        move-result-object v11
    
        invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v10
    
        invoke-virtual {v10, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v10
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v11
    
        const v12, 0x7f090d26
    
        invoke-virtual {v11, v12}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
    
        move-result-object v11
    
        invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v10
    
        invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    
        move-result-object v10
    
        invoke-virtual {v9, v10}, Landroid/preference/CheckBoxPreference;->setSummary(Ljava/lang/CharSequence;)V
    
        .line 217
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v9
    
        const-string v10, "pen_hovering_ink_effect"
    
        const/4 v11, 0x0
    
        invoke-static {v9, v10, v11}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v3
    
        .line 218
        .local v3, mInkEffectColor:I
        const-string v9, "ink_effect"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/PreferenceScreen;
    
        iput-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
    
        .line 219
        const-string v9, "help_text"
    
        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;->mHelpText:Landroid/preference/CheckBoxPreference;
    
        .line 220
        const-string v9, "say_your_wakeup"
    
        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;->mSayCommand:Landroid/preference/CheckBoxPreference;
    
        .line 223
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        if-eqz v9, :cond_8
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v9
    
        invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
    
        move-result v9
    
        if-eqz v9, :cond_8
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v9
    
        const v10, 0x1110049
    
        invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getBoolean(I)Z
    
        move-result v9
    
        if-eqz v9, :cond_9
    
        :cond_8
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
    
        invoke-virtual {v9}, Lcom/android/internal/widget/LockPatternUtils;->usingSignatureUnlock()Z
    
        move-result v9
    
        if-eqz v9, :cond_a
    
        .line 225
        :cond_9
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 229
        :cond_a
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v5
    
        .line 230
        .local v5, ps:Landroid/preference/PreferenceScreen;
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
    
        invoke-virtual {v5, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 234
        const-string v9, "set_wakeup_command"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v7
    
        check-cast v7, Landroid/preference/PreferenceScreen;
    
        .line 235
        .local v7, setWakeupCommand:Landroid/preference/PreferenceScreen;
        if-eqz v7, :cond_d
    
        .line 236
        invoke-virtual {v7}, Landroid/preference/PreferenceScreen;->getIntent()Landroid/content/Intent;
    
        move-result-object v8
    
        .line 237
        .local v8, set_wakeup_commant_intent:Landroid/content/Intent;
        if-eqz v8, :cond_d
    
        .line 238
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getActivity()Landroid/app/Activity;
    
        move-result-object v9
    
        invoke-virtual {v9}, Landroid/app/Activity;->getPackageManager()Landroid/content/pm/PackageManager;
    
        move-result-object v4
    
        .line 239
        .local v4, pm:Landroid/content/pm/PackageManager;
        const/4 v9, 0x0
    
        invoke-virtual {v4, v8, v9}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
    
        move-result-object v2
    
        .line 240
        .local v2, list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
        invoke-interface {v2}, Ljava/util/List;->size()I
    
        move-result v9
    
        const/4 v10, 0x1
    
        if-ge v9, v10, :cond_d
    
        .line 241
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
    
        if-eqz v9, :cond_b
    
        .line 242
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 243
        :cond_b
        if-eqz v7, :cond_c
    
        .line 244
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        invoke-virtual {v9, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 246
        :cond_c
        const/4 v9, 0x0
    
        invoke-static {v9}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
    
        move-result v9
    
        if-eqz v9, :cond_d
    
        .line 247
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v10
    
        const-string v9, "feature_category"
    
        invoke-virtual {p0, v9}, Lcom/android/settings/LockScreenSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v9
    
        check-cast v9, Landroid/preference/PreferenceCategory;
    
        invoke-virtual {v10, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        .line 253
        .end local v2           #list:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
        .end local v4           #pm:Landroid/content/pm/PackageManager;
        .end local v8           #set_wakeup_commant_intent:Landroid/content/Intent;
        :cond_d
        return-void
    
        .line 149
        .end local v0           #ContentsTypeFeature:Ljava/lang/String;
        .end local v1           #dot:Ljava/lang/String;
        .end local v3           #mInkEffectColor:I
        .end local v5           #ps:Landroid/preference/PreferenceScreen;
        .end local v7           #setWakeupCommand:Landroid/preference/PreferenceScreen;
        :cond_e
        const/4 v9, 0x0
    
        goto/16 :goto_0
    
        .line 179
        :cond_f
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v10
    
        const v11, 0x7f0909be
    
        invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
    
        move-result-object v10
    
        invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
    
        goto/16 :goto_1
    
        .line 182
        :cond_10
        iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v10
    
        const v11, 0x7f0909bd
    
        invoke-virtual {v10, v11}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
    
        move-result-object v10
    
        invoke-virtual {v9, v10}, Landroid/preference/SwitchPreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
    
        goto/16 :goto_1
    
        .line 193
        .restart local v0       #ContentsTypeFeature:Ljava/lang/String;
        :cond_11
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
    
        move-result-object v9
    
        iget-object v10, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v9, v10}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
    
        goto/16 :goto_2
    
        .line 214
        :cond_12
        const-string v1, ". "
    
        goto/16 :goto_3
    .end method

    Recompile SecSettings and push all files.

    Enjoy!
    23
    Part TWO



    Decompile SecSettings.apk

    Navigate to res/values/arrays
    Add the followin lines
    Code:
    <string-array name="lockscreen_entries">
            <item>Acer Cloud</item>
            <item>Galaxy SIII Ripple/Circle</item>
            <item>BlackBerry 10</item>
            <item>AOSP LockScreen</item>
            <item>HTC Sense 4.0</item>
            <item>LG Optimus</item>
        </string-array>
        <string-array name="lockscreen_values">
            <item>1</item>
            <item>2</item>
            <item>3</item>
            <item>4</item>
            <item>-1</item>
            <item>-2</item>
        </string-array>

    Navigate to res/xml/lockscreen_settings.xml
    Replace all the code with the following
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <PreferenceScreen android:title="@string/lock_screen"
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
        <ListPreference android:persistent="true" android:entries="@array/lockscreen_entries" android:title="Choose Your LockScreen" android:key="lockscreen_type_key" android:defaultValue="1" android:entryValues="@array/lockscreen_values" />
        <CheckBoxPreference android:title="@string/enable_lockscreen_torch" android:key="enable_lockscreen_torch" android:summary="@string/enable_lockscreen_torch_text" />
        <SwitchPreferenceScreen android:title="@string/lock_screen_shortcut_title" android:key="lock_screen_shortcut" android:summary="@string/lock_screen_shortcut_summary">
            <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.lockscreenshortcut.LockScreenShortcutSettings" />
        </SwitchPreferenceScreen>
        <SwitchPreferenceScreen android:title="@string/information_ticker" android:key="information_ticker" android:summary="@string/information_ticker_summary" android:fragment="com.android.settings.InformationTicker" />
        <CheckBoxPreference android:title="@string/clock" android:key="clock" android:summary="@string/clock_summary" />
        <SwitchPreferenceScreen android:title="@string/dualclock_settings_title" android:key="dualclock_settings" android:summary="@string/dualclock_settings_summary" android:dependency="clock" android:fragment="com.android.settings.dualclock.DualClockSetting" />
        <SwitchPreferenceScreen android:title="@string/weather" android:key="weather" android:summary="@string/weather_summary" />
        <CheckBoxPreference android:title="@string/ripple_effect" android:key="ripple_effect" android:summary="@string/ripple_effect_summary" />
        <PreferenceScreen android:title="@string/ink_effect" android:key="ink_effect">
            <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.InkeffectPreview" />
        </PreferenceScreen>
        <CheckBoxPreference android:title="@string/help_text_title" android:key="help_text" android:summary="@string/help_text_summary" />
        <PreferenceCategory android:title="@string/features_category_title" android:key="feature_category" />
        <SwitchPreferenceScreen android:title="@string/motion_camera_short_cut_title" android:key="camera_short_cut" android:summary="@string/motion_camera_short_cut_summary" android:fragment="com.android.settings.motion.MotionView">
            <extra android:name="title" android:value="@string/motion_camera_short_cut_title" />
            <extra android:name="sensitivity" android:value="false" />
        </SwitchPreferenceScreen>
        <CheckBoxPreference android:title="@string/samsung_unlock_option_say_your_wakeup_command_to_unlock_screen" android:key="say_your_wakeup" android:summary="@string/wakeup_in_lockscreen_summary" />
        <PreferenceScreen android:title="@string/samsung_unlock_option_set_wakeup_command" android:key="set_wakeup_command">
            <intent android:action="android.intent.action.VOICE_SETTING_SET_WAKEUP_COMMAND" />
        </PreferenceScreen>
    </PreferenceScreen>

    Navigate to smali/com/android/settings/LockScreenSettings.smali
    Add the following code at the top of the file
    Code:
    .field private mLockScreenStylePref:Landroid/preference/ListPreference;

    Find the following method
    Code:
    .method private updateState()V

    Replace the entire method with the following code
    Code:
    .method private updateState()V
        .locals 9
    
        .prologue
        const/4 v5, 0x1
    
        const/4 v6, 0x0
    
        .line 263
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenTorch:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v8, "enable_lockscreen_torch"
    
        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_12
    
        move v4, v5
    
        :goto_0
        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
    
        const-string v8, "show_clock"
    
        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
    
        :goto_1
        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
    
        const-string v7, "aw_daemon_service_key_app_service_status"
    
        invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v4
    
        and-int/lit8 v2, v4, 0x1
    
        .line 267
        .local v2, mAppLockScreen:I
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v7, "pen_hovering_ink_effect"
    
        invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v3
    
        .line 269
        .local v3, mInkEffectColor:I
        const-string v4, "LockScreenSettings"
    
        new-instance v7, Ljava/lang/StringBuilder;
    
        invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
    
        const-string v8, "mInkEffectColor : "
    
        invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v7
    
        invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
    
        move-result-object v7
    
        invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    
        move-result-object v7
    
        invoke-static {v4, v7}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I
    
        .line 271
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
    
        if-eqz v4, :cond_0
    
        .line 272
        if-ne v2, v5, :cond_8
    
        .line 273
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v4, v5}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
    
        .line 278
        :cond_0
        :goto_2
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mDualclock:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v8, "dualclock_menu_settings"
    
        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_9
    
        move v4, v5
    
        :goto_3
        invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
    
        .line 279
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        if-eqz v4, :cond_1
    
        .line 280
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mInformationTicker:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v8, "information_ticker"
    
        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_a
    
        move v4, v5
    
        :goto_4
        invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
    
        .line 282
        :cond_1
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
    
        if-eqz v4, :cond_2
    
        .line 283
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mCameraShortCut:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v8, "motion_unlock_camera_short_cut"
    
        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_b
    
        move v4, v5
    
        :goto_5
        invoke-virtual {v7, v4}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
    
        .line 286
        :cond_2
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v7, "lockscreen_wallpaper"
    
        invoke-static {v4, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v4
    
        if-ne v4, v5, :cond_c
    
        move v0, v6
    
        .line 287
        .local v0, isLiveWallpaper:Z
        :goto_6
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v7, "lock_motion_tilt_to_unlock"
    
        invoke-static {v4, v7, v6}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v1
    
        .line 289
        .local v1, isMotionLock:I
        if-nez v0, :cond_3
    
        if-lez v1, :cond_d
    
        .line 290
        :cond_3
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
    
        .line 293
        :goto_7
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v8, "lockscreen_ripple_effect"
    
        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_e
    
        move v4, v5
    
        :goto_8
        invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    	
    	invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v7, "lockscreen_type_key"
    
        invoke-static {v4, v7, v6}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v1
    	
    	const/4 v0, 0x1
    
        if-eq v1, v0, :cond_13
        
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
    	
    	invoke-virtual {v4, v6}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    	
    	:goto_9
    	
    
        :goto_a
        .line 294
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
    
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v7}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v7
    
        invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->setEnabled(Z)V
    
        .line 295
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getResources()Landroid/content/res/Resources;
    
        move-result-object v7
    
        iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mInkEffectSummary:[I
    
        aget v8, v8, v3
    
        invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
    
        move-result-object v7
    
        invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->setSummary(Ljava/lang/CharSequence;)V
    
        .line 297
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;
    
        if-eqz v4, :cond_4
    
        .line 298
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mHelpText:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v8, "unlock_text"
    
        invoke-static {v4, v8, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v4
    
        if-eqz v4, :cond_f
    
        move v4, v5
    
        :goto_b
        invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    
        .line 300
        :cond_4
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
    
        if-eqz v4, :cond_5
    
        .line 301
        iget-object v7, p0, Lcom/android/settings/LockScreenSettings;->mSayCommand:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v4
    
        const-string v8, "wake_up_lock_screen"
    
        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_10
    
        move v4, v5
    
        :goto_c
        invoke-virtual {v7, v4}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    
        .line 304
        :cond_5
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
    
        if-eqz v4, :cond_6
    
        .line 305
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mLockScreenShortcut:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v7
    
        const-string v8, "lock_screen_shortcut"
    
        invoke-static {v7, v8, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v7
    
        if-ne v7, v5, :cond_11
    
        :goto_d
        invoke-virtual {v4, v5}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
    
        .line 308
        :cond_6
        return-void
    
        .end local v0           #isLiveWallpaper:Z
        .end local v1           #isMotionLock:I
        .end local v2           #mAppLockScreen:I
        .end local v3           #mInkEffectColor:I
        :cond_7
        move v4, v6
    
        .line 263
        goto/16 :goto_1
    
        .line 275
        .restart local v2       #mAppLockScreen:I
        .restart local v3       #mInkEffectColor:I
        :cond_8
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mWeather:Landroid/preference/SwitchPreferenceScreen;
    
        invoke-virtual {v4, v6}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
    
        goto/16 :goto_2
    
        :cond_9
        move v4, v6
    
        .line 278
        goto/16 :goto_3
    
        :cond_a
        move v4, v6
    
        .line 280
        goto/16 :goto_4
    
        :cond_b
        move v4, v6
    
        .line 283
        goto/16 :goto_5
    
        :cond_c
        move v0, v5
    
        .line 286
        goto/16 :goto_6
    
        .line 292
        .restart local v0       #isLiveWallpaper:Z
        .restart local v1       #isMotionLock:I
        :cond_d
        iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
    
        goto/16 :goto_7
    
        :cond_e
        move v4, v6
    
        .line 293
        goto :goto_8
    
        :cond_f
        move v4, v6
    
        .line 298
        goto :goto_b
    
        :cond_10
        move v4, v6
    
        .line 301
        goto :goto_c
    
        :cond_11
        move v5, v6
    
        .line 305
        goto :goto_d
    
        :cond_12
        move v4, v6
    
        .line 263
        goto/16 :goto_0
    	
    	:cond_13
    	iget-object v4, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setEnabled(Z)V
    	
    	invoke-virtual {v4, v5}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    	
    	goto/16 :goto_9
    	
    	:cond_14
    	move v4, v6
    	
    	goto/16 :goto_a
    .end method


    Go to the next post to continue.....
    10
    So here is what I am going to do to try and dispell any concerns about which IDs are or are not correct. I am going to put the following files into a zip and attach it to this post.

    THIS IS NOT A FLASHABLE ZIP!!

    1.) Original untouched 4.1.2 LockScreenSettings.smali
    2.) Edited 4.1.2 LockScreenSettings.smali that contains code for multi-lockscreen and lockscreen torch (verified working)
    Use these two files to diff out your code

    3.) Edited 4.1.2 android.policy.jar with all lockscreen mods, files and correct IDs
    4.) Edited 4.1.2 framework-res.apk with correct IDs and necessary lockscreen.xmls

    Please follow the guide and use these files too reference the code and you should be golden!

    I went ahead and modded this LockScreenSettings.smali for you guys so you can diff it out even though I dont use this method anymore. Like I mentioned earlier, all my SecSettings smali code is in my own file now which you will be able to see later tonight when I update my Multi-Mod thread. If you have garbled lockscreens the problem is in the IDs. If your selections are not taking or switching correctly,its likely in the LockScreenSettings.smali or in theLockScreenKeyguardView.smali in android.policy.jar. Good luck. If you have questions post them up here, my PM inbox is off the hook and it hurts my head to even look at it :).

    Download Multi-Lock Files
    7
    Thanks for the thanks! :)

    Keep an eye out in the next few hours....got a new MOD coming I know you all will enjoy!
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone