ICE (In Case Of Emergency) field on lock screen

It is 100% safe and fully compatible.

Thank’s for clarifing!

1 Like

This my most important patch doesn’t apply on my JollaC2, and I’m not skilled enough to fix it. :unamused: Maybe @wetab73 or someone else can? I’d be thankful as I know also others will be.

Here’s the patchmanager output…

Summary

pm_apply 2024-12-04T09:03:04+01:00

ice-data-on-lockscreen

Using patch file: /usr/share/patchmanager/patches/ice-data-on-lockscreen/unified_diff.patch


Checking paths for 64-bit → 32-bit conversion

Mangle candidates: /usr/lib/qt5/qml /usr/lib/jolla-mediaplayer /usr/lib/maliit/plugins

OK, found nothing to convert.


Test if already applied patch

checking file usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml
Unreversed patch detected! Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
4 out of 4 hunks ignored


Dry running patch file

checking file usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml
Hunk #1 succeeded at 14 with fuzz 2 (offset -1 lines).
Hunk #2 succeeded at 118 (offset -64 lines).
Hunk #3 FAILED at 202.
Hunk #4 succeeded at 241 (offset -58 lines).
1 out of 4 hunks FAILED

*** FAILED ***

1 Like

I do not have the C2 or access to SFOS 5, so I’d need your help. Can you please provide the contents of usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml file, e.g. paste it to pastebin.com or somewhere else so that I can see what the changes are…?

3 Likes

Thanks for looking in to it.

I think it has something to do with the larger screen on C2.
width: twoColumnMode

1 Like

OK, so the difference is in the following lines, not even the actual code to patch but lines preceding it, used to locate the 3rd piece of code to patch. That’s why it can’t find it and fails.

Before SFOS 5.0 the lines directly preceding the code to patch were

? Theme.paddingLarge
: (lockItem.height - lockItem.contentTopMargin - height) / 2)

whereas in 5.0 on the C2 they are now

+ (clock.cannotCenter ? Theme.paddingLarge
                                                    : (lockItem.height - lockItem.contentTopMargin - height) / 2)
        x: twoColumnMode ? screenY : (lockItem.width - width) / 2
        y: twoColumnMode ? ((Screen.width - height) / 2)
                         : screenY

As a quick and dirty workaround, try replacing in the patch file the following two lines

? Theme.paddingLarge
: (lockItem.height - lockItem.contentTopMargin - height) / 2)

with

        y: twoColumnMode ? ((Screen.width - height) / 2)
                         : screenY

and then it should be able to find the right part of code to patch (Hunk #3) which is directly after those two lines. The whole rest hasn’t changed.

3 Likes

Sorry, it didn’t work. Same error as first.

Patchmanager log

pm_apply 2024-12-18T09:31:55+01:00

custom-text-on-lockscreen

Using patch file: /usr/share/patchmanager/patches/custom-text-on-lockscreen/unified_diff.patch


Checking paths for 64-bit → 32-bit conversion

Mangle candidates: /usr/lib/qt5/qml /usr/lib/jolla-mediaplayer /usr/lib/maliit/plugins

OK, found nothing to convert.


Test if already applied patch

checking file usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml
Unreversed patch detected! Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
4 out of 4 hunks ignored


Dry running patch file

checking file usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml
Hunk #1 succeeded at 14 with fuzz 2 (offset -1 lines).
Hunk #2 succeeded at 118 (offset -64 lines).
Hunk #3 FAILED at 202.
Hunk #4 succeeded at 241 (offset -58 lines).
1 out of 4 hunks FAILED

*** FAILED ***

Please reboot the phone after modifying the file and retry.

I’ll make the new patch file tonight or tomorrow.

4 Likes

Hmpfff… I could have sworn that I did that, but apparently not.
Thank you, thank you, thank you. :+1:

Edit:
I shouldn’t do things like this right before Christmas. Now I was fiddling with my X10III. The C2 still don’t apply this patch, reboot or no reboot. Again sorry, It doesn’t work. :cry:

Maybe someone else should try? I’m obviously not completely reliable at the moment.

2 Likes

OK, so here’s the freshly generated patch:

--- a/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml	2024-12-18 07:44:34.822956100 +0100
+++ b/usr/share/lipstick-jolla-home-qt5/lockscreen/LockItem.qml	2024-12-19 02:42:49.930051784 +0100
@@ -14,6 +14,7 @@
 import Nemo.DBus 2.0
 import com.jolla.lipstick 0.1
 import org.nemomobile.lipstick 0.1
+import org.nemomobile.configuration 1.0
 import "../backgrounds"
 import "../main"
 import "../statusarea"
@@ -117,6 +118,17 @@
         enabled: !lockScreen.lowPowerMode && lockScreen.locked && !lockScreen.panning
         onClicked: hintEdges()
     }
+    
+    ConfigurationGroup {
+        id: config
+        path: "/desktop/lipstick-jolla-home/devicelock/customText"
+        property string firstLine: []
+        property string secondLine: []
+        property string thirdLine: []
+        property string fourthLine: []
+        property int fontSize: Theme.fontSizeLarge
+        property real lineSpacing: 1.0
+}
 
     ContrastBackground {
         id: centerBackground
@@ -128,8 +140,8 @@
         x: twoColumnMode ? screenY : (lockItem.width - width) / 2
         y: twoColumnMode ? ((Screen.width - height) / 2)
                          : screenY
-        width: Math.max(clock.width, weatherIndicator.width)
-        height: clock.height + weatherIndicator.height
+        width: Math.max(clock.width, weatherIndicator.width, if_found.width)
+        height: clock.height + weatherIndicator.height + (Theme.paddingLarge * 2) + (if_found.height * 1.1)
 
         opacity: Math.min(clock.transitionOpacity, clock.unlockOpacity)
 
@@ -229,6 +241,25 @@
             temperatureFontPixelSize: clock.weekdayFont.pixelSize
             active: visible
         }
+        
+        Label {
+          id: if_found
+          
+          anchors {
+              horizontalCenter: clock.horizontalCenter
+              top: weatherIndicator.bottom
+              topMargin: Theme.paddingLarge * 2
+              }
+              
+          font.pixelSize: config.fontSize
+          lineHeightMode: Text.ProportionalHeight
+          lineHeight: config.lineSpacing
+          color: lockScreen.textColor
+          textFormat: Text.RichText
+          horizontalAlignment: Text.AlignHCenter
+          text: (config.firstLine ? config.firstLine + "<br>" : "") + (config.secondLine ? config.secondLine + "<br>" : "") + (config.thirdLine ? config.thirdLine + "<br>" : "") + (config.fourthLine ? config.fourthLine : "")
+          }
+ 
     }
 
     ContrastBackground {

Alternatively, ICE patch - Pastebin.com

4 Likes

Well, this time it is possible to activate, but doesn’t show on lockscreen. Looks great in patch settings, but nothing on lockscreen, no matter what I do.
Phone rebooted and appropriate permissions assigned. No log.

In such case, I’m afraid I won’t be able to do much before my 10 III or V gets SFOS 5.0.0 so that I can test it…

1 Like

I understand completely, and I am grateful for your effort so far. Now we’re all hoping for a soon-to-be-released SFOS5, for the Xperia series. I have one myself, lying on the shelf of the future. :wink:

1 Like

Has there been any more progress on this?

3 Likes