mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Fix some lint errors.
This commit is contained in:
@@ -66,6 +66,7 @@ class Colorizer {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@ColorInt
|
||||
fun getIncomingGroupSenderColor(context: Context, recipient: Recipient): Int {
|
||||
return if (groupMembers.isEmpty()) {
|
||||
@@ -88,6 +89,7 @@ class Colorizer {
|
||||
groupMembers.addAll(serviceIds.sortedBy { it.toString() })
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Deprecated("Not needed for CFv2", ReplaceWith("onGroupMembershipChanged"))
|
||||
fun onNameColorsChanged(nameColorMap: Map<RecipientId, NameColor>) {
|
||||
groupSenderColors.clear()
|
||||
@@ -95,6 +97,7 @@ class Colorizer {
|
||||
colorsHaveBeenSet = true
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@ColorInt
|
||||
private fun getDefaultColor(context: Context, recipient: Recipient): Int {
|
||||
return if (colorsHaveBeenSet) {
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.whispersystems.signalservice.api.push.ServiceId.ACI
|
||||
* Changes needed for edit message. New foreign keys require recreating the table.
|
||||
*
|
||||
*/
|
||||
@Suppress("ClassName")
|
||||
@Suppress("ClassName", "DEPRECATION")
|
||||
object V185_MessageRecipientsAndEditMessageMigration : SignalDatabaseMigration {
|
||||
|
||||
private val TAG = Log.tag(V185_MessageRecipientsAndEditMessageMigration::class.java)
|
||||
|
||||
@@ -19,6 +19,7 @@ import android.telephony.PhoneStateListener
|
||||
import android.telephony.TelephonyManager
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.core.content.IntentCompat
|
||||
import androidx.core.os.bundleOf
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Single
|
||||
@@ -232,6 +233,7 @@ class ActiveCallManager(
|
||||
private fun registerNetworkReceiver() {
|
||||
if (networkReceiver == null) {
|
||||
networkReceiver = NetworkReceiver()
|
||||
@Suppress("DEPRECATION")
|
||||
application.registerReceiver(networkReceiver, IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION))
|
||||
}
|
||||
}
|
||||
@@ -315,6 +317,7 @@ class ActiveCallManager(
|
||||
return type
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
private var hangUpRtcOnDeviceCallAnswered: PhoneStateListener? = null
|
||||
private var notificationDisposable: Disposable = Disposable.disposed()
|
||||
|
||||
@@ -333,6 +336,7 @@ class ActiveCallManager(
|
||||
|
||||
if (!AndroidTelecomUtil.telecomSupported) {
|
||||
try {
|
||||
@Suppress("DEPRECATION")
|
||||
TelephonyUtil.getManager(application).listen(hangUpRtcOnDeviceCallAnswered, PhoneStateListener.LISTEN_CALL_STATE)
|
||||
} catch (e: SecurityException) {
|
||||
Log.w(TAG, "Failed to listen to PSTN call answers!", e)
|
||||
@@ -348,6 +352,7 @@ class ActiveCallManager(
|
||||
super.onDestroy()
|
||||
|
||||
if (!AndroidTelecomUtil.telecomSupported) {
|
||||
@Suppress("DEPRECATION")
|
||||
TelephonyUtil.getManager(application).listen(hangUpRtcOnDeviceCallAnswered, PhoneStateListener.LISTEN_NONE)
|
||||
}
|
||||
}
|
||||
@@ -366,7 +371,7 @@ class ActiveCallManager(
|
||||
}
|
||||
|
||||
val type = intent.getIntExtra(EXTRA_TYPE, 0)
|
||||
val recipient: Recipient = Recipient.resolved(intent.getParcelableExtra(EXTRA_RECIPIENT_ID)!!)
|
||||
val recipient: Recipient = Recipient.resolved(IntentCompat.getParcelableExtra(intent, EXTRA_RECIPIENT_ID, RecipientId::class.java)!!)
|
||||
val isVideoCall = intent.getBooleanExtra(EXTRA_IS_VIDEO_CALL, false)
|
||||
|
||||
if (requiresAsyncNotificationLoad) {
|
||||
@@ -402,6 +407,7 @@ class ActiveCallManager(
|
||||
|
||||
@Suppress("deprecation")
|
||||
private class HangUpRtcOnPstnCallAnsweredListener : PhoneStateListener() {
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onCallStateChanged(state: Int, phoneNumber: String) {
|
||||
super.onCallStateChanged(state, phoneNumber)
|
||||
if (state == TelephonyManager.CALL_STATE_OFFHOOK) {
|
||||
@@ -432,6 +438,7 @@ class ActiveCallManager(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
private class NetworkReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
|
||||
Reference in New Issue
Block a user