From d7285f1d7c56ae06620724a0921552db972ee19e Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Sat, 4 Apr 2015 10:32:44 +0600 Subject: [PATCH] added a proper notification icon --- graphics/ic_stat_notify_full.svg | 116 ++++++++++++++++++ .../syncthingandroid/syncthing/RestApi.java | 2 +- .../syncthing/SyncthingService.java | 2 +- src/main/res/drawable-hdpi/ic_stat_notify.png | Bin 0 -> 861 bytes src/main/res/drawable-mdpi/ic_stat_notify.png | Bin 0 -> 680 bytes .../res/drawable-xhdpi/ic_stat_notify.png | Bin 0 -> 1322 bytes .../res/drawable-xxhdpi/ic_stat_notify.png | Bin 0 -> 2054 bytes 7 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 graphics/ic_stat_notify_full.svg create mode 100644 src/main/res/drawable-hdpi/ic_stat_notify.png create mode 100644 src/main/res/drawable-mdpi/ic_stat_notify.png create mode 100644 src/main/res/drawable-xhdpi/ic_stat_notify.png create mode 100644 src/main/res/drawable-xxhdpi/ic_stat_notify.png diff --git a/graphics/ic_stat_notify_full.svg b/graphics/ic_stat_notify_full.svg new file mode 100644 index 00000000..b353a63e --- /dev/null +++ b/graphics/ic_stat_notify_full.svg @@ -0,0 +1,116 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java index 0ac5f73f..b173f775 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java @@ -384,7 +384,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener, Notification n = new NotificationCompat.Builder(mContext) .setContentTitle(mContext.getString(R.string.restart_title)) .setContentText(mContext.getString(R.string.restart_notification_text)) - .setSmallIcon(R.drawable.ic_launcher) + .setSmallIcon(R.drawable.ic_stat_notify) .setContentIntent(pi) .build(); n.flags |= Notification.FLAG_ONLY_ALERT_ONCE | Notification.FLAG_AUTO_CANCEL; diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java index 69d9b199..c9323492 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java @@ -197,7 +197,7 @@ public class SyncthingService extends Service { this, getApplicationInfo().dataDir + "/" + BINARY_NAME)).start(); Notification n = new NotificationCompat.Builder(this) .setContentTitle(getString(R.string.syncthing_active)) - .setSmallIcon(R.drawable.ic_launcher) + .setSmallIcon(R.drawable.ic_stat_notify) .setOngoing(true) .setPriority(NotificationCompat.PRIORITY_MIN) .setContentIntent(PendingIntent.getActivity(this, 0, diff --git a/src/main/res/drawable-hdpi/ic_stat_notify.png b/src/main/res/drawable-hdpi/ic_stat_notify.png new file mode 100644 index 0000000000000000000000000000000000000000..65513c023d422cc18619af72b9a0470dbfd8be05 GIT binary patch literal 861 zcmV-j1ETziP)ZN zoCkGoWLQg8Sx9qg{sP_wc1KLh z73frtC8PRYT~cFIi`BD9-f?wyE`BVcLqTv?-Jw2SbGlHcsN2+kgX3HEJ$0S>SRDZy zB5_1r(L%@N))yQpeu(O31MEJ&5>^ejsi1)E5KL4op|>-aIgq0 zZ^b=fPqoll7w|SPANUTK7rz0H11o`HU=y$%m^LcARJQ9;qK!4nJXgJ(Df3=+QWCo~ z{5RB&!e6{>sQXF;AC(A-)}eN(i`1i;&OfWjTNdwzqd(MpQ?NE#iZwtd@GI~X@O0QN z#y^5@Rrp>CJ4kXi6arq$5cOsJ1^xymSNJbh_+Cx~+(RMYcBX@0fCIqqz);xYc?ehl zoM80A5;#)9Ra9W~0*|>^V)M{RF`_Q7u@Jk}Ptho!SO0-J7lmuQ^ zpR6GuZ9VEgk-sGt>a*%k;X7Q;sUmq!{UZ`SXi)&_=29h#$_}f~)DeKXG9g&sqJUSd zMt@cOSVaA$nM`0*~K0B-?%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K)tqI<}{BZH2n4 zVEXK9#HnolE>VAO5PZl`hWA{ph>AL=LSiR6601>gK-J~5>j z0o+CSqd&;G^=n>E_Yo$AUlS&CV+l*jiG-bqO~COY!P_Aq#Z>Y?v+gHM!P|o25b(d^ gqW@BVNx+51e{|~P@&;j%-~a#s07*qoM6N<$g4W@CuK)l5 literal 0 HcmV?d00001 diff --git a/src/main/res/drawable-xxhdpi/ic_stat_notify.png b/src/main/res/drawable-xxhdpi/ic_stat_notify.png new file mode 100644 index 0000000000000000000000000000000000000000..87a1ee2ba97e1a17c90d7863b4854167ce68553c GIT binary patch literal 2054 zcmV+h2>JJkP)e|KhD6{R(!%XG8WF4iKprWK+HBZ{O# z@I_QCiCAL$KnN;=1PLLc#8S(cHnFy)L7Lb}ZT(QXXw}}Tj%jE9K0Np8b?$qX_uO;N zoe%e)yqU~1@A91gd6(yXp65(S5>14orO^rub~Fi!L6e{uGzp49lb{&1HCh2+C@>c2 z1jYd+U~N_Tr*WzkPtZ_cI&da%EJjE>MoJid!-!f6yb8Pp^yaJPHk1mmgGK$fCniljRvElbdUzoZ+odaf)wX_NFwjM5t<-6m=O491%*=_X0P#*F#2 zq+yLFs6*1C2qpU@Js@dR2E+u*NJ)1~+8is@(AT#lC(z-#01L(NpmCg zSS4wE(FC}~ zq*skL;45HqK>h}BipQHO0{a4Ar)c*FunTtm`435#*rn8xGXPwhLXo_&d&+hrfrEm= zBm}hqw>so=fiF`klPAX4(RM>nkc6PA!03Ri7r3PkMe@XFDckh}D}%x$1a&!NPXMb@ zDv~$81^QC7TLx?m3X>3YhC?B#vWGjyGZBWQ|4)}2C$yifw}1fB-AbNqch z@EGuSL?3IhRpCaARr6Hk}_)|#}%XLReI$F|2j(R^tjT5&A{ft?c z|M7`!fHk{)4j6$go$2NA`hX9Br^-6@00)P(eHpkA3kwCY5g1kF6}t&;AOv?*j}Y>>1uV&>eg2=|37Xb{Bcu=-Iq-f<4ux`_H&U?}hmFf*b~SY);r zxEOdYW{h>zUYo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