Commit be82034d authored by Libin Lu's avatar Libin Lu

remove decode for sound and image

parent 85e0a4ba
......@@ -128,7 +128,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
//large icon
String largeIcon = bundle.getString("large_icon");
if(largeIcon != null && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){
largeIcon = URLDecoder.decode( largeIcon, "UTF-8" );
if (largeIcon.startsWith("http://") || largeIcon.startsWith("https://")) {
Bitmap bitmap = getBitmapFromURL(largeIcon);
notification.setLargeIcon(bitmap);
......@@ -153,7 +152,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
String picture = bundle.getString("picture");
if(picture!=null){
picture = URLDecoder.decode( picture, "UTF-8" );
NotificationCompat.BigPictureStyle bigPicture = new NotificationCompat.BigPictureStyle();
if (picture.startsWith("http://") || picture.startsWith("https://")) {
......@@ -175,7 +173,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
//sound
String soundName = bundle.getString("sound");
if (soundName != null) {
soundName = URLDecoder.decode( soundName, "UTF-8" );
if (soundName.equalsIgnoreCase("default")) {
notification.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
} else {
......@@ -194,7 +191,6 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
String color = bundle.getString("color");
if (color != null) {
color = URLDecoder.decode( color, "UTF-8" );
notification.setColor(Color.parseColor(color));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment