Merge "[SettingsProvider] do not close MemoryIntArray if in system server" into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-12 21:28:59 +00:00
committed by Android (Google) Code Review

View File

@@ -3036,7 +3036,9 @@ public final class Settings {
public void destroy() {
try {
if (!mArray.isClosed()) {
// If this process is the system server process, mArray is the same object as
// the memory int array kept inside SettingsProvider, so skipping the close()
if (!Settings.isInSystemServer() && !mArray.isClosed()) {
mArray.close();
}
} catch (IOException e) {