Merge "Fix channels --stats dump" into pi-dev

am: 5de9459c81

Change-Id: I56f1641dbd0f3180fbce8f88b2571be43dcc68a0
This commit is contained in:
Julia Reynolds
2018-04-19 14:06:38 -07:00
committed by android-build-merger

View File

@@ -1284,12 +1284,16 @@ public class RankingHelper implements RankingConfig {
if (r.showBadge != DEFAULT_SHOW_BADGE) {
record.put("showBadge", Boolean.valueOf(r.showBadge));
}
JSONArray channels = new JSONArray();
for (NotificationChannel channel : r.channels.values()) {
record.put("channel", channel.toJson());
channels.put(channel.toJson());
}
record.put("channels", channels);
JSONArray groups = new JSONArray();
for (NotificationChannelGroup group : r.groups.values()) {
record.put("group", group.toJson());
groups.put(group.toJson());
}
record.put("groups", groups);
} catch (JSONException e) {
// pass
}