| commit | 626861c7e55f92743fc78028ed7fbe844ad349c9 | [log] [tgz] |
|---|---|---|
| author | Gazal Agarwal <agazal@google.com> | Tue Feb 18 11:42:39 2025 -0800 |
| committer | Gazal Agarwal <agazal@google.com> | Tue Feb 18 11:42:39 2025 -0800 |
| tree | cccdc0ba54dd163ebfdf327b6d7156c9ebfe0af1 | |
| parent | da652bc8fe37c1b182b1ceb44c6309dc13463752 [diff] |
Use vendor record key when interacting with mVendorService Bug: 387875371 Change-Id: Ie62ae44b88933ea1a12a2ec87c23a76c3180913c Flag: EXEMPT bug fix Test: Build and flash. Ensure the correct offload keys are sent to the vendorService
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 {