Fixed lint API warnings.
This commit is contained in:
parent
108f326d8d
commit
063850b3d8
2 changed files with 7 additions and 5 deletions
|
@ -1,14 +1,15 @@
|
|||
package com.nutomic.ensichat.util
|
||||
|
||||
import android.app.{Notification, NotificationManager, PendingIntent}
|
||||
import android.app.{NotificationManager, PendingIntent}
|
||||
import android.content.{Context, Intent}
|
||||
import android.support.v4.app.NotificationCompat
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import com.nutomic.ensichat.R
|
||||
import com.nutomic.ensichat.activities.ConfirmAddContactActivity
|
||||
import com.nutomic.ensichat.protocol.ChatService.OnMessageReceivedListener
|
||||
import com.nutomic.ensichat.protocol.body.{ResultAddContact, RequestAddContact}
|
||||
import com.nutomic.ensichat.protocol.{Message, Address, User}
|
||||
import com.nutomic.ensichat.protocol.body.{RequestAddContact, ResultAddContact}
|
||||
import com.nutomic.ensichat.protocol.{Address, Message, User}
|
||||
|
||||
/**
|
||||
* Handles [[RequestAddContact]] and [[ResultAddContact]] messages, adds new contacts.
|
||||
|
@ -50,7 +51,7 @@ class AddContactsHandler(context: Context, getUser: (Address) => User, localAddr
|
|||
val pi = PendingIntent.getActivity(context, 0, intent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
|
||||
val notification = new Notification.Builder(context)
|
||||
val notification = new NotificationCompat.Builder(context)
|
||||
.setContentTitle(context.getString(R.string.notification_friend_request, getUser(remote)))
|
||||
.setSmallIcon(R.drawable.ic_launcher)
|
||||
.setContentIntent(pi)
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.nutomic.ensichat.util
|
|||
|
||||
import android.app.{Notification, NotificationManager, PendingIntent}
|
||||
import android.content.{Context, Intent}
|
||||
import android.support.v4.app.NotificationCompat
|
||||
import com.nutomic.ensichat.R
|
||||
import com.nutomic.ensichat.activities.MainActivity
|
||||
import com.nutomic.ensichat.protocol.ChatService.OnMessageReceivedListener
|
||||
|
@ -21,7 +22,7 @@ class NotificationHandler(context: Context) extends OnMessageReceivedListener {
|
|||
return
|
||||
|
||||
val pi = PendingIntent.getActivity(context, 0, new Intent(context, classOf[MainActivity]), 0)
|
||||
val notification = new Notification.Builder(context)
|
||||
val notification = new NotificationCompat.Builder(context)
|
||||
.setSmallIcon(R.drawable.ic_launcher)
|
||||
.setContentTitle(context.getString(R.string.notification_message))
|
||||
.setContentText(text.text)
|
||||
|
|
Reference in a new issue