Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/SharePlugin/ShareNotification.java
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 58 | builder = new NotificationCompat.Builder(device.getContext()) | |||
---|---|---|---|---|---|
64 | .setOngoing(true) | 64 | .setOngoing(true) | ||
65 | .setProgress(100, 0, true); | 65 | .setProgress(100, 0, true); | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | public void show() { | 68 | public void show() { | ||
69 | NotificationHelper.notifyCompat(notificationManager, notificationId, builder.build()); | 69 | NotificationHelper.notifyCompat(notificationManager, notificationId, builder.build()); | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | public void cancel() { | ||||
73 | notificationManager.cancel(notificationId); | ||||
74 | } | ||||
75 | | ||||
72 | public int getId() { | 76 | public int getId() { | ||
73 | return notificationId; | 77 | return notificationId; | ||
74 | } | 78 | } | ||
75 | 79 | | |||
76 | public void setProgress(int progress) { | 80 | public void setProgress(int progress) { | ||
77 | builder.setProgress(100, progress, false) | 81 | builder.setProgress(100, progress, false) | ||
78 | .setContentTitle(device.getContext().getResources().getString(R.string.incoming_file_title, device.getName()) + " (" + progress + "%)"); | 82 | .setContentTitle(device.getContext().getResources().getString(R.string.incoming_file_title, device.getName()) + " (" + progress + "%)"); | ||
79 | } | 83 | } | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |