There's a minor issue when restoring a backup, where Setup is not initialized for whatever reason.
Instead of getting the AppSettings through the uninitialized Setup reference , we can access AppSettings directly. It's static anyway and never requires cumbersome initialization.
java.lang.RuntimeException: Setup has not been initialised!
at com.benny.openlauncher.manager.Setup.get(Setup.java:25)
at com.benny.openlauncher.manager.Setup.appSettings(Setup.java:35)
at com.benny.openlauncher.widget.ColorPreferenceCategory.onBindViewHolder(ColorPreferenceCategory.java:30)
at android.support.v7.preference.PreferenceGroupAdapter.onBindViewHolder(PreferenceGroupAdapter.java:381)
at android.support.v7.preference.PreferenceGroupAdapter.onBindViewHolder(PreferenceGroupAdapter.java:45)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6781)
...
Non-breaking, but an improvement
There's a minor issue when restoring a backup, where
Setup
is not initialized for whatever reason. Instead of getting theAppSettings
through the uninitializedSetup
reference , we can accessAppSettings
directly. It's static anyway and never requires cumbersome initialization.after restoring a backup and app is restarted