Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 246eeaae authored by Stefan Andonian's avatar Stefan Andonian
Browse files

Add unit test and fix bug related to "Migrate IDP_GRID_NAME usage to LauncherPrefs" CL.

The issue was that kotlin initializes class variables before contructor
variables, but allows constructor variables to be referenced by
the class variables before they are initialized. This led to `isBackedUp`
always being false, and then the SharedPreference store always and only
checking if values were in DEVICE_PREFERENCES rather than the standard
backed up preferences.

The fix is to make the class variable sharedPrefFile lazily retrieved.
That way, isBackedUp will have been initialized and behave correctly.

Bug: 269569568
Test: Everything works on device and manual and unit tests
verified original bug is not present.

Change-Id: I8ab4a5752886ce8f4a2988295fa61c8a2c38ec7c
parent 4c9612be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment