summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Elliot Sisteron <elliotsisteron@google.com> 2023-03-16 12:03:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-03-16 12:03:48 +0000
commit212017f5d8571de90b1b6b73f208607a87b20614 (patch)
treebf28bc761a71387fc6e7678626d86113572ddcac
parent373519f93f774ff06b33d587d9d1f6de9062eebc (diff)
parent737d8ca428652c1030fa010c3160581e39d9bfc4 (diff)
Merge "Set identifier on intent when using extras." into udc-dev
-rw-r--r--service/java/com/android/safetycenter/PendingIntentFactory.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/service/java/com/android/safetycenter/PendingIntentFactory.java b/service/java/com/android/safetycenter/PendingIntentFactory.java
index d8732db0d..813a22a1f 100644
--- a/service/java/com/android/safetycenter/PendingIntentFactory.java
+++ b/service/java/com/android/safetycenter/PendingIntentFactory.java
@@ -111,6 +111,10 @@ public final class PendingIntentFactory {
// In particular, the AOSP Settings app uses this to ensure that two-pane mode works
// correctly.
intent.putExtra(IS_SETTINGS_HOMEPAGE, true);
+ // Given we've added an extra to this intent, set an ID on it to ensure that it is not
+ // considered equal to the same intent without the extra. PendingIntents are cached
+ // using Intent equality as the key, and we want to make sure the extra is propagated.
+ intent.setIdentifier("with_settings_homepage_extra");
}
// queryIntentActivities does not return any activity when the work profile is in quiet