Merge "Service: transmits empty station list" am: 79b1a4da7a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1942313

Change-Id: I984265cf6ac83d8038dabfe4ac63310781e69fd1
This commit is contained in:
Treehugger Robot
2022-01-18 15:01:22 +00:00
committed by Automerger Merge Worker

View File

@@ -189,7 +189,8 @@ class ProgramInfoCache {
removed.add(id);
}
}
if (modified.isEmpty() && removed.isEmpty() && mComplete == chunk.isComplete()) {
if (modified.isEmpty() && removed.isEmpty() && mComplete == chunk.isComplete()
&& !chunk.isPurge()) {
return null;
}
mComplete = chunk.isComplete();
@@ -239,9 +240,10 @@ class ProgramInfoCache {
}
// Determine number of chunks we need to send.
int numChunks = 0;
int numChunks = purge ? 1 : 0;
if (modified != null) {
numChunks = roundUpFraction(modified.size(), maxNumModifiedPerChunk);
numChunks = Math.max(numChunks,
roundUpFraction(modified.size(), maxNumModifiedPerChunk));
}
if (removed != null) {
numChunks = Math.max(numChunks, roundUpFraction(removed.size(), maxNumRemovedPerChunk));