diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-03-21 20:40:18 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-03-21 20:40:18 +0000 |
commit | b15bef5757c932f0268ef645fd86c76398dcf9fb (patch) | |
tree | b226ed103c6f7ebe8fad138d131f56c9e1b3cd6c | |
parent | a9e7c139eb75427e9dd03706b3ff417ba504f55d (diff) | |
parent | 492178bd87e4d94a8ddd004371162c4118cd6121 (diff) | |
download | Nfc-b15bef5757c932f0268ef645fd86c76398dcf9fb.tar.gz |
Merge "[Nfc test] Register a callback when uid importance change to bg." into main
-rw-r--r-- | tests/unit/src/com/android/nfc/ForegroundUtilsTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/src/com/android/nfc/ForegroundUtilsTest.java b/tests/unit/src/com/android/nfc/ForegroundUtilsTest.java index 23a0e2c6..5ce638ed 100644 --- a/tests/unit/src/com/android/nfc/ForegroundUtilsTest.java +++ b/tests/unit/src/com/android/nfc/ForegroundUtilsTest.java @@ -124,6 +124,10 @@ public class ForegroundUtilsTest { List<Integer> uids = mForegroundUtils.getForegroundUids(); Assert.assertNotNull(uids); Assert.assertTrue(uids.size() > 0); + ForegroundUtils.Callback callback = uid -> { + Log.d(TAG, "testOnUidImportanceBackground callback received"); + }; + mForegroundUtils.registerUidToBackgroundCallback(callback, 0); SparseArray<List<ForegroundUtils.Callback>> backGroundCallbacks = mForegroundUtils.getBackgroundCallbacks(); @@ -136,4 +140,4 @@ public class ForegroundUtilsTest { callbacks = backGroundCallbacks.get(0); Assert.assertNull(callbacks); } -}
\ No newline at end of file +} |