val intent = Intent(this, UserTypeActivity::class.java)
// intent.putExtra("noti_type", noti_type)
intent.putExtra("link", data?.get("link"))
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
val pendingIntent = PendingIntent.getActivity(this, 0, intent,
PendingIntent.FLAG_UPDATE or PendingIntent.FLAG_CANCEL_CURENT or PendingIntent.FLAG_IMMUTABLE)
이전에 PendingIntent 불변성 관련해서 오류가 나길래 위와 같이 수정하였고 PendingIntent 클래스를 사용하는 곳은 여기 밖에 없습니다.
하지만 아직도 다음과 같은 오류가 발생합니다.
Fatal Exception: java.lang.IllegalArgumentException kr.or.cwma.ecardapp: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
제가 보는 바로는 불변성에 대해 제대로 지정해 준 것 같은데 도대체 뭐가 문제일까요