From 9bd16b4831607ffb3957bae93d3115ed83bd0f4a Mon Sep 17 00:00:00 2001 From: Shankari Date: Wed, 28 Aug 2024 14:22:35 -0700 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Use=20the=20ExplicitInt?= =?UTF-8?q?ent=20wrapper=20to=20set=20the=20package?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build on https://github.com/e-mission/e-mission-data-collection/pull/233/commits/01c746e35284de284fe3a5bcade47c41f43d9948 by using the ExplicitIntent wrapper that adds the package name. It looks like we handled this earlier, but forgot this location --- .../location/actions/GeofenceLocationIntentService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/android/location/actions/GeofenceLocationIntentService.java b/src/android/location/actions/GeofenceLocationIntentService.java index 97ee9a0..fdd5ad0 100644 --- a/src/android/location/actions/GeofenceLocationIntentService.java +++ b/src/android/location/actions/GeofenceLocationIntentService.java @@ -111,8 +111,7 @@ protected void onHandleIntent(Intent intent) { } private void broadcastLoc(Location loc) { - Intent answerIntent = new Intent(INTENT_NAME); - answerIntent.setPackage(this.getPackageName()); + Intent answerIntent = new ExplicitIntent(this, INTENT_NAME); answerIntent.putExtra(INTENT_RESULT_KEY, loc); Log.i(this, TAG, "broadcasting intent "+answerIntent); LocalBroadcastManager.getInstance(this).sendBroadcast(answerIntent);