summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Neil Fuller <nfuller@google.com> 2023-02-15 19:20:53 +0000
committer Neil Fuller <nfuller@google.com> 2023-02-20 09:59:48 +0000
commit98b532f5b294f30144b821511f52e59171ac67dd (patch)
treef03af5eb814828ba5bb63c6874838fe951d59a69
parentfedd356d5c0a138d64d229e8f7bfe4cc7a729851 (diff)
Target alarm manager intent with package
Target alarm manager intent with package: The purpose of the intent is to trigger network time refreshes so there should be no reason for other components to listen for it. This was suggested by the Android broadcasts team. Test: manual / treehugger Bug: 269425914 Change-Id: I2cf26ffe47abbb9abdcb039bd9387a7275db501e (cherry picked from commit 264eac123f5e8e3ae57fa016c73d8a038281e73c)
-rw-r--r--services/core/java/com/android/server/timedetector/NetworkTimeUpdateService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/timedetector/NetworkTimeUpdateService.java b/services/core/java/com/android/server/timedetector/NetworkTimeUpdateService.java
index 080929729fe3..5bbbbbbab5c3 100644
--- a/services/core/java/com/android/server/timedetector/NetworkTimeUpdateService.java
+++ b/services/core/java/com/android/server/timedetector/NetworkTimeUpdateService.java
@@ -115,7 +115,7 @@ public class NetworkTimeUpdateService extends Binder {
TimeDetectorInternal timeDetectorInternal =
LocalServices.getService(TimeDetectorInternal.class);
// Broadcast alarms sent by system are immutable
- Intent pollIntent = new Intent(ACTION_POLL, null);
+ Intent pollIntent = new Intent(ACTION_POLL, null).setPackage("android");
PendingIntent pendingPollIntent = PendingIntent.getBroadcast(mContext, POLL_REQUEST,
pollIntent, PendingIntent.FLAG_IMMUTABLE);
mRefreshCallbacks = new Engine.RefreshCallbacks() {