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

Commit 1057e48c authored by Collin Fijalkovich's avatar Collin Fijalkovich
Browse files

Add method for processes to disable SubscriptionManager caches

SubscriptionManager caching causes issues in the HeadsetPhoneStateTests,
so this method enables tests to disable the appropriate caches.

Test: atest BluetoothInstrumentationTests
Bug: 153103337
Change-Id: I8627fac11f90806ed5f5e5c05458ae6a19de8d39
parent 2601b17b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3323,4 +3323,14 @@ public class SubscriptionManager {
    public static void invalidateDefaultDataSubIdCaches() {
        PropertyInvalidatedCache.invalidateCache(CACHE_KEY_DEFAULT_DATA_SUB_ID_PROPERTY);
    }

    /**
     * Allows a test process to disable client-side caching operations.
     *
     * @hide
     */
    public static void disableCaching() {
        sDefaultSubIdCache.disableLocal();
        sDefaultDataSubIdCache.disableLocal();
    }
}