Skip to content

Commit 44592b5

Browse files
committed
android: Remove a check on applicationContext's type in FcmListenerService
As Greg points out in #5695 (comment) : > This logic is a bit puzzling; it made me wonder why we have it. > The one line of the function after this doesn't have an obvious > reason to care about the type of the `applicationContext`. > > It looks like the answer is that this function used to interact > with `applicationContext`, until eaa8b40. So until then, this was > needed in order for that to type-check. > > Now we can just take it out.
1 parent da491ac commit 44592b5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

android/app/src/main/java/com/zulipmobile/notifications/FcmListenerService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
public class FcmListenerService extends FirebaseMessagingService {
1212
@Override
1313
public void onMessageReceived(RemoteMessage message) {
14-
final Context applicationContext = getApplicationContext();
15-
if (!(applicationContext instanceof MainApplication)) {
16-
return;
17-
}
1814
NotificationUiManager.onReceived(this, message.getData());
1915
}
2016

0 commit comments

Comments
 (0)