plusonelabs / calendar-widget

An calender widget for your Android home screen.
Apache License 2.0
369 stars 127 forks source link

Text size setting is not kept upon force close #331

Closed slabua closed 5 years ago

slabua commented 5 years ago

After updating to v. 3.0.10-530 I noticed that the text size is not maintained over time. I found that it is deterministically reproducible as follows:

  1. Set text size to anything other than Medium;
  2. Exit the app and verify the widget appearance has indeed changed as specified;
  3. Force close the app;
  4. Open the app and check the widget's text size settings;
  5. Note that the size has reverted to Medium.

The effect might not be immediately visible on the widget as per refresh time, but the setting is not kept. This happens also without force closing the app, perhaps by the battery optimisation process of android, the text setting gets reverted after some time probably due to that. Force closing the app is the immediate way to test this behaviour.

yvolk commented 5 years ago

Hi @slabua I couldn't reproduce the same behaviour yet on my two devices.

Test 2. Could you try, if other changed settings are lost also. Please change Future events background noticeably and repeat your steps.

I suspect that on your device preferences aren't fully stored at internal card on step 2, and this is why they are lost on "Force close the app". In any case, so far I don't see, why "Text size" is so special.

Please try the same with other settings.

yvolk commented 5 years ago

To all, who want to help, Please try also the below test:

Test 3.

  1. Change Text size of the widget to "Very small"
  2. Press home button and make sure, looking at the widget, that changes applied.
  3. Reboot your device normally (via reboot menu item in your device...)
  4. Check if Text size persisted.

In any case: success or failure, please report your device model and Android version.

slabua commented 5 years ago

Hi @yvolk, I tried test 2 and 3. I have no problems with test 2, as the settings are correctly saved. Test 3, though, keeps failing.

I thought that the failing settings were only the radio buttons under Other settings, so I had a try also with the time format, but that one persisted fine. For some reason, only the text size is not being saved for me.

I'm using a Pixel 3a with Android 10 (QP1A.190711.020.C3)

A little background: before the big-changes-version, it was working fine. After updating and noticing that the widget wasn't working at all, and reading that one had to completely remove the old version and reinstall the new version, I did as advised. So I'm pretty confident that any old data has been wiped during the reinstall process. But if there's anything I should try, check presence/absence/permission of some files in some path, just let me know.

yvolk commented 5 years ago

I found the bug :-), inspecting the code. Text size scale was not stored properly (absence of strongly typed values...)) I could reproduce the bug in Android 9 emulator (test 3 above) and checked that it is fixed now.

What still puzzles me, is that test 3 passed successfully on my Android 7 tablet: Very small and very Large text stayed as is even after reboot... Need more investigation there...

Please test v.3.0.11 here: #320

slabua commented 5 years ago

@yvolk thank you, it works perfectly now : )

yvolk commented 5 years ago

@slabua Thank you for your help!