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
Loading
Please register or sign in to comment