diff options
author | Brad Ebinger <breadley@google.com> | 2021-06-11 12:36:20 -0700 |
---|---|---|
committer | Brad Ebinger <breadley@google.com> | 2021-06-11 12:36:20 -0700 |
commit | 976f0b45b0160e1fc6bdd9cf8df50dd2a3e8eb14 (patch) | |
tree | fc18954d10121c7c8b987fb0cf9c0f15d0af4f55 | |
parent | 4b733da9db01754962d4e4c80040f762352978cb (diff) | |
download | ims-976f0b45b0160e1fc6bdd9cf8df50dd2a3e8eb14.tar.gz |
Always record the latest PIDF + timestamp upon PUBLISH
When PUBLISH completes, always record the latest PIDF and timestamp
info instead of leaving early if the PUBLISH state didnt change.
Bug: 190753196
Test: manual
Change-Id: I528b6465aa010de4ecdd909f1095d2c9f1299401
-rw-r--r-- | src/java/com/android/ims/rcs/uce/presence/publish/PublishControllerImpl.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/com/android/ims/rcs/uce/presence/publish/PublishControllerImpl.java b/src/java/com/android/ims/rcs/uce/presence/publish/PublishControllerImpl.java index e387ca9e..3aadff27 100644 --- a/src/java/com/android/ims/rcs/uce/presence/publish/PublishControllerImpl.java +++ b/src/java/com/android/ims/rcs/uce/presence/publish/PublishControllerImpl.java @@ -900,10 +900,11 @@ public class PublishControllerImpl implements PublishController { } logd("publish state changes from " + mPublishState + " to " + newPublishState + ", time=" + updatedTimestamp); - if (mPublishState == newPublishState) return; - mPublishState = newPublishState; mPublishStateUpdatedTime = updatedTimestamp; mPidfXml = pidfXml; + // Bail early and do not update listeners if the publish state didn't change. + if (mPublishState == newPublishState) return; + mPublishState = newPublishState; } // Trigger the publish state changed in handler thread since it may take time. |