Skip to content

Commit

Permalink
Ensure all member variables are initialized before registering for li…
Browse files Browse the repository at this point in the history
…fecycle events.
  • Loading branch information
brian-livefront committed Mar 31, 2021
1 parent d71ef82 commit c1d38cd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ class BridgeDelegate {
@Nullable ViewSavedStateHandler viewSavedStateHandler) {
mSavedStateHandler = savedStateHandler;
mViewSavedStateHandler = viewSavedStateHandler;
registerForLifecycleEvents(context);
mDiskHandler = new FileDiskHandler(context, mExecutorService);

registerForLifecycleEvents(context);

// Clear out any data from old storage mechanism
context.getSharedPreferences(TAG, Context.MODE_PRIVATE).edit().clear().apply();
}
Expand Down

0 comments on commit c1d38cd

Please sign in to comment.