[Verizon Samsung Galaxy S III] Didact74:
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:

<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

<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

<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

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

.method createLockScreen()Landroid/view/View;

Replace the entire method with the following

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