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

Commit 95907a56 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Fix LeakedClosableViolation in SQLiteOpenHelper handling

Bug: 378009798
Test: atest FrameworksTelephonyTests
Flag: EXEMPT bugfix
Change-Id: I34fe3973a3f3197ba137439d7ae7edd61bc4c96c
parent 2f8bf3a0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import androidx.test.filters.SmallTest;

import com.android.internal.telephony.FakeTelephonyProvider;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -176,6 +177,11 @@ public final class RcsConfigTest {
        createFakeSimInfo();
    }

    @After
    public void tearDown() {
        mFakeTelephonyProvider.close();
    }

    @Test
    @SmallTest
    public void testLoadAndUpdateConfigForSub() {
+7 −0
Original line number Diff line number Diff line
@@ -196,4 +196,11 @@ public class FakeTelephonyProvider extends MockContentProvider {
                selectionArgs);
        return count;
    }

    /**
     * Release resources. Must be called each time this class is used.
     */
    public void close() {
        mDbHelper.close();
    }
}