Skip to content

Commit cc0158c

Browse files
Removed unwanted logs
Removed unwanted logs
1 parent e4dfe2f commit cc0158c

File tree

13 files changed

+354
-198
lines changed

13 files changed

+354
-198
lines changed

PushEngageSDK/src/main/java/com/pushengage/pushengage/DataWorker/DailySyncDataWorker.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public DailySyncDataWorker(@NonNull Context appContext, @NonNull WorkerParameter
2929
@NonNull
3030
@Override
3131
public Result doWork() {
32-
Log.i(TAG, "Syncing Data with Server");
32+
// Log.i(TAG, "Syncing Data with Server");
3333
prefs = new PEPrefs(getApplicationContext());
3434
try {
3535
NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(getApplicationContext());
@@ -45,11 +45,11 @@ public Result doWork() {
4545
}
4646
}
4747
} catch (Throwable e) {
48-
e.printStackTrace();
48+
// e.printStackTrace();
4949
// Technically WorkManager will return Result.failure()
5050
// but it's best to be explicit about it.
5151
// Thus if there were errors, we're return FAILURE
52-
Log.e(TAG, "Error fetching data", e);
52+
// Log.d(TAG, "Error fetching data", e);
5353
return Result.failure();
5454
}
5555
return Result.success();
@@ -59,7 +59,7 @@ public Result doWork() {
5959
@Override
6060
public void onStopped() {
6161
super.onStopped();
62-
Log.i(TAG, "OnStopped called for this worker");
62+
// Log.i(TAG, "OnStopped called for this worker");
6363
}
6464

6565
/**
@@ -77,13 +77,13 @@ public void onResponse(@NonNull Call<GenricResponse> call, @NonNull Response<Gen
7777
GenricResponse genricResponse = response.body();
7878
prefs.setIsNotificationDisabled(updateSubscriberStatusRequest.getIsUnSubscribed());
7979
} else {
80-
Log.e(TAG, "API Failure");
80+
// Log.d(TAG, "API Failure");
8181
}
8282
}
8383

8484
@Override
8585
public void onFailure(@NonNull Call<GenricResponse> call, @NonNull Throwable t) {
86-
Log.e(TAG, "API Failure");
86+
// Log.d(TAG, "API Failure");
8787
}
8888
});
8989
}

PushEngageSDK/src/main/java/com/pushengage/pushengage/DataWorker/WeeklySyncDataWorker.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public WeeklySyncDataWorker(@NonNull Context appContext, @NonNull WorkerParamete
3838
@NonNull
3939
@Override
4040
public Result doWork() {
41-
Log.i(TAG, "Syncing Data with Server");
41+
// Log.i(TAG, "Syncing Data with Server");
4242
try {
4343
callAndroidSync();
4444
} catch (Throwable e) {
45-
e.printStackTrace();
45+
// e.printStackTrace();
4646
// Technically WorkManager will return Result.failure()
4747
// but it's best to be explicit about it.
4848
// Thus if there were errors, we're return FAILURE
49-
Log.e(TAG, "Error fetching data", e);
49+
// Log.d(TAG, "Error fetching data", e);
5050
return Result.failure();
5151
}
5252
return Result.success();
@@ -56,7 +56,7 @@ public Result doWork() {
5656
@Override
5757
public void onStopped() {
5858
super.onStopped();
59-
Log.i(TAG, "OnStopped called for this worker");
59+
// Log.i(TAG, "OnStopped called for this worker");
6060
}
6161

6262
/**
@@ -65,7 +65,7 @@ public void onStopped() {
6565
public void callAndroidSync() {
6666
if (PEUtilities.checkNetworkConnection(getApplicationContext())) {
6767
prefs = new PEPrefs(getApplicationContext());
68-
Log.e(TAG, " SiteKey = " + prefs.getSiteKey());
68+
// Log.d(TAG, " SiteKey = " + prefs.getSiteKey());
6969
Call<AndroidSyncResponse> addRecordsResponseCall = RestClient.getBackendCdnClient(getApplicationContext()).androidSync(prefs.getSiteKey());
7070
addRecordsResponseCall.enqueue(new Callback<AndroidSyncResponse>() {
7171
@Override
@@ -92,16 +92,16 @@ public void onResponse(@NonNull Call<AndroidSyncResponse> call, @NonNull Respons
9292
callUpdateSubscriberHash();
9393
} else {
9494
prefs.setIsSubscriberDeleted(true);
95-
Log.e(TAG, "Site Status = " + androidSyncResponse.getData().getSiteStatus());
95+
// Log.d(TAG, "Site Status = " + androidSyncResponse.getData().getSiteStatus());
9696
}
9797
} else {
98-
Log.e(TAG, "API Failure");
98+
// Log.d(TAG, "API Failure");
9999
}
100100
}
101101

102102
@Override
103103
public void onFailure(@NonNull Call<AndroidSyncResponse> call, @NonNull Throwable t) {
104-
Log.e(TAG, "API Failure");
104+
// Log.d(TAG, "API Failure");
105105
}
106106
});
107107
}
@@ -137,13 +137,13 @@ public void onResponse(@NonNull Call<GenricResponse> call, @NonNull Response<Gen
137137
if (response.isSuccessful()) {
138138
GenricResponse genricResponse = response.body();
139139
} else {
140-
Log.e(TAG, "API Failure");
140+
// Log.d(TAG, "API Failure");
141141
}
142142
}
143143

144144
@Override
145145
public void onFailure(@NonNull Call<GenricResponse> call, @NonNull Throwable t) {
146-
Log.e(TAG, "API Failure");
146+
// Log.d(TAG, "API Failure");
147147
}
148148
});
149149
}

PushEngageSDK/src/main/java/com/pushengage/pushengage/Firebase/PEFirebaseMessagingService.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private void sendNotification(PayloadPOJO payload, Boolean isSponsored) {
196196
notificationBuilder.addAction(iconResourceId, ab.getL(), actionButtonsPendingIntent);
197197
}
198198
} catch (JSONException e) {
199-
e.printStackTrace();
199+
// e.printStackTrace();
200200
}
201201
}
202202

@@ -219,7 +219,7 @@ private void sendNotification(PayloadPOJO payload, Boolean isSponsored) {
219219
} catch (Exception e) {
220220
notificationBuilder.setSmallIcon(R.drawable.ic_stat_notification_default);
221221
notificationBuilder.setSmallIcon(R.drawable.ic_stat_notification_default);
222-
e.printStackTrace();
222+
// e.printStackTrace();
223223
}
224224
} else {
225225
try {
@@ -231,7 +231,7 @@ private void sendNotification(PayloadPOJO payload, Boolean isSponsored) {
231231
} catch (Exception e) {
232232
notificationBuilder.setSmallIcon(R.drawable.ic_stat_notification_default);
233233
notificationBuilder.setSmallIcon(R.drawable.ic_stat_notification_default);
234-
e.printStackTrace();
234+
// e.printStackTrace();
235235
}
236236
}
237237

@@ -265,14 +265,14 @@ private void sendNotification(PayloadPOJO payload, Boolean isSponsored) {
265265
}
266266

267267
} catch (Exception e) {
268-
e.printStackTrace();
268+
// e.printStackTrace();
269269
}
270270

271271
// Method to Create channel
272272
try {
273273
setChannelInfo(ci, notificationManager, notificationBuilder, payload, false);
274274
} catch (Exception e) {
275-
e.printStackTrace();
275+
// e.printStackTrace();
276276
}
277277

278278
}
@@ -308,7 +308,7 @@ public void onLoadCleared(@Nullable Drawable placeholder) {
308308
});
309309

310310
} catch (Exception e) {
311-
Log.e(TAG, "Payload Image Exception");
311+
// Log.d(TAG, "Payload Image Exception");
312312
}
313313
}
314314
// Setting notification Large Icon.
@@ -330,7 +330,7 @@ public void onLoadCleared(@Nullable Drawable placeholder) {
330330
});
331331

332332
} catch (Exception e) {
333-
Log.e(TAG, "Payload Large Image Exception");
333+
// Log.d(TAG, "Payload Large Image Exception");
334334
}
335335
}
336336

@@ -354,7 +354,7 @@ public void onLoadCleared(@Nullable Drawable placeholder) {
354354
}
355355
});
356356
} catch (Exception e) {
357-
e.printStackTrace();
357+
// e.printStackTrace();
358358
}
359359
}
360360

@@ -476,7 +476,7 @@ private void setChannelInfo(String channelId, NotificationManager notificationMa
476476
notificationBuilder.setSound(soundUri);
477477
}
478478
} catch (Exception e) {
479-
e.printStackTrace();
479+
// e.printStackTrace();
480480
}
481481

482482
// Setting notification vibration for Devices older than Android O.
@@ -496,7 +496,7 @@ private void setChannelInfo(String channelId, NotificationManager notificationMa
496496
notificationBuilder.setVibrate(array);
497497
}
498498
} catch (Exception e) {
499-
e.printStackTrace();
499+
// e.printStackTrace();
500500
}
501501
}
502502
// Publish Notification
@@ -529,7 +529,7 @@ public void onResponse(@NonNull Call<FetchResponse> call, @NonNull Response<Fetc
529529
}
530530
sendNotification(payloadPOJO, true);
531531
} else if (response.code() != 404) {
532-
Log.e(TAG, "API Failure");
532+
// Log.d(TAG, "API Failure");
533533
if (!isRetry) {
534534
new Timer().schedule(new TimerTask() {
535535
@Override
@@ -551,7 +551,7 @@ public void run() {
551551

552552
@Override
553553
public void onFailure(@NonNull Call<FetchResponse> call, @NonNull Throwable t) {
554-
Log.e(TAG, "API Failure");
554+
// Log.d(TAG, "API Failure");
555555
if (!isRetry) {
556556
new Timer().schedule(new TimerTask() {
557557
@Override
@@ -626,7 +626,7 @@ private NotificationChannel setChannelVibration(NotificationChannel channel, Str
626626
channel.setVibrationPattern(array);
627627
}
628628
} catch (Exception e) {
629-
e.printStackTrace();
629+
// e.printStackTrace();
630630
}
631631
return channel;
632632
}
@@ -651,7 +651,7 @@ private NotificationChannel setChannelLedColor(NotificationChannel channel, Stri
651651
channel.setLightColor(Color.parseColor("#" + colorCode));
652652
}
653653
} catch (Exception e) {
654-
e.printStackTrace();
654+
// e.printStackTrace();
655655
}
656656
return channel;
657657
}
@@ -678,7 +678,7 @@ public void notificationView(String tag, boolean isRetry) {
678678
public void onResponse(@NonNull Call<GenricResponse> call, @NonNull Response<GenricResponse> response) {
679679
if (response.isSuccessful()) {
680680
GenricResponse genricResponse = response.body();
681-
Log.e(TAG, "API Success");
681+
// Log.d(TAG, "API Success");
682682
} else {
683683
if (!isRetry) {
684684
new Timer().schedule(new TimerTask() {
@@ -696,7 +696,7 @@ public void run() {
696696
errorLogRequest.setName(PEConstants.VIEW_COUNT_TRACKING_FAILED);
697697
errorLogRequest.setData(data);
698698
PEUtilities.addLogs(getApplicationContext(), TAG, errorLogRequest);
699-
Log.e(TAG, "API Failure");
699+
// Log.d(TAG, "API Failure");
700700
}
701701
}
702702
}
@@ -718,7 +718,7 @@ public void run() {
718718
errorLogRequest.setName(PEConstants.VIEW_COUNT_TRACKING_FAILED);
719719
errorLogRequest.setData(data);
720720
PEUtilities.addLogs(getApplicationContext(), TAG, errorLogRequest);
721-
Log.e(TAG, "API Failure");
721+
// Log.d(TAG, "API Failure");
722722
}
723723
}
724724
});
@@ -752,17 +752,17 @@ public void onResponse(@NonNull Call<ChannelResponse> call, @NonNull Response<Ch
752752
channelResponse.getData().getOptions().getBadges(), channelResponse.getData().getOptions().getLockScreen());
753753
daoInterface.insert(channelEntity);
754754
setChannelInfo(channelId, notificationManager, notificationBuilder, payload, false);
755-
Log.d(TAG, "API Success");
755+
// Log.d(TAG, "API Success");
756756
} else {
757757
setChannelInfo(channelId, notificationManager, notificationBuilder, payload, true);
758-
Log.e(TAG, "API Failure");
758+
// Log.d(TAG, "API Failure");
759759
}
760760
}
761761

762762
@Override
763763
public void onFailure(@NonNull Call<ChannelResponse> call, @NonNull Throwable t) {
764764
setChannelInfo(channelId, notificationManager, notificationBuilder, payload, true);
765-
Log.e(TAG, "API Failure");
765+
// Log.d(TAG, "API Failure");
766766
}
767767
});
768768
}
@@ -782,15 +782,15 @@ private void upgradeToken(String token) {
782782
@Override
783783
public void onResponse(@NonNull Call<ResponseBody> call, @NonNull Response<ResponseBody> response) {
784784
if (response.code() < 400) {
785-
Log.d(TAG, "Error Logged");
785+
// Log.d(TAG, "Error Logged");
786786
} else {
787-
Log.e(TAG, "API Failure");
787+
// Log.d(TAG, "API Failure");
788788
}
789789
}
790790

791791
@Override
792792
public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) {
793-
Log.e(TAG, "API Failure");
793+
// Log.d(TAG, "API Failure");
794794
}
795795
});
796796
}
@@ -810,13 +810,13 @@ public void onResponse(@NonNull Call<GenricResponse> call, @NonNull Response<Gen
810810
GenricResponse genricResponse = response.body();
811811
prefs.setIsNotificationDisabled(updateSubscriberStatusRequest.getIsUnSubscribed());
812812
} else {
813-
Log.e(TAG, "API Failure");
813+
// Log.d(TAG, "API Failure");
814814
}
815815
}
816816

817817
@Override
818818
public void onFailure(@NonNull Call<GenricResponse> call, @NonNull Throwable t) {
819-
Log.e(TAG, "API Failure");
819+
// Log.d(TAG, "API Failure");
820820
}
821821
});
822822
}

0 commit comments

Comments
 (0)