diff options
author | 2024-07-01 14:06:22 +0000 | |
---|---|---|
committer | 2024-07-01 14:25:53 +0000 | |
commit | 50d4afbca0a06c92eff9f75df58031d8cb385824 (patch) | |
tree | 4b5f284e8ed56e3a96f26951a2b1cf54cf98d735 | |
parent | 15db1610f22de09317fe8ae4b65dd5e1e25ef6a8 (diff) |
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
-rw-r--r-- | src/com/android/documentsui/BaseActivity.java | 1 | ||||
-rw-r--r-- | src/com/android/documentsui/DocumentsApplication.java | 10 |
2 files changed, 0 insertions, 11 deletions
diff --git a/src/com/android/documentsui/BaseActivity.java b/src/com/android/documentsui/BaseActivity.java index 597119e4e..a1dc0b99b 100644 --- a/src/com/android/documentsui/BaseActivity.java +++ b/src/com/android/documentsui/BaseActivity.java @@ -456,7 +456,6 @@ public abstract class BaseActivity mPreferencesMonitor.stop(); mSortController.destroy(); DocumentsApplication.invalidateUserManagerState(this); - DocumentsApplication.invalidateConfigStore(); super.onDestroy(); } diff --git a/src/com/android/documentsui/DocumentsApplication.java b/src/com/android/documentsui/DocumentsApplication.java index f006e0334..ffaa5d740 100644 --- a/src/com/android/documentsui/DocumentsApplication.java +++ b/src/com/android/documentsui/DocumentsApplication.java @@ -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); } |