| commit | 3035b812f2dff375f621390514064c04b296a373 | [log] [tgz] |
|---|---|---|
| author | Gazal Agarwal <agazal@google.com> | Wed Feb 19 09:41:05 2025 -0800 |
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Feb 19 09:41:05 2025 -0800 |
| tree | cccdc0ba54dd163ebfdf327b6d7156c9ebfe0af1 | |
| parent | a0ce512c1f1c2630992171c54d7cb04b251974e8 [diff] | |
| parent | 626861c7e55f92743fc78028ed7fbe844ad349c9 [diff] |
Use vendor record key when interacting with mVendorService am: 626861c7e5 Original change: https://android-review.googlesource.com/c/device/google/atv/+/3497664 Change-Id: I1a5198f2c64f04287a49eca43fdedde8ca08cdb9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/InterfaceOffloadManager.java b/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/InterfaceOffloadManager.java index 8759883..efe2112 100644 --- a/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/InterfaceOffloadManager.java +++ b/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/InterfaceOffloadManager.java
@@ -81,6 +81,17 @@ mOffloadIntentStore.getPassthroughIntentsForInterface(mNetworkInterface)); } + void retrieveAndClearMetrics() { + if (!mIsNetworkAvailable) { + return; + } + if (!mOffloadWriter.isVendorServiceConnected()) { + Log.e(TAG, "Vendor service disconnected, cannot apply mDNS offload state"); + return; + } + mOffloadWriter.retrieveAndClearMetrics(mCurrentOffloadKeys); + } + private void clearProtocolResponses() { applyOffloadIntents(Collections.emptySet()); }
diff --git a/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/MdnsOffloadManagerService.java b/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/MdnsOffloadManagerService.java index df4b4d3..89bb3ec 100644 --- a/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/MdnsOffloadManagerService.java +++ b/MdnsOffloadManagerService/src/com/android/tv/mdnsoffloadmanager/MdnsOffloadManagerService.java
@@ -462,7 +462,8 @@ if (Intent.ACTION_SCREEN_ON.equals(action)) { Log.d(TAG, "SCREEN_ON"); mOffloadWriter.setOffloadState(false); - mOffloadWriter.retrieveAndClearMetrics(mOffloadIntentStore.getRecordKeys()); + mInterfaceOffloadManagers.values().forEach( + InterfaceOffloadManager::retrieveAndClearMetrics); } else if (Intent.ACTION_SCREEN_OFF.equals(action)) { Log.d(TAG, "SCREEN_OFF"); try {