Chainfire / HoleyLight

Notification LED for Samsung/Pixel phones with in-screen camera cut-out (punch-hole)
Other
176 stars 36 forks source link

I've added support for the Note 10 series, But cannot understand Json string #80

Closed djhamilton closed 3 years ago

djhamilton commented 4 years ago

This is not an issue sorry.

But i have added support for the Note 10 series that works perfectly fine, My problem is i am utilising Beyond0's Json string. This is near enough, but needs some fine tweaking to be spot on.

Without spending too much time, i was trying to find out how to change the Scale size, Vertical Position and Horizontal Position. If i can alter these values i can submit you the changes for the Note 10 Support.

Thanks

Chainfire commented 4 years ago

So these JSON strings come from the Samsung firmware itself, I didn't make them. They're an animation format exported from Adobe After Effects.

As the source code states, they're from: SystemUI: assets/face_unlocking_cutout_ic_bX.json

See if you have those files? I'll have a look myself when I have a moment.

Chainfire commented 4 years ago

Hmm, I've looked at the N10+ SystemUI.apk and it seems to have the same JSON as we already have in Holey Light.

Be sure to set your Note's resolution to max, then try beyond0/beyond1/beyond2 to see which gives you the best starting point - I would guess beyond1, based on specs.

Then use the "Tune" option in Holey Light to adjust the settings, those are the same values you can use in NotificationAnimation.java.

djhamilton commented 4 years ago

Hi

Thanks for the reply, I utilised beyond0 by default previously, and this give me the closest result, i did fine tune and it works fine for me. I was just hoping to try and provide perfect layout you could utilise and merge in my changes to have a layout for the Note10 series.

I can submit the changes if you want, Or add them in. Its only a couple of lines:

NotificationAnimation.java

else if (device.startsWith("d2x")) { // Note 10 json = beyond0; dpAddScaleBase = 4; dpAddScaleHorizontal = 0; dpShiftVertical = 0; dpShiftHorizontal = 0; }

The variation of Notes10 are as follow: case "d2x": case "d2xq": case "d2q": case "d2s": case "d1": case "d1q": case "d2xq2": case "d1x":

(Instead of repeating the same code, i just used a case for all models to return Beyond0 )

Chainfire commented 4 years ago

Strange, I'm still of the opinion that Beyond1 should give the closest result (but hey, you have eyes on, so your opinion is better than mine). If you'd also add in your values that you tuned, then other users don't need to fine-tune it themselves...

Pull request always preferred.