Skip to content

Commit f4c44b0

Browse files
committed
code cleanup
1 parent 1cb7959 commit f4c44b0

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

android/src/newarch/IntercomModule.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ public static void handleRemotePushMessage(@NonNull Application application, Rem
9393
try {
9494
TaskStackBuilder customStack = TaskStackBuilder.create(application);
9595

96-
// Only add launch intent if app is not in foreground
97-
// This prevents the app from restarting when handling deep links while in foreground
9896
if (!isAppInForeground(application)) {
9997
Intent launchIntent = application.getPackageManager().getLaunchIntentForPackage(application.getPackageName());
10098
if (launchIntent != null) {
@@ -109,12 +107,6 @@ public static void handleRemotePushMessage(@NonNull Application application, Rem
109107
}
110108
}
111109

112-
/**
113-
* Checks if the application is currently in the foreground.
114-
*
115-
* @param application The application context
116-
* @return true if the app is in the foreground, false otherwise
117-
*/
118110
private static boolean isAppInForeground(@NonNull Application application) {
119111
try {
120112
ActivityManager activityManager = (ActivityManager) application.getSystemService(Context.ACTIVITY_SERVICE);

android/src/oldarch/IntercomModule.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ public static void handleRemotePushMessage(@NonNull Application application, Rem
8585
try {
8686
TaskStackBuilder customStack = TaskStackBuilder.create(application);
8787

88-
// Only add launch intent if app is not in foreground
89-
// This prevents the app from restarting when handling deep links while in foreground
9088
if (!isAppInForeground(application)) {
9189
Intent launchIntent = application.getPackageManager().getLaunchIntentForPackage(application.getPackageName());
9290
if (launchIntent != null) {
@@ -101,12 +99,6 @@ public static void handleRemotePushMessage(@NonNull Application application, Rem
10199
}
102100
}
103101

104-
/**
105-
* Checks if the application is currently in the foreground.
106-
*
107-
* @param application The application context
108-
* @return true if the app is in the foreground, false otherwise
109-
*/
110102
private static boolean isAppInForeground(@NonNull Application application) {
111103
try {
112104
ActivityManager activityManager = (ActivityManager) application.getSystemService(Context.ACTIVITY_SERVICE);

0 commit comments

Comments
 (0)