package busidol.mobile.fcm; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Intent; import android.media.RingtoneManager; import android.os.Build; import android.util.Log; import androidx.core.app.m; import busidol.mobile.tower.MainActivity; import busidol.mobile.tower.R; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.o0; import h1.a; import i1.e; /* loaded from: classes.dex */ public class MyFirebaseMessagingService extends FirebaseMessagingService { private void v() { Log.d("MyFirebaseMsgService", "Short lived task is done."); } private void w(String str, String str2) { Intent intent = new Intent(this, (Class) MainActivity.class); intent.addFlags(67108864); PendingIntent activity = PendingIntent.getActivity(this, 0, intent, 1140850688); String string = getString(R.string.app_name); m.e i10 = new m.e(this, string).u(R.mipmap.ic_launcher).k(str).j(str2).f(true).v(RingtoneManager.getDefaultUri(2)).i(activity); NotificationManager notificationManager = (NotificationManager) getSystemService("notification"); if (Build.VERSION.SDK_INT >= 26) { notificationManager.createNotificationChannel(a.a(string, "Channel human readable title", 3)); } notificationManager.notify(0, i10.b()); } private void x(String str) { } @Override // com.google.firebase.messaging.FirebaseMessagingService public void q(o0 o0Var) { Log.d("MyFirebaseMsgService", "onMessageReceived"); String str = (String) o0Var.getData().get("title"); String str2 = (String) o0Var.getData().get("message"); String str3 = (String) o0Var.getData().get("lang"); if (str3 != null) { if (e.c()) { if (!str3.equals("KR")) { return; } } else if (!str3.equals("EN")) { return; } } Log.d("MyFirebaseMsgService", "From: " + o0Var.getFrom()); w(str, str2); if (o0Var.getData().size() > 0) { Log.d("MyFirebaseMsgService", "Message data payload: " + o0Var.getData()); v(); } if (o0Var.P() != null) { Log.d("MyFirebaseMsgService", "Message Notification Body: " + o0Var.P().a()); } } @Override // com.google.firebase.messaging.FirebaseMessagingService public void s(String str) { Log.d("MyFirebaseMsgService", "Refreshed token: " + str); x(str); } }