Differential D9514 Diff 30362 src/org/kde/kdeconnect/Plugins/SharePlugin/NotificationUpdateCallback.java
Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/SharePlugin/NotificationUpdateCallback.java
Show All 33 Lines | 30 | NotificationUpdateCallback(Context context, Device device, ArrayList<NetworkPacket> toSend) { | |||
---|---|---|---|---|---|
34 | this.res = context.getResources(); | 34 | this.res = context.getResources(); | ||
35 | 35 | | |||
36 | String title; | 36 | String title; | ||
37 | if (toSend.size() > 1) { | 37 | if (toSend.size() > 1) { | ||
38 | title = res.getString(R.string.outgoing_files_title, device.getName()); | 38 | title = res.getString(R.string.outgoing_files_title, device.getName()); | ||
39 | } else { | 39 | } else { | ||
40 | title = res.getString(R.string.outgoing_file_title, device.getName()); | 40 | title = res.getString(R.string.outgoing_file_title, device.getName()); | ||
41 | } | 41 | } | ||
42 | | ||||
42 | notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); | 43 | notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE); | ||
43 | builder = new NotificationCompat.Builder(context) | 44 | builder = new NotificationCompat.Builder(context, NotificationHelper.getDefaultChannelId(notificationManager)) | ||
44 | .setSmallIcon(android.R.drawable.stat_sys_upload) | 45 | .setSmallIcon(android.R.drawable.stat_sys_upload) | ||
45 | .setAutoCancel(true) | 46 | .setAutoCancel(true) | ||
46 | .setProgress(100, 0, false) | 47 | .setProgress(100, 0, false) | ||
47 | .setContentTitle(title) | 48 | .setContentTitle(title) | ||
48 | .setTicker(title); | 49 | .setTicker(title); | ||
49 | 50 | | |||
50 | notificationId = (int) System.currentTimeMillis(); | 51 | notificationId = (int) System.currentTimeMillis(); | ||
51 | 52 | | |||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |