Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/SharePlugin/ShareNotification.java
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 42 | public class ShareNotification { | |||
---|---|---|---|---|---|
67 | } | 67 | } | ||
68 | 68 | | |||
69 | public int getId() { | 69 | public int getId() { | ||
70 | return notificationId; | 70 | return notificationId; | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | public void setProgress(int progress) { | 73 | public void setProgress(int progress) { | ||
74 | builder.setProgress(100, progress, false) | 74 | builder.setProgress(100, progress, false) | ||
75 | .setContentTitle(device.getContext().getResources().getString(R.string.incoming_file_title, device.getName())+" ("+progress+"%)"); | 75 | .setContentTitle(device.getContext().getResources().getString(R.string.incoming_file_title, device.getName()) + " (" + progress + "%)"); | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | public void setFinished(boolean success) { | 78 | public void setFinished(boolean success) { | ||
79 | String message = success ? device.getContext().getResources().getString(R.string.received_file_title, device.getName()) : device.getContext().getResources().getString(R.string.received_file_fail_title, device.getName()); | 79 | String message = success ? device.getContext().getResources().getString(R.string.received_file_title, device.getName()) : device.getContext().getResources().getString(R.string.received_file_fail_title, device.getName()); | ||
80 | builder = new NotificationCompat.Builder(device.getContext()); | 80 | builder = new NotificationCompat.Builder(device.getContext()); | ||
81 | builder.setContentTitle(message) | 81 | builder.setContentTitle(message) | ||
82 | .setTicker(message) | 82 | .setTicker(message) | ||
83 | .setSmallIcon(android.R.drawable.stat_sys_download_done) | 83 | .setSmallIcon(android.R.drawable.stat_sys_download_done) | ||
Show All 40 Lines |