[MOD][SOURCE]Let there be Lockscreen WIDGETS! - On Secure and all enabled

Search This thread

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
I know a lot of people were disappointed that Samsung removed lockscreen widgets on the S5. They are not gone...just hidden...so I brought em back for Alliance and thought i would share here as I know this bothered lots of people! :D

Basically I found a field called ispreviouslook. Changing this to 0x1 enabled them but there was an annoying flicker on unlock. So I went through and replaced the calls to it one or two at a time until I got it working without the flicker.

Thanks to @BeansTown106 and @txr33 who then gave me the heads up on where to enable all widgets and the max number.

Finally I enabled them on secure lockscreen too for good measure.

The guide would be very laborious because there are quite a few replacements. Effectively it is just forcing ispreviouslook to true in places its needed and issecure to false. I have included the unmodded and modded files so devs can compare them and make the necessary changes in Keyguard.apk

If you use this mod please credit Team Alliance. Thanks

Have fun :)
 

Attachments

  • KeyguardWidgetsv2.zip
    204.3 KB · Views: 3,294
Last edited:

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
Screenshot.....

yvyrasyb.jpg


Sent from my SM-G900F using Tapatalk
 

liamstears

Senior Member
Nov 8, 2007
2,287
1,739
Kent
Any chance of getting the modded apk so I can just swap it? Running your latest v4 rom and loving it!
 

Borfas

Senior Member
Feb 1, 2010
788
82
The change wget to be transparent, place it in the center, date time and weather add now. :p:good:
 

txr33

Senior Member
Jan 17, 2011
2,143
4,957
QLD

Borfas

Senior Member
Feb 1, 2010
788
82
because they do not want you to understand, my idea was: wget's be transparent, your wget on lockscreen in beautiful, I wanted to be and clock...
is hard to understand? I apologize if you do not understand, that was my idea, sorry for my bad english.
 

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
because they do not want you to understand, my idea was: wget's be transparent, your wget on lockscreen in beautiful, I wanted to be and clock...
is hard to understand? I apologize if you do not understand, that was my idea, sorry for my bad english.

With this you can put any widget on your lockscreen. So clock or anything else

abehy6u4.jpg


Sent from my SM-G900F using Tapatalk
 

Borfas

Senior Member
Feb 1, 2010
788
82
with that zip can change any lock screen wget in the s5? if we talk about the same thing. if so it would be great.
I put to test, see what happens :)
 

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
with that zip can change any lock screen wget in the s5? if we talk about the same thing. if so it would be great.
I put to test, see what happens :)

Yes but not with this zip. This is just to show what changes to make to enable them

Sent from my SM-G900F using Tapatalk
 

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
Touch the clock. Pull it down...swipe left and press the plus.

Edit....

Ahhh....you need a db entry for kg_multiple_lockscreen setting to 1. This is included in the update I will put in ota tonight

Sent from my SM-G900F using Tapatalk
 
Last edited:

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
Edited my reply. I will edit the source files to make the db entry not needed

Sent from my SM-G900F using Tapatalk
 

Goldie

Inactive Recognized Developer
Oct 16, 2010
9,965
22,758
Could you explain a bit more? I like to learn lol

The settings storage database needs an entry for kg_multiple_lockscreen. This is usually toggled by settings. You can manually add it using sqlite editor app....

9y7a3evy.jpg


...then changing that 0 to 1 will enable it

Sent from my SM-G900F using Tapatalk
 
  • Like
Reactions: bilgerryan

Top Liked Posts

  • There are no posts matching your filters.
  • 58
    I know a lot of people were disappointed that Samsung removed lockscreen widgets on the S5. They are not gone...just hidden...so I brought em back for Alliance and thought i would share here as I know this bothered lots of people! :D

    Basically I found a field called ispreviouslook. Changing this to 0x1 enabled them but there was an annoying flicker on unlock. So I went through and replaced the calls to it one or two at a time until I got it working without the flicker.

    Thanks to @BeansTown106 and @txr33 who then gave me the heads up on where to enable all widgets and the max number.

    Finally I enabled them on secure lockscreen too for good measure.

    The guide would be very laborious because there are quite a few replacements. Effectively it is just forcing ispreviouslook to true in places its needed and issecure to false. I have included the unmodded and modded files so devs can compare them and make the necessary changes in Keyguard.apk

    If you use this mod please credit Team Alliance. Thanks

    Have fun :)
    15
    Screenshot.....

    yvyrasyb.jpg


    Sent from my SM-G900F using Tapatalk
    7
    Ok found the issue for a double clock showing if using a centred clock. How to fix this issue is detailed below.


    Navigate to and open

    Code:
    com\android\keyguard\KeyguardWidgetPager.smali


    then search for the following method

    Code:
    .method public onPageSwitched(Landroid/view/View;I)V


    In this method look for the following code

    Code:
    const/4 v4, 0x1

    there will be two of these and change both of them to the following

    Code:
    const/4 v4, 0x0


    save and recompile and double clock issue should be fixed :good:
    4
    Nice goldie

    Galaxy S5 AllianceROM
    3
    Here's rather odd problem. Whenever I'm swiping over to add a new widget, I get a second clock appear in the far right of the statusbar (as you can see, I prefer centered). If default is already the far right and I'm swiping back and forth through multiple lockscreen widget screens, it appears and disappears.
    The only way I can get it to go away is to go into the clock toggle and pick one, any one, even the same one. ;)
    Yup...confirmed. Will try fix tonight :)