Merge "Make notification not swipeable"
am: 9b45364bbd
Change-Id: I50462448e0e8071c29b4ba026e211f88e947c719
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
index f8d9d0a..ed89c6f 100644
--- a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
+++ b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
@@ -630,8 +630,8 @@
.setCategory(Notification.CATEGORY_SYSTEM)
.setPriority(Notification.PRIORITY_HIGH)
.setColor(context.getResources().getColor(R.color.notification_color))
- .setVisibility(Notification.VISIBILITY_PUBLIC);
-
+ .setVisibility(Notification.VISIBILITY_PUBLIC)
+ .setOngoing(message.isEmergencyAlertMessage());
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
builder.setDeleteIntent(pi);
@@ -650,7 +650,10 @@
builder.setContentTitle(context.getString(R.string.notification_multiple_title));
builder.setContentText(context.getString(R.string.notification_multiple, unreadCount));
} else {
- builder.setContentTitle(channelName).setContentText(messageBody);
+ builder.setContentTitle(channelName)
+ .setContentText(messageBody)
+ .setStyle(new Notification.BigTextStyle()
+ .bigText(messageBody));
}
notificationManager.notify(NOTIFICATION_ID, builder.build());