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

Commit 50d4afbc authored by Aditya's avatar Aditya Committed by Aditya Singh
Browse files

Remove invalidating ConfigStore in onDestroy.

This is causing NPE for cases where `state.configStore`, being
retrieved from `savedInstance` is null. The ConfigStore object was being
nullified in onDestroy because earlier it was using device config flag
which needed to updated in new sessions.

Bug: 348384263
Bug: 348384263
Bug: 335553196
Test: Manually
Flag: EXEMPT bugfix
Change-Id: I6687bee4aef1f73d21a08cfd433c636082148621
parent 15db1610
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -456,7 +456,6 @@ public abstract class BaseActivity
        mPreferencesMonitor.stop();
        mSortController.destroy();
        DocumentsApplication.invalidateUserManagerState(this);
        DocumentsApplication.invalidateConfigStore();
        super.onDestroy();
    }

+0 −10
Original line number Diff line number Diff line
@@ -162,16 +162,6 @@ public class DocumentsApplication extends Application {
        ((DocumentsApplication) context.getApplicationContext()).mUserManagerState = null;
    }

    /**
     * Set {@link #sConfigStore} as null onDestroy of BaseActivity so that new session uses new
     * instance of {@link #sConfigStore}
     */
    public static void invalidateConfigStore() {
        synchronized (DocumentsApplication.class) {
            sConfigStore = null;
        }
    }

    private void onApplyOverlayFinish(boolean result) {
        Log.d(TAG, "OverlayManager.setEnabled() result: " + result);
    }