Skip to content

Commit 5870612

Browse files
committed
feat(manifest): check against current packageName
1 parent a55acaf commit 5870612

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

AndroidSDK/src/com/leanplum/LeanplumFcmProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ public boolean isManifestSetup() {
6161
boolean hasPushFirebaseMessagingService = LeanplumManifestHelper.checkComponent(
6262
LeanplumManifestHelper.ApplicationComponent.SERVICE,
6363
LeanplumPushFirebaseMessagingService.class.getName(), false, null,
64-
Collections.singletonList(LeanplumManifestHelper.MESSAGING_EVENT), null);
64+
Collections.singletonList(LeanplumManifestHelper.MESSAGING_EVENT), context.getPackageName());
6565

6666
boolean hasPushFirebaseListenerService = LeanplumManifestHelper.checkComponent(
6767
LeanplumManifestHelper.ApplicationComponent.SERVICE,
6868
LeanplumPushFcmListenerService.class.getName(), false, null,
69-
Collections.singletonList(LeanplumManifestHelper.INSTANCE_ID_EVENT), null);
69+
Collections.singletonList(LeanplumManifestHelper.INSTANCE_ID_EVENT), context.getPackageName());
7070

7171
boolean hasRegistrationService = LeanplumManifestHelper.checkComponent(
7272
LeanplumManifestHelper.ApplicationComponent.SERVICE,
73-
LeanplumPushRegistrationService.class.getName(), false, null, null, null);
73+
LeanplumPushRegistrationService.class.getName(), false, null, null, context.getPackageName());
7474

7575
if (hasPushFirebaseMessagingService && hasPushFirebaseListenerService && hasRegistrationService) {
7676
Log.i("Firebase Messaging is setup correctly.");

AndroidSDK/src/com/leanplum/LeanplumGcmProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,21 @@ public boolean isManifestSetup() {
132132
LeanplumManifestHelper.REGISTRATION_ACTION), context.getPackageName());
133133
boolean hasPushReceiver = LeanplumManifestHelper.checkComponent(LeanplumManifestHelper.ApplicationComponent.RECEIVER,
134134
LeanplumPushReceiver.class.getName(), false, null,
135-
Collections.singletonList(LeanplumManifestHelper.PUSH_LISTENER_SERVICE_FILTER), null);
135+
Collections.singletonList(LeanplumManifestHelper.PUSH_LISTENER_SERVICE_FILTER), context.getPackageName());
136136

137137
boolean hasReceivers = hasGcmReceiver && hasPushReceiver;
138138

139139
boolean hasPushListenerService = LeanplumManifestHelper.checkComponent(
140140
LeanplumManifestHelper.ApplicationComponent.SERVICE,
141141
LeanplumPushListenerService.class.getName(), false, null,
142-
Collections.singletonList(LeanplumManifestHelper.RECEIVE_ACTION), null);
142+
Collections.singletonList(LeanplumManifestHelper.RECEIVE_ACTION), context.getPackageName());
143143
boolean hasInstanceIdService = LeanplumManifestHelper.checkComponent(
144144
LeanplumManifestHelper.ApplicationComponent.SERVICE,
145145
LeanplumPushInstanceIDService.class.getName(), false, null,
146-
Collections.singletonList(LeanplumManifestHelper.INSTANCE_ID_ACTION), null);
146+
Collections.singletonList(LeanplumManifestHelper.INSTANCE_ID_ACTION), context.getPackageName());
147147
boolean hasRegistrationService = LeanplumManifestHelper.checkComponent(
148148
LeanplumManifestHelper.ApplicationComponent.SERVICE,
149-
LeanplumPushRegistrationService.class.getName(), false, null, null, null);
149+
LeanplumPushRegistrationService.class.getName(), false, null, null, context.getPackageName());
150150

151151
boolean hasServices = hasPushListenerService && hasInstanceIdService && hasRegistrationService;
152152

0 commit comments

Comments
 (0)