From 4246987beba78e7938f2f0400d471fc58bd94959 Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Thu, 14 Feb 2019 18:03:48 +0100 Subject: [PATCH] Messaging: Implement per conversation channels. Update API level to 28. * Get rid of in-app settings for notifications, replaced by channels features * Remove all the notification plumbing and dead code Test: m, manual Signed-off-by: Luca Stefani Signed-off-by: Joey Signed-off-by: Danny Baumann Signed-off-by: Arne Coucheron Signed-off-by: Lyubo Change-Id: Idb39ca32751d40b3376934775d2119dd6cc7e297 --- AndroidManifest.xml | 2 +- .../ic_notifications_off_dark.png | Bin 1264 -> 0 bytes .../ic_notifications_off_light.png | Bin 1092 -> 0 bytes .../ic_notifications_off_small_light.png | Bin 839 -> 0 bytes .../ic_notifications_on_dark.png | Bin 1291 -> 0 bytes .../ic_notifications_on_light.png | Bin 1192 -> 0 bytes .../ic_notifications_off_dark.png | Bin 914 -> 0 bytes .../ic_notifications_off_light.png | Bin 820 -> 0 bytes .../ic_notifications_off_small_light.png | Bin 613 -> 0 bytes .../ic_notifications_on_dark.png | Bin 946 -> 0 bytes .../ic_notifications_on_light.png | Bin 880 -> 0 bytes .../ic_notifications_off_dark.png | Bin 1671 -> 0 bytes .../ic_notifications_off_light.png | Bin 1447 -> 0 bytes .../ic_notifications_off_small_light.png | Bin 1060 -> 0 bytes .../ic_notifications_on_dark.png | Bin 1660 -> 0 bytes .../ic_notifications_on_light.png | Bin 1584 -> 0 bytes .../ic_notifications_off_dark.png | Bin 1967 -> 0 bytes .../ic_notifications_off_light.png | Bin 1902 -> 0 bytes .../ic_notifications_off_small_light.png | Bin 1883 -> 0 bytes .../ic_notifications_on_dark.png | Bin 2077 -> 0 bytes .../ic_notifications_on_light.png | Bin 1938 -> 0 bytes .../ic_notifications_off_dark.png | Bin 1985 -> 0 bytes .../ic_notifications_off_light.png | Bin 1938 -> 0 bytes .../ic_notifications_off_small_light.png | Bin 1726 -> 0 bytes .../ic_notifications_on_dark.png | Bin 2404 -> 0 bytes .../ic_notifications_on_light.png | Bin 2257 -> 0 bytes res/layout/conversation_list_item_view.xml | 11 -- res/layout/people_options_item_view.xml | 20 --- res/layout/widget_conversation_list_item.xml | 12 -- ...conversation_list_fragment_select_menu.xml | 12 -- res/values-ldrtl/styles.xml | 4 - res/values/colors.xml | 1 - res/values/constants.xml | 3 +- res/values/dimens.xml | 2 - res/values/strings.xml | 13 +- res/values/styles.xml | 10 -- res/xml-v21/preferences_application.xml | 27 +-- res/xml-v23/preferences_application.xml | 27 +-- res/xml/preferences_application.xml | 27 +-- .../datamodel/BugleDatabaseOperations.java | 29 +--- .../datamodel/BugleNotifications.java | 134 ++++++--------- .../messaging/datamodel/DatabaseHelper.java | 12 -- .../datamodel/MessageNotificationState.java | 38 ----- .../datamodel/NotificationState.java | 9 - .../messaging/datamodel/SyncManager.java | 27 +-- .../action/DeleteConversationAction.java | 5 + .../action/GetOrCreateConversationAction.java | 2 +- .../action/InsertNewMessageAction.java | 2 +- .../UpdateConversationOptionsAction.java | 156 ------------------ .../data/ConversationListItemData.java | 61 ++----- .../datamodel/data/PeopleAndOptionsData.java | 34 +--- .../datamodel/data/PeopleOptionsItemData.java | 83 +--------- .../messaging/receiver/SmsReceiver.java | 10 +- src/com/android/messaging/ui/UIIntents.java | 10 -- .../android/messaging/ui/UIIntentsImpl.java | 11 -- .../ApplicationSettingsActivity.java | 100 ++--------- .../AbstractConversationListActivity.java | 18 -- .../ConversationListItemView.java | 5 - .../MultiSelectActionModeCallback.java | 29 +--- .../PeopleAndOptionsFragment.java | 52 +++--- .../PeopleOptionsItemView.java | 29 +--- .../messaging/util/NotificationsUtil.java | 101 ++++++++++++ .../android/messaging/util/RingtoneUtil.java | 53 ------ .../widget/WidgetConversationListService.java | 4 - tests/AndroidManifest.xml | 2 +- .../ReadWriteDraftMessageActionTest.java | 4 +- 66 files changed, 249 insertions(+), 942 deletions(-) delete mode 100644 res/drawable-hdpi/ic_notifications_off_dark.png delete mode 100644 res/drawable-hdpi/ic_notifications_off_light.png delete mode 100644 res/drawable-hdpi/ic_notifications_off_small_light.png delete mode 100644 res/drawable-hdpi/ic_notifications_on_dark.png delete mode 100644 res/drawable-hdpi/ic_notifications_on_light.png delete mode 100644 res/drawable-mdpi/ic_notifications_off_dark.png delete mode 100644 res/drawable-mdpi/ic_notifications_off_light.png delete mode 100644 res/drawable-mdpi/ic_notifications_off_small_light.png delete mode 100644 res/drawable-mdpi/ic_notifications_on_dark.png delete mode 100644 res/drawable-mdpi/ic_notifications_on_light.png delete mode 100644 res/drawable-xhdpi/ic_notifications_off_dark.png delete mode 100644 res/drawable-xhdpi/ic_notifications_off_light.png delete mode 100644 res/drawable-xhdpi/ic_notifications_off_small_light.png delete mode 100644 res/drawable-xhdpi/ic_notifications_on_dark.png delete mode 100644 res/drawable-xhdpi/ic_notifications_on_light.png delete mode 100644 res/drawable-xxhdpi/ic_notifications_off_dark.png delete mode 100644 res/drawable-xxhdpi/ic_notifications_off_light.png delete mode 100644 res/drawable-xxhdpi/ic_notifications_off_small_light.png delete mode 100644 res/drawable-xxhdpi/ic_notifications_on_dark.png delete mode 100644 res/drawable-xxhdpi/ic_notifications_on_light.png delete mode 100644 res/drawable-xxxhdpi/ic_notifications_off_dark.png delete mode 100644 res/drawable-xxxhdpi/ic_notifications_off_light.png delete mode 100644 res/drawable-xxxhdpi/ic_notifications_off_small_light.png delete mode 100644 res/drawable-xxxhdpi/ic_notifications_on_dark.png delete mode 100644 res/drawable-xxxhdpi/ic_notifications_on_light.png delete mode 100644 src/com/android/messaging/datamodel/action/UpdateConversationOptionsAction.java create mode 100644 src/com/android/messaging/util/NotificationsUtil.java delete mode 100644 src/com/android/messaging/util/RingtoneUtil.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 979f799..e151ea3 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -18,7 +18,7 @@ package="com.android.messaging" android:installLocation="internalOnly"> - + diff --git a/res/drawable-hdpi/ic_notifications_off_dark.png b/res/drawable-hdpi/ic_notifications_off_dark.png deleted file mode 100644 index 9bcdc6265bc5197b9006a62135e44f2ecb6b06ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1264 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBSkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?skwBzpw;GB8xBF)%c=FfjZA3N^f7U???UV0e|lz+eS5K)hhiu0R{01Y44~ zy9>jA5L~c#`DCC7XMsm#F_88EW4Dvpb_@*62RvOILn03Eow2i9Bv7Dz|2(-^kuX-~ zz<>`~j=eTYt#`l1%{}AbYVyI!nYsVKnFFuw1^NRHx@>Xu5h>XlyqMGE!kypq=9yK5 z8k^?tt}d%`mu}k^cm4OP?{QaGn=`8RN3C5py>U)(t-$fZ$j!RRsSXTUOp~gvFI{NW zV6&ci!OZ7dGp$|g?*CpGpvunHc(TfWZP?}Ks~e^tuznEJ*Hs&s!4Sc1bCjp~d#q@M z(p#yb{p>q5yZ&k}o)PNskm-TW2MG&3gN5vqnJzbY%u_9jOS{$jszASMt5w$`jVXO@ z4X1Y~-sY+iT)HKfD~F+v@%53FT_tuLHLUlT@2@!=C=$5-dNq^R(HGHoSneuq>X%xv zs$m{u-=%r!tKP*VsBhr^!MMk0l^@3{){ynrI~RGhf9!O~J$$x5@MDF~zMZ^h7TeZ` zbcQIfH_9IHda%yIOmT(S1oLwXOa8^StyL_z&$5l{4&yWCY@QGYYk5J6~MW{bI%>M3CT>Q(h&@6zD?nJQr-HC$7XVRreMI)dle5?%BeoHW7K0(&uIVU z_+VCyd6A4A>zRq~xx?Ep)GK&pPLpF<$84OL{$9lVVeQgC4};aE4)DZ$s$mRStdaF> zWk}Ug{rbfcXmLqIi{IFxVTzK_BJ>#YT-^NQ<1RibL z>h~dL>9Mm_`4it(3Ol5G?P%!U$2VaS*CypPyghBN1q^iNi7jogS)sN;@&~I;kaVEP z(`ky4PutgB>OOk-=CWoZucb_1g~P>eFDj6k5?}Y?hd$%G(>s&D2QqPO+~_(*t7Q|H z<{764avMa#+g5#<{8x2H(s`$)c2jyc1=!u`zwP_y;9H$vl^I?hg_ji>f~-$Qe?FvP z!jg0RY4@UqS(9Yd!_yso{84=mSxySVA-HGf9E=6EJKsjb!F9t)g57KrEF zUK2fEApFGo>Aw~F9-AazmwL49XmE_y3y&##Rjhq^qdx9E_BJ5A!>GKF`=xuU;r$3> z#t&@4A8u>RKJ(vs)|X|cKGb}?9d+LLTkYBfCwevsIb=m#U-|EUVyMun_4P0RvgTVS zI9%POuoIZ6RZCnWN>UO_QmvAUQh^kMk%6I!u7QQFk!gsbft7)om5G_Ifw`4|!CuL? z=TJ1{=BH$)RpQog#wD}}s6i5BLvVgtNqJ&XDuZK6ep0G}XKrG8YEWuoN@d~6R8Yyo N;OXk;vd$@?2>?+X69@nR diff --git a/res/drawable-hdpi/ic_notifications_off_light.png b/res/drawable-hdpi/ic_notifications_off_light.png deleted file mode 100644 index 433b6a9d184a6a26a174196fd569b84ce2a4b3b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1092 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBSkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?skwBzpw;GB8xBF)%c=FfjZA3N^f7U???UV0e|lz+eS5K)hhiu0R{01Y44~ zy9>jA5L~c#`DCC7XMsm#F_88EW4Dvpb_@*6BAzaeArXi7&amzlaTICwFFpTe*P@Ay zGaoRY?d4%9bo$@0Xy!ULr9)l2H*+^NHtw3aaKo`Cu4T`f4nC6qAgI~VxS{EFb7@td z&q@vba@Q?wW2!Qw8Tv zyO=iV{)A6gR+uXMJfN|-G=8#;f6@Fa+8Q#C^>X*<$iArvustbXx$ct5v_HZpS0|k> zZS}Izc>85pAeV~#G>23bceXc@Ct341I2znC$ZZH(YNj>iRL?H|#SJzZtB>fOuRX1M zH~sXqHD@KZ-{iaA^D$6i%C2|DC;zSr@j0?`Pqk;A!Lj3WT&D1cKDGN>d-obYYfw3_ z*PQ^isn;At~Do9U|K zSC+0x=?2SB)pK59DRuqC{a<(mpV!^(tO@1~Zxc?doyxoJ5*fP5`%qWp@~WJT^Ho(1 z{;f!!Qnctw?URekCtj;y)Yx(6fKP0$(t=fY%$JpfR7*biqE|oTNp${JUf*lA&dK}l z2DVH-d{c1Jd+S3}*1lNn8*uKB!v0?}EFYMDGX7If6YjkATBgDDvEAJ0%kN%GMCMM` zTKaDGt)HhwtXLoLeEPa5@4e*WnoH^$Zp)cBFh3Az=)R=KYT&Yu-HPE&(QV$(p&uV@ zc%*51!7}t}fb{olIor!NVvFNF>(qDpeiA<^Jm*f`*0VC|?vod8i8dFu_LCEv-nv;e z@XM(c5BD_Q`o=tI_YJi#(M~T<=uNC~FY10GJc<33+Z#sJW5+^Xl>f9_QvS!1;WNX& zpQUeIzE1H-Y&vx9^{<1c)~Rm(pCHO2OC7#SFv=o*;o8k&R{npzo|SQ!`rxmE@SM#mk6Q8eV{r(~v8;@03i>*so)21$?& s!TD(=<%vb942~)JNvR5+xryniL8*x;m4zo$LAja1)78&qol`;+02r*+HUIzs diff --git a/res/drawable-hdpi/ic_notifications_off_small_light.png b/res/drawable-hdpi/ic_notifications_off_small_light.png deleted file mode 100644 index fbd0ad50dfabe8a5d6a8dba480a390a93532d161..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 839 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv_!3HFka9+I#q*&4&eH|GXHuiJ>Nn{1`8H|H-`sa^=M~?7{@M0l`MeFYf!7eF_?uR)Kl`Z;?8ZP%>=8Slt5|?N%mn5oY z*x(x&BtE;4fBi;d#?L{sQzPq+8oxQ1$CG69D_n*r;#I9h*YqC&(^4J$GlNz+IDZh!d6 z&9nw5T_+GujV5e$J2_fG45{`?7{YvK>S2BsC&64!{5l*E!$tK_0oAjM#0U}&Oi zV6JOu5@Kj>Wn^GwYy{+585mssAAAr+LvDUbW?Cg~4NDfit_5n41lbUrpH@|k1|%Oc%$NbBSkf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x;m4zo$K_v!*r>mdKI;Vst0B0Qk3;+NC diff --git a/res/drawable-mdpi/ic_notifications_off_dark.png b/res/drawable-mdpi/ic_notifications_off_dark.png deleted file mode 100644 index 4a5a7e9502c3ae8e050e18f16ed48020e3170a21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 914 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEa{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvKUBvfU(=jY&!-9rX)`n#}JR>Q?Ksr=M9uN{_*^sy%E>) zI<`A`E(_6^kg>-^#XOG7WiwYN$3uMq*8fccs;d?5y%p$nQT*32`-N&qi@>+Iqc-Vt zWs7&tOEH=`(|G^;pL3sEp4VJ({k5dBl|)K;KSW&i!~ zX{mZfJSQH_s3>PW|M;irw5h3<8mEIIr~Ud{r@erK{p2^pIY%^W_%^bhc_4f3G4r-Z z!8P(K;kkX6d?vqrY|&LcgX`nj9nGeS+r-Q_TJO`}m3umMx#QfU-ZDp$*Btp>aGCc2 zi{As@b$^Z7CAS{nw>h}2;mrZ(J4fB#^hEMAZ_}Rk*40AN?DIvRBJuklRf{&Ny2!Iu z1ly>qbAS9}R%8+wdexx(LZ*uP)$ciX_9xbNtUqRXr=wFR#cH|xQ$_vbN(_^4$i1I- zeAC%WAn;&yxkCpoLtGX>~ zBtNB_`@XhZH+e5(q-wVG&a``4L6h`Wt=72uv*5_pvvX`hzprx?zVv2Uc%i1eh1-&i z>kA_8vUY6=iQR90gXi1|>D&Em3SZ~ndF%3Q!{U2A{e>*?fgz!$I#OrzO1~}kNjP<> z>$jw_@44^?Vtfx8f5m7Tzp5tnqIfq{Qs50`Zj@?T}vZvl%(%ZzNb)cxvrvUa+)pIrXvUScWykk z??$WZVqmgUEpd$~Nl7e8wMs5Z1yT$~28JfO1{S(TrXh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/ic_notifications_off_small_light.png deleted file mode 100644 index 4bd9563c65b3db2779693f483c67e5022f6dc01a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmeAS@N?(olHy`uVBq!ia0vp@K+MO%1|+}KPrC%9SkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?skwBzpw;GB8xBF)%c=FfjZA3N^f7U???UV0e|lz+g3lfkC`r&aOZkpaffz zx4R3&e-K=-cll(X2xoyuWHFHT0Ash4*>*tVO+8&4Lp09EUb6L$aTGcBalU!E`3lZO zE(IF}niUuH-iY|&)N!Lly2bTPu&VDZlb3J)2>j#-IES{RLB}&Mtj? zYfj{PJ{h^Tng1=%&#{bk4dhwWscmzxJ|~Io@eY^1X%UjwHa2E4Xh$62u5t2bh?M-* z*Xd@(X4k;5lB=Z7K6WdYbpNwvV#OoIa}UPU(d$x_kOh`SLs{E}FjJ z=LNQ9AEoU->TNn4lA-N*^+HOfkh)-Z;kP|^I1&#l7ckWqh~3@Or~lF+mp_~-p7n?L z*C!f|Q!m^OO4)JH`^{qWRZk`D9wc*~^9tk?SGM3ey;df^u(7_-uvetSompx{BL7#L zXRBrVa~_yZQ#zT1wc8C0vx{&t_Dn_nF6&C-_0z*=@ z#5JNMC9x#cD!C{XNHG{07@FuBnClvvgczDz85vj^8v(gi1_oFE2OmVykei>9nO2Eg z!;(d>Yk?XhK{f>Er!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvKUBvfU(=jY&!-9rY27p#}JR>Yp)aF06_;PWDBHbBs^U`tv)?1>Gf7PP zA2ioJ@PBjM{^0`|yCZTnqE8~bHi*ip92KcMWD>T}#hNdcV}b9E&fO2MMDOToju21( z#OUZUA*fhz{zEIj2Zb&rQtThfYQD?Odnh-LEwVATqT{~OE-nAr9}=YMkN&eu`@nwg z!QH4p`vc#9Sf0px;Bn)e>lE83m0A*hM}MixCFtuV8)XGd*DA4ATAKY)SufF)Z~3le ztKJ_dyTf@w^oLo{^=_wh)26T&^OCvu@%=5|_|Bhq0*77S*Qk<9b~$_>rY%iXy7uzJ zAMroEYb)%xs^#>24Qt+D6t$_~g=`LYdmaDnUseYr*Idju-&h~&>F0B_O5@!9hO(HK z>J>pEuGXT@O*w*k{|PHE*71IO%=X8A73WZqqY6!{%#7|uoZ2LFMKAs0hSk*{tm3jC zJ@u|JSy$b5a#57ZBpWBM-{Ln`+V@XdC-vFePxkn!11Bz3Pq=Yu#XpyNsdX7La_TR2 ze~8Y195^B5>$W+^FEY%(Du4LvhicvnWsmslC9vuh-{XkGpS4a*Gtc_` zenM2}ukQ&BmPV|uflJymZ1dPJF8O!*n`@WN)9M*It9}TzWGmdKI;Vst0J##6=Kufz diff --git a/res/drawable-mdpi/ic_notifications_on_light.png b/res/drawable-mdpi/ic_notifications_on_light.png deleted file mode 100644 index eae03a573c9d9fd6163a09b60cbef5c1dd6ec5ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 880 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEa{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvKUBvfU(=jY&!-9CI?R!#}JR>bEnyM2Rn+i-QRhVZFBc2 zy}E=h*9{xC1q6f%ycKn15!KP%`aylkR$-QG$18{I6*{IqcsDIeoulbTRAaa>*Zw{|pKZKJ4O>+4!#V^FGG*WEDdu#@AsxUj1!lDN!!IV9x(Q zcf)-%{xh$SiMV}uEVifcpO}m%%WRkWz4wgIWxkJJt|?S-x@q^l_}Pp$zPG~@PA+(V z)|zWY0jFMd?B}Xg%VxgP*zxn5r`5A(G27P!n{@_nni6tUd4AI5mm-Vzq};YWHjDX6 ziTO8`uMKIJN;U`e82L5cFHC6>5V1D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*uDu{t3L7Fj;~BSO#fS21(*M6%4uuXYyE!d>>im-91iYrGrcpSrK1bOfvt(5vk~k= z^LvMVL#kfTTD|MFmCkWcS=w@xZzGq0jl3kXVZYYa6wocpND~}s%hR!9cl&z^U;K+z z3^o|@yz;!hStsa<6RNyOJi=vLyjkk$Mk?1GB3^^~t$Q>GXrW|g9QIyu%LT2l@cp*n zAjJ%|;WKlmY&WopVr!BjnnN4FnMPMEdm>@NzWB`K8~;fZSawX%XPm5jKAEJv+&gxs zIHy#3^L%pc*qpgcpe$>vde@j1?k z$=-yLbr-xrd=Db{J5r5evH7(HT+R*u$E~326MfHAhO0V8!X3!lO zEb}_5b#h$p?%@61hiuE)R7&%2>mPQ|N`FeYwSF37q>QE7uR>e1rxIyv(yTDYvYNZL z)%qX&DXSk1=ZkO_HMa^JH5o(0kgM#G#qsa|XvI4RsbXc&a_29j-!6K=dCu~brvbfs zF`eNq!s|^&ZuF}y8|5GUZf>8JSeIsPhe{$eSf;D40qb@?HKc2GqC!!^51XI5?Y6;~ z*Mq9xTyAmHxAv=KuaIO8E1ByYk;qjOAQ6a8_JqUsqys021ZToQXQzYqghS2*LZ{hG z|Nj|c<2k1y)BoAiU-Hkf_ha6CRTIhB>j1)iLEHrLW8mKDXNaao-7gooVE4*~di L`IDQDFmwI}FC5dt diff --git a/res/drawable-xhdpi/ic_notifications_off_light.png b/res/drawable-xhdpi/ic_notifications_off_light.png deleted file mode 100644 index 16ae132be7bb52650b05066abac8258b2aa57e1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1447 zcmZ`(c{J2}6#ov{^%`6AG!$wiZDUe0)?qA@C~~qS8D=qWgc!z>8YPTW8f#vp;goe4 zBqzyOX4Glk%%MVA-=i$iywXA=^M1Ym-XHJWbMNPV?meG-&$)kG_HiGNjhb6D0RS5b zo_Ie9(LY^X6^a2$t630ipyIr70Pt^Utr1lq4vY8mZ~;7t(L6*5(TMd7iigniUw3~-cZAk4 z33!};KD1j09n$&FLg&#+eHVCMgtK+xs}EAdgTpr^M!l|n zQl%}_3nue!1gF5{?s63ZF^FeP%q`4YiQD<*{Y=@&y8Vk!w`I#`K(=U7`?1F2LwWRz zp4Ro#VIT_T8b%_k-{!aNgXDfNyX|(8ts`ooC}nu($elUz&3^NhM88#oEKYJ z)tojd%faoI=lRjgBS&)W$Wn*weF-m1h4>9|-8?5X-d8%eYIidHz2F=BlecJqCd>^~ zo+$0b7pQ-F``7#Qd5i5+=Vp6-SJ|7*CnRBJZ2_N!tC;nZO*rqPodGE0t#$i4eo^|Hy{s^2OOLfAF>+)VTI;Wjsa;?c zNS9|12w2WUjI>#KG1x~R>V>6c6asmS(NX~~>4 ztcTj5+$dKlcOY|H)LA|!8=D7x%k0LvSSGd_>#j4LTonhMqA z{n+(N{(JQvWI3COYCu+hKwT5fNT0U9`j~s_d~pXWp8En9oCxA!8>nk7gqgs5D>A$` zAHf6&6_Y6%GPZwX=w5z^uAV6jE|#is+O*`UyuL_A@L(_J315EK+PI7Y8)-_Zozx}& z!El3jd8T*{7Jt2+4Az#MuRf3TNj=42&qk)Aj0+i+Ra%_y9G@d8_(22*YnoA;z=(7t zhg5v7X?cEcP-+xW_Py9hU|Z+(G+3;`$_onbd$e_>2zy^~6}kd_cyuVyIG?IaV{3hd ziBkDzlpmf*>3x3rkT5+(HtC^vF-?qojk$gUo0a}8{ZtwwWHak&k3;mk$7>tLmgEwE zPN;Z_@rm1_?}1{%8ev^Q$p-BQhT*d!zD(@eZRYq^^#(Dp)|I=X%xjcFE*&90vPn9r z;9fk47V2Hxi#9gRI4*QVp;8e^F!niY@IrUUP5*V3ps11Jt@el+=og_FZh;IEkwL~r z#E~HY7_^o3UbM|#D{FtNgIJ6;7L9=@7LCUAKKG3L^I-yln-8An5_ahyOPYch diff --git a/res/drawable-xhdpi/ic_notifications_off_small_light.png b/res/drawable-xhdpi/ic_notifications_off_small_light.png deleted file mode 100644 index e54fc525d6802c9cb40dad095e28060f877e7c6d..0000000000000000000000000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9G zUD$gIZrQEm*BP%i8Mx2X{`v1RFd2Pb*YzH!GA>BD@Tr>RaDoh8Qd1phy+tw5eTZcc zZ<%!=?CpQMn{cJzUD13k^Z1X7`l@9{pBpE5K|-x6J`giwh!B&yqQ=uxUI)Eo&-l_$ z>g0Fx@y(B{yVIq4WEeW$ZkHUK%OS9*gpF2LNo~L0cUjmYl+7eK{k?O7H*);E6jjxg zjw!CmgvUWxC|;l4p#7}DPQ%((*!n?8{GAE2&Y!!4yPWEg^K}N5F6Q-C#;P~ zDzkb3XT+{A);mV#_okQbMX9pz#?i6*H1}c!(hb2^CxnaUE?Sb!^nbbCBa1por+e+@ z%XyEKh|M*|TW^Okh|VA4BL*MmBQ_#DFD{6sGOQNe>G@S?NWYBE@JTu<&_T}+E1%yE zqpi0|$t$^be?HxK7xcwY+A7y?xy>2}kvF}GTYoBG+nyWUr5E1dtG(<668(AGv44Hl&|vyl)$cL2X!f=<1c1@ zb7asdifIikEcVL*rYs^UKG9_uX|TxUO7qs#*&F7+9`pI>?b*NDC~u5V(M7*dXy%iC z>-5vjzQ9%B&CZXPlZ%E=rztaDVn`Wq53G8TD_^L5h?*!>D1Ob7KglnGrHt4w%^)As zMjrG;uIJ*leiHxg#)YFz4V_tHT<(a5W_pTnL13hS87*L87{^&A0zA;}o+$KQl)HC? zI~wD@2ZMGuNemk8>~)dzA443E$%#4n{{~8|*9()u_S1!Lcrk(#(Z^Xp0Fy^&ITGTc Z*(@?Ent3vzjrHks1BAdZoDv(A`VYf8)ph^? diff --git a/res/drawable-xxhdpi/ic_notifications_off_dark.png b/res/drawable-xxhdpi/ic_notifications_off_dark.png deleted file mode 100644 index 27d37542b90d68617be5171d01cb070def43802c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1967 zcmbVNdsGu=77uWEMc#-|P#DG{nsqXnVF;OEB6&a(YY+pdP*EqzKvGF2O@=10izmpb zEbLmTIj!rFDtg$J*0NN^-DOv_)_@j?JWlHabX$C^51_P4aY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XN z_@}bmysop}SEpR~7r;4@YY&Uc&bt$Er0#=pzS6BFE!FhhuXmb=zrU+K3QlS_cyxCJ zdR3?kZvdBgf9@FClQ-yH)pr;hU43a48tzdr((##k>%Onglyl}ADo3D?cHPybOx@U* z?S}$`qJ+I;t@-t5i%j>+@47B`#6O-`5ZB#ZByDdyzu@WxTyGyCl7WS3=MP(@h?6%< H-~I4EYkn*{ diff --git a/res/drawable-xxhdpi/ic_notifications_on_light.png b/res/drawable-xxhdpi/ic_notifications_on_light.png deleted file mode 100644 index f8f7d1577554e5418617630da85327b5252b9eb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1938 zcmbVNeN308O+AaL}4?gO?MICf`D9Ksk$3Ci8>9ZcEo*e-5N5>hLq z4~@W%@e$FNA)*E-rX|P}NKLb{njVQGVql19CR$o|2-Y8-{^*`_@B2LO`~05g_dXxz zZca;m*3WmYFNeeNQzhdXc1`xYGkNScbF}qYb_rpWSxg3PVC;mI;>bx_M*%7mkw@{DE~f9&94K42te z{N*AwqP8fgd}FfHN@X}xwR-0oy@cc^CIImcDeJ&QF$CZ+6_{;Ohm1ezSIWwsZI};C znlNi*{QIP`)Mpdrex~7!CCgjfYy> zw8a(*)=)OO$f{@SVF;fFv$^~4KpsPujdYpS$QFetz-fJvi83=PT*hZlAks)mMTlOA zAczhm^pp@3>I4)R7l*}xLQE(UBl=haiDJ`!9)^#LOA?Eeu?Qko2vAfhOcF~Z3LK3^ z#q!0N0>h`VDzl9t%zA1%wvml}A1hw`pIE8FN)Zfg)zWmqbQh%M(+q9Pr!9a&0Ys|_ zz0vH^V>~swe`TDq8rM?fVk>O|CX*~RK7@csphIFQgBTQuNiirC5fV^G>PS!`#>7Y* zX2665%AdlM|2KIsOA7XM%D*~idW&sGkN98?SmnVaQD%00tn8fpxqrz*cKq5^xLoUS z|5}@p9F!j1^TiJ}PvDKGGiM!DR>_(duF&ezzzVU+cZ0jlmZ8hcklU-b-^=4J=qsFUP{+EXu#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|rAt3EJFA?pdmMPM5KZ^f%=?{BUZ&;YKHRW`Nw(6JUlYEm zspiA0Wj@a;Zxno6X&WLfjLP=1T^#pFg{$thiQtI(R98E9ztUBUUhs$ue= zyz?~`u+Td#QdvHn|K#>Y!?eIXZ5_E~ynchdOZ!;$BJTI0-rUC%y?Yf5Edu^N2mbzp z=RbOu&tm~|1Fv2-uVi)thj-^-Qwr~dvqtxbzd5C0{BPO%%|8W>CWES1fg_sZ#CNU~ zu2Pu%v2XCt_WEm3>%PRPK?Tz$omldX(>>8g0JR>PqI`oZx-Et>KZ#LIgaL)=ljjy z?M|kAPOX?R{H9uy+qc5rGW2L!q5j~fe|~xQbkD4dd$mW~!j|4U(BgIXTtj0SmixG+ zJj^_bG;Y4!`%;U)dEkhSjb-qUVcR!e**p7DUB$U&i=EZA#0b!u+2+gX77YMM&llmf Y;CgvWWU=p9JF6t18#z{66`MN$AH>$)W&i*H diff --git a/res/drawable-xxxhdpi/ic_notifications_off_small_light.png b/res/drawable-xxxhdpi/ic_notifications_off_small_light.png deleted file mode 100644 index 3756943165c7e77b79e3cdc56657d51fbbdae9b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1726 zcmbVNc~BE)6c1-5LJNu@(y_~ej3~(-*+3E!fg~WY1XD;0qxINq7KkR~4?_SaDcxLgVV^ZiODwVe4W|9@Hr8FdV}=%6Jh$8MwGzhifyK7&MC|jo>rXHz*(_kiduXkiuWY~z7n{`Z4aJ`%&G7Y4WR>&nFbHml@v?4xC zU@#18I5O;P&kE>NXYG-XMrOn^)VEL7rz z&S;lI>@|83vYa&QHjvs_Gi3lKlPuD`f&h;3c!Y-3a0rBlaxfu^a|Gc64MzZnVSEh? z^KgO(PT{rxH+c|43bJ>~e>!LSh-pXr_T?Nf!plh_jm-F%nK{vq-S~vXa_m>gqt&)s zH>xD*-qGIegWa3OH+8>OH^vwxl~&%C4_JaYO3t zl`-4fd1fTrV@8!MRNl30d*O~khw8acsav|f( zZ5p1yIlFc7gV+P5K?&<=TU1PA1ok;D(e$X96hT$(&*THw`pl3`CCiPF`!meJl_m`l<9Zx&~Q<1`&ys- zzivv^=WWSt+kfwY|Avoz`||sFX;@Vc`^xa}(W3A_9c^!hna`zdnmOWpwI%qN-&U%c z)8{rcSk*bgvZyI;&JK0s?`vujzX)Yl+!3tyi5k|s z6gNa!x;lSJFAcIRXl=9fzSq5~_K@db|LO60WfKld$k6l6?N!0@>t6*V_=(=#a0MP+ zW%}Vj5mxPDnsr-WWnt~PQu63)nWXS+U*@il%UgO-sCDK05ji)xTXKFb%DkE98h{2O z*mH-p@v*K&e;>V-KP;AQ4#EN-@5?%}uD$Nsncg&&gY{s3M8W4Rf3&yFKQ5E`C%>Z} incJN+@YA#9TOC+pedockHdcrIkD`c4kROw-&G`q*)`v>~ diff --git a/res/drawable-xxxhdpi/ic_notifications_on_dark.png b/res/drawable-xxxhdpi/ic_notifications_on_dark.png deleted file mode 100644 index 389621284306f2b58bce1728870ae0e85b09c91a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2404 zcmbVOc~nzp77s=vkuX3}WK(0X)GAqCHj>C1!V)xWf+C{iC3%nlSxABjkxE7pgcNZl zA}Ba@v@S4Ubx>3m4Q^~wD-p4P>C~la3(lxews|Nx^M|K%&b)K(`=A zMTFYUbDf7kAZ)o|oEUiIPl+`Oep?P{81Uet4vtr^l_#q;pb|m^isS+a%awvDPz(f$ zvNCQ%J_rO-C5eq!$Me>(gmNhXoWc;aQU%OLAbk9_3Q(8^sj&hmMI!UX{dTz#hn0wY zaqDS35>F8Xi6vn=CA3x-5i8WC37I0CzaQ2|%Yqe1AvK8AO4DU3mev>dUM~xtPi+%% z*!K{1nlJ8yQ}MhgY>-?DVQB;!UPvMXSZ^i)pi!9s;DsfV016Qx5y?zE0I;auEP#%k zesHigr6`#d!wH$T1+RQ@VzpYqA`&$k4M9U8$dxHXfXQSMNn|3KjE50;RhCQ*YVk6a z$BYIJq!KD63bjNo!%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v2DfT z19g^3oae3^b>6FjT@q4l14$!&eitpK?3Z@0Z?;oJdNorNw(X9o*Y8ZkhHu_i2UxMH$8NavQ0@2@BA3qh?)? z%{;Jcs47o}e+JaaH8%HJ&#$x?nZC<2`dzJFbj|UX9$P*3{w}9o+ueZUXU81B94frw z(|_GwbI)CSX>{6g!kbkQ`Zm<(*yx36Zv2bqICWA8vTiO2StDct09!uFY72v^z{HAh zi|5l@Eprc_%L9V)%V%YNSd#YVJkQ0U*%Jl1MW{Etwcd8RBs+UO&V5eQqxu_N){wRR z8M@c#`_R5W*4i3aSKM5z>sVXAjNCEi4BExH09zIvvLQzg&F0hv4YdY3!eON|ehJGh zY8k01qt103f$Q=2B^KI$f72*w2DCaK - - - - - - - diff --git a/res/layout/widget_conversation_list_item.xml b/res/layout/widget_conversation_list_item.xml index e0115a2..c1a140a 100644 --- a/res/layout/widget_conversation_list_item.xml +++ b/res/layout/widget_conversation_list_item.xml @@ -67,18 +67,6 @@ android:layout_alignParentTop="true" android:gravity="center_vertical" android:background="@android:color/transparent"> - - - - @color/conversation_list_name - - diff --git a/res/values/colors.xml b/res/values/colors.xml index 1685118..2ccf643 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -122,7 +122,6 @@ #99aaaaaa #4d4d4d - #6d6d6d #6d6d6d #cccccc diff --git a/res/values/constants.xml b/res/values/constants.xml index e494e95..7da36a1 100644 --- a/res/values/constants.xml +++ b/res/values/constants.xml @@ -21,8 +21,7 @@ notifications_category mms_messaging_category advanced_category - notifications_enabled - true + notifications_enabled notification_sound notification_vibration true diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 0795ebc..734afe8 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -34,7 +34,6 @@ 56dp 42dp 96dp - 4dp 30dp 16dp @@ -109,7 +108,6 @@ 2dp 12dp 18sp - 14sp 16sp 240dp 240dp diff --git a/res/values/strings.xml b/res/values/strings.xml index e5c442d..27a02ef 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -257,10 +257,6 @@ Archive Unarchive - - Turn off notifications - - Turn on notifications Add contact @@ -440,13 +436,9 @@ Debug - Notifications + Notifications - Sound - Silent - - Vibrate Blocked SMS delivery reports @@ -982,4 +974,7 @@ Can\'t make a voice call to emergency services here. + + + Messages diff --git a/res/values/styles.xml b/res/values/styles.xml index f44b22c..5a70a6f 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -291,10 +291,6 @@ @color/conversation_list_name - - @@ -347,12 +343,6 @@ @dimen/copy_contact_dialog_right_padding - - diff --git a/res/xml-v21/preferences_application.xml b/res/xml-v21/preferences_application.xml index ab9206a..d650489 100644 --- a/res/xml-v21/preferences_application.xml +++ b/res/xml-v21/preferences_application.xml @@ -42,29 +42,10 @@ android:defaultValue="@bool/send_sound_pref_default" android:persistent="true" /> - - - - - + - - - - - + - - - - - + participants = getConversationParticipantsFromRecipients(recipients, refSubId); - return getOrCreateConversation(db, threadId, senderBlocked, participants, false, false, - null); + return getOrCreateConversation(db, threadId, senderBlocked, participants); } /** @@ -190,7 +189,7 @@ public class BugleDatabaseOperations { Assert.isNotMainThread(); final ArrayList recipients = new ArrayList<>(1); recipients.add(recipient); - return getOrCreateConversation(db, threadId, senderBlocked, recipients, false, false, null); + return getOrCreateConversation(db, threadId, senderBlocked, recipients); } /** @@ -200,15 +199,11 @@ public class BugleDatabaseOperations { * @param threadId The message's thread * @param archived Flag whether the conversation should be created archived * @param participants list of conversation participants - * @param noNotification If notification should be disabled - * @param noVibrate If vibrate on notification should be disabled - * @param soundUri If there is custom sound URI * @return a conversation id */ @DoesNotRunOnMainThread public static String getOrCreateConversation(final DatabaseWrapper db, final long threadId, - final boolean archived, final ArrayList participants, - boolean noNotification, boolean noVibrate, String soundUri) { + final boolean archived, final ArrayList participants) { Assert.isNotMainThread(); // Check to see if this conversation is already in out local db cache @@ -231,8 +226,7 @@ public class BugleDatabaseOperations { BugleDatabaseOperations.getOrCreateParticipantInTransaction(db, self); // Create a new conversation conversationId = BugleDatabaseOperations.createConversationInTransaction( - db, threadId, conversationName, selfId, participants, archived, - noNotification, noVibrate, soundUri); + db, threadId, conversationName, selfId, participants, archived); db.setTransactionSuccessful(); } finally { db.endTransaction(); @@ -357,15 +351,11 @@ public class BugleDatabaseOperations { * @param threadId The message's thread * @param selfId The selfId to make default for this conversation * @param archived Flag whether the conversation should be created archived - * @param noNotification If notification should be disabled - * @param noVibrate If vibrate on notification should be disabled - * @param soundUri The customized sound * @return The existing conversation id or new conversation id */ static String createConversationInTransaction(final DatabaseWrapper dbWrapper, final long threadId, final String conversationName, final String selfId, - final List participants, final boolean archived, - boolean noNotification, boolean noVibrate, String soundUri) { + final List participants, final boolean archived) { // We want conversation and participant creation to be atomic Assert.isTrue(dbWrapper.getDatabase().inTransaction()); boolean hasEmailAddress = false; @@ -389,15 +379,6 @@ public class BugleDatabaseOperations { if (archived) { values.put(ConversationColumns.ARCHIVE_STATUS, 1); } - if (noNotification) { - values.put(ConversationColumns.NOTIFICATION_ENABLED, 0); - } - if (noVibrate) { - values.put(ConversationColumns.NOTIFICATION_VIBRATION, 0); - } - if (!TextUtils.isEmpty(soundUri)) { - values.put(ConversationColumns.NOTIFICATION_SOUND_URI, soundUri); - } fillParticipantData(values, participants); diff --git a/src/com/android/messaging/datamodel/BugleNotifications.java b/src/com/android/messaging/datamodel/BugleNotifications.java index 6f8ba84..b82dbe5 100644 --- a/src/com/android/messaging/datamodel/BugleNotifications.java +++ b/src/com/android/messaging/datamodel/BugleNotifications.java @@ -17,6 +17,8 @@ package com.android.messaging.datamodel; import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; @@ -74,10 +76,10 @@ import com.android.messaging.util.ConversationIdSet; import com.android.messaging.util.ImageUtils; import com.android.messaging.util.LogUtil; import com.android.messaging.util.NotificationPlayer; +import com.android.messaging.util.NotificationsUtil; import com.android.messaging.util.OsUtil; import com.android.messaging.util.PendingIntentConstants; import com.android.messaging.util.PhoneUtils; -import com.android.messaging.util.RingtoneUtil; import com.android.messaging.util.ThreadUtil; import com.android.messaging.util.UriUtil; @@ -173,18 +175,10 @@ public class BugleNotifications { } Assert.isNotMainThread(); checkInitialized(); - - if (!shouldNotify()) { - if (LogUtil.isLoggable(TAG, LogUtil.VERBOSE)) { - LogUtil.v(TAG, "Notifications disabled"); - } - cancel(PendingIntentConstants.SMS_NOTIFICATION_ID); - return; - } else { - if ((coverage & UPDATE_MESSAGES) != 0) { - createMessageNotification(silent, conversationId); - } + if ((coverage & UPDATE_MESSAGES) != 0) { + createMessageNotification(silent, conversationId); } + if ((coverage & UPDATE_ERRORS) != 0) { MessageNotificationState.checkFailedMessages(); } @@ -195,8 +189,7 @@ public class BugleNotifications { * */ public static void playClassZeroNotification() { - final Uri ringtoneUri = RingtoneUtil.getNotificationRingtoneUri(null); - playObservableConversationNotificationSound(ringtoneUri); + playObservableConversationNotificationSound(null); } /** @@ -297,56 +290,6 @@ public class BugleNotifications { } } - /** - * Returns {@code true} if incoming notifications should display a - * notification, {@code false} otherwise. - * - * @return true if the notification should occur - */ - private static boolean shouldNotify() { - // If we're not the default sms app, don't put up any notifications. - if (!PhoneUtils.getDefault().isDefaultSmsApp()) { - return false; - } - - // Now check prefs (i.e. settings) to see if the user turned off notifications. - final BuglePrefs prefs = BuglePrefs.getApplicationPrefs(); - final Context context = Factory.get().getApplicationContext(); - final String prefKey = context.getString(R.string.notifications_enabled_pref_key); - final boolean defaultValue = context.getResources().getBoolean( - R.bool.notifications_enabled_pref_default); - return prefs.getBoolean(prefKey, defaultValue); - } - - /** - * Returns {@code true} if incoming notifications for the given {@link NotificationState} - * should vibrate the device, {@code false} otherwise. - * - * @return true if vibration should be used - */ - public static boolean shouldVibrate(final NotificationState state) { - // The notification should vibrate if the global setting is turned on AND - // the per-conversation setting is turned on (default). - if (!state.getNotificationVibrate()) { - return false; - } else { - final BuglePrefs prefs = BuglePrefs.getApplicationPrefs(); - final Context context = Factory.get().getApplicationContext(); - final String prefKey = context.getString(R.string.notification_vibration_pref_key); - final boolean defaultValue = context.getResources().getBoolean( - R.bool.notification_vibration_pref_default); - return prefs.getBoolean(prefKey, defaultValue); - } - } - - private static Uri getNotificationRingtoneUriForConversationId(final String conversationId) { - final DatabaseWrapper db = DataModel.get().getDatabase(); - final ConversationListItemData convData = - ConversationListItemData.getExistingConversation(db, conversationId); - return RingtoneUtil.getNotificationRingtoneUri( - convData != null ? convData.getNotificationSoundUri() : null); - } - /** * Returns a unique tag to identify a notification. * @@ -420,13 +363,15 @@ public class BugleNotifications { private static void processAndSend(final NotificationState state, final boolean silent, final boolean softSound) { final Context context = Factory.get().getApplicationContext(); - final NotificationCompat.Builder notifBuilder = new NotificationCompat.Builder(context); - notifBuilder.setCategory(Notification.CATEGORY_MESSAGE); // TODO: Need to fix this for multi conversation notifications to rate limit dings. final String conversationId = state.mConversationIds.first(); + String id = NotificationsUtil.DEFAULT_CHANNEL_ID; + if (NotificationsUtil.getNotificationChannel(context, conversationId) != null) { + id = conversationId; + } + final NotificationCompat.Builder notifBuilder = new NotificationCompat.Builder(context, id); + notifBuilder.setCategory(Notification.CATEGORY_MESSAGE); - - final Uri ringtoneUri = RingtoneUtil.getNotificationRingtoneUri(state.getRingtoneUri()); // If the notification's conversation is currently observable (focused or in the // conversation list), then play a notification beep at a low volume and don't display an // actual notification. @@ -436,7 +381,7 @@ public class BugleNotifications { "sCurrentlyDisplayedConversationId so NOT showing notification," + " but playing soft sound. conversationId: " + conversationId); } - playObservableConversationNotificationSound(ringtoneUri); + playObservableConversationNotificationSound(conversationId); return; } state.mBaseRequestCode = state.mType; @@ -449,7 +394,7 @@ public class BugleNotifications { notifBuilder.setDeleteIntent(clearIntent); } - updateBuilderAudioVibrate(state, notifBuilder, silent, ringtoneUri, conversationId); + updateBuilderAudioVibrate(state, notifBuilder, silent, conversationId); // Set the content intent PendingIntent destinationIntent; @@ -607,8 +552,7 @@ public class BugleNotifications { if (state == null) { cancel(PendingIntentConstants.SMS_NOTIFICATION_ID); if (softSound && !TextUtils.isEmpty(conversationId)) { - final Uri ringtoneUri = getNotificationRingtoneUriForConversationId(conversationId); - playObservableConversationNotificationSound(ringtoneUri); + playObservableConversationNotificationSound(conversationId); } return; } @@ -646,8 +590,8 @@ public class BugleNotifications { private static void updateBuilderAudioVibrate(final NotificationState state, final NotificationCompat.Builder notifBuilder, final boolean silent, - final Uri ringtoneUri, final String conversationId) { - int defaults = Notification.DEFAULT_LIGHTS; + final String conversationId) { + int defaults = Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE; if (!silent) { final BuglePrefs prefs = Factory.get().getApplicationPrefs(); final long latestNotificationTimestamp = prefs.getLong( @@ -669,10 +613,6 @@ public class BugleNotifications { if (lastTime == null || SystemClock.elapsedRealtime() - lastTime > sTimeBetweenDingsMs) { sLastMessageDingTime.put(conversationId, SystemClock.elapsedRealtime()); - notifBuilder.setSound(ringtoneUri); - if (shouldVibrate(state)) { - defaults |= Notification.DEFAULT_VIBRATE; - } } } } @@ -826,8 +766,14 @@ public class BugleNotifications { notificationState.mNotificationBuilder.setLargeIcon(smallBitmap); // Add a wearable page with no visible card so you can more easily see the photo. + String conversationId = notificationState.mConversationIds.first(); + String id = NotificationsUtil.DEFAULT_CHANNEL_ID; + if (NotificationsUtil.getNotificationChannel(context, conversationId) != null) { + id = conversationId; + } final NotificationCompat.Builder photoPageNotifBuilder = - new NotificationCompat.Builder(Factory.get().getApplicationContext()); + new NotificationCompat.Builder(Factory.get().getApplicationContext(), + NotificationsUtil.DEFAULT_CHANNEL_ID); final WearableExtender photoPageWearableExtender = new WearableExtender(); photoPageWearableExtender.setHintShowBackgroundOnly(true); if (attachmentBitmap != null) { @@ -982,6 +928,16 @@ public class BugleNotifications { notification.flags |= Notification.FLAG_AUTO_CANCEL; notification.defaults |= Notification.DEFAULT_LIGHTS; + Context context = Factory.get().getApplicationContext(); + + NotificationsUtil.createNotificationChannelGroup(context, + NotificationsUtil.CONVERSATION_GROUP_NAME, + R.string.notification_channel_messages_title); + NotificationsUtil.createNotificationChannel(context, + NotificationsUtil.DEFAULT_CHANNEL_ID, + R.string.notification_channel_messages_title, + NotificationManager.IMPORTANCE_DEFAULT, + NotificationsUtil.CONVERSATION_GROUP_NAME); notificationManager.notify(notificationTag, type, notification); LogUtil.i(TAG, "Notifying for conversation " + conversationId + "; " @@ -1105,7 +1061,7 @@ public class BugleNotifications { * Play the observable conversation notification sound (it's the regular notification sound, but * played at half-volume) */ - private static void playObservableConversationNotificationSound(final Uri ringtoneUri) { + private static void playObservableConversationNotificationSound(final String conversationId) { final Context context = Factory.get().getApplicationContext(); final AudioManager audioManager = (AudioManager) context .getSystemService(Context.AUDIO_SERVICE); @@ -1116,7 +1072,11 @@ public class BugleNotifications { } final NotificationPlayer player = new NotificationPlayer(LogUtil.BUGLE_TAG); - player.play(ringtoneUri, false, + NotificationChannel channel = NotificationsUtil.getNotificationChannel(context, conversationId); + if (channel == null) { + channel = NotificationsUtil.getNotificationChannel(context, NotificationsUtil.DEFAULT_CHANNEL_ID); + } + player.play(channel != null ? channel.getSound() : null, false, AudioManager.STREAM_NOTIFICATION, OBSERVABLE_CONVERSATION_NOTIFICATION_VOLUME); @@ -1211,7 +1171,8 @@ public class BugleNotifications { final PendingIntent destinationIntent = UIIntents.get() .getPendingIntentForConversationActivity(context, conversationId, null /* draft */); - final NotificationCompat.Builder builder = new NotificationCompat.Builder(context); + final NotificationCompat.Builder builder = + new NotificationCompat.Builder(context, NotificationsUtil.DEFAULT_CHANNEL_ID); builder.setTicker(line1) .setContentTitle(line1) .setContentText(line2) @@ -1221,6 +1182,15 @@ public class BugleNotifications { .setSound(UriUtil.getUriForResourceId(context, R.raw.message_failure)); final String tag = context.getPackageName() + ":emergency_sms_error"; + + NotificationsUtil.createNotificationChannelGroup(context, + NotificationsUtil.CONVERSATION_GROUP_NAME, + R.string.notification_channel_messages_title); + NotificationsUtil.createNotificationChannel(context, + NotificationsUtil.DEFAULT_CHANNEL_ID, + R.string.notification_channel_messages_title, + NotificationManager.IMPORTANCE_HIGH, + null); NotificationManagerCompat.from(context).notify( tag, PendingIntentConstants.MSG_SEND_ERROR, diff --git a/src/com/android/messaging/datamodel/DatabaseHelper.java b/src/com/android/messaging/datamodel/DatabaseHelper.java index 486973e..87bf08d 100644 --- a/src/com/android/messaging/datamodel/DatabaseHelper.java +++ b/src/com/android/messaging/datamodel/DatabaseHelper.java @@ -136,15 +136,6 @@ public class DatabaseHelper extends SQLiteOpenHelper { /* Participant count not including self (so will be 1 for 1:1 or bigger for group) */ public static final String PARTICIPANT_COUNT = "participant_count"; - /* Should notifications be enabled for this conversation? */ - public static final String NOTIFICATION_ENABLED = "notification_enabled"; - - /* Notification sound used for the conversation */ - public static final String NOTIFICATION_SOUND_URI = "notification_sound_uri"; - - /* Should vibrations be enabled for the conversation's notification? */ - public static final String NOTIFICATION_VIBRATION = "notification_vibration"; - /* Conversation recipients include email address */ public static final String INCLUDE_EMAIL_ADDRESS = "include_email_addr"; @@ -184,9 +175,6 @@ public class DatabaseHelper extends SQLiteOpenHelper { + ConversationColumns.OTHER_PARTICIPANT_NORMALIZED_DESTINATION + " TEXT, " + ConversationColumns.CURRENT_SELF_ID + " TEXT, " + ConversationColumns.PARTICIPANT_COUNT + " INT DEFAULT(0), " - + ConversationColumns.NOTIFICATION_ENABLED + " INT DEFAULT(1), " - + ConversationColumns.NOTIFICATION_SOUND_URI + " TEXT, " - + ConversationColumns.NOTIFICATION_VIBRATION + " INT DEFAULT(1), " + ConversationColumns.INCLUDE_EMAIL_ADDRESS + " INT DEFAULT(0), " + ConversationColumns.SMS_SERVICE_CENTER + " TEXT ," + ConversationColumns.IS_ENTERPRISE + " INT DEFAULT(0)" diff --git a/src/com/android/messaging/datamodel/MessageNotificationState.java b/src/com/android/messaging/datamodel/MessageNotificationState.java index 6b858fa..4a4bfd5 100644 --- a/src/com/android/messaging/datamodel/MessageNotificationState.java +++ b/src/com/android/messaging/datamodel/MessageNotificationState.java @@ -197,15 +197,6 @@ public abstract class MessageNotificationState extends NotificationState { // line infos is capped. int mTotalMessageCount; - // Custom ringtone if set - final String mRingtoneUri; - - // Should notification be enabled for this conversation? - final boolean mNotificationEnabled; - - // Should notifications vibrate for this conversation? - final boolean mNotificationVibrate; - // Avatar uri of sender final Uri mAvatarUri; @@ -224,9 +215,6 @@ public abstract class MessageNotificationState extends NotificationState { final boolean includeEmailAddress, final long receivedTimestamp, final String selfParticipantId, - final String ringtoneUri, - final boolean notificationEnabled, - final boolean notificationVibrate, final Uri avatarUri, final Uri contactUri, final int subId, @@ -239,11 +227,8 @@ public abstract class MessageNotificationState extends NotificationState { mSelfParticipantId = selfParticipantId; mLineInfos = new ArrayList(); mTotalMessageCount = 0; - mRingtoneUri = ringtoneUri; mAvatarUri = avatarUri; mContactUri = contactUri; - mNotificationEnabled = notificationEnabled; - mNotificationVibrate = notificationVibrate; mSubId = subId; mParticipantCount = participantCount; } @@ -870,10 +855,6 @@ public abstract class MessageNotificationState extends NotificationState { if (currConvInfo == null) { final ConversationListItemData convData = ConversationListItemData.getExistingConversation(db, convId); - if (!convData.getNotificationEnabled()) { - // Skip conversations that have notifications disabled. - continue; - } final int subId = BugleDatabaseOperations.getSelfSubscriptionId(db, convData.getSelfId()); groupConversationName = convData.getName(); @@ -888,9 +869,6 @@ public abstract class MessageNotificationState extends NotificationState { convData.getIncludeEmailAddress(), convMessageData.getReceivedTimeStamp(), convData.getSelfId(), - convData.getNotificationSoundUri(), - convData.getNotificationEnabled(), - convData.getNotifiationVibrate(), avatarUri, convMessageData.getSenderContactLookupUri(), subId, @@ -1103,22 +1081,6 @@ public abstract class MessageNotificationState extends NotificationState { return BugleNotifications.LOCAL_SMS_NOTIFICATION; } - @Override - public String getRingtoneUri() { - if (mConvList.mConvInfos.size() > 0) { - return mConvList.mConvInfos.get(0).mRingtoneUri; - } - return null; - } - - @Override - public boolean getNotificationVibrate() { - if (mConvList.mConvInfos.size() > 0) { - return mConvList.mConvInfos.get(0).mNotificationVibrate; - } - return false; - } - protected CharSequence getTicker() { return BugleNotifications.buildColonSeparatedMessage( mTickerSender != null ? mTickerSender : mTitle, diff --git a/src/com/android/messaging/datamodel/NotificationState.java b/src/com/android/messaging/datamodel/NotificationState.java index e19f70c..144f0fe 100644 --- a/src/com/android/messaging/datamodel/NotificationState.java +++ b/src/com/android/messaging/datamodel/NotificationState.java @@ -134,15 +134,6 @@ public abstract class NotificationState { */ public abstract int getPriority(); - /** @return custom ringtone URI or null if not set */ - public String getRingtoneUri() { - return null; - } - - public boolean getNotificationVibrate() { - return false; - } - public long getLatestReceivedTimestamp() { return Long.MIN_VALUE; } diff --git a/src/com/android/messaging/datamodel/SyncManager.java b/src/com/android/messaging/datamodel/SyncManager.java index 28fc696..e5d4935 100644 --- a/src/com/android/messaging/datamodel/SyncManager.java +++ b/src/com/android/messaging/datamodel/SyncManager.java @@ -51,33 +51,14 @@ public class SyncManager { */ public static class ConversationCustomization { private final boolean mArchived; - private final boolean mMuted; - private final boolean mNoVibrate; - private final String mNotificationSoundUri; - public ConversationCustomization(final boolean archived, final boolean muted, - final boolean noVibrate, final String notificationSoundUri) { + public ConversationCustomization(final boolean archived) { mArchived = archived; - mMuted = muted; - mNoVibrate = noVibrate; - mNotificationSoundUri = notificationSoundUri; } public boolean isArchived() { return mArchived; } - - public boolean isMuted() { - return mMuted; - } - - public boolean noVibrate() { - return mNoVibrate; - } - - public String getNotificationSoundUri() { - return mNotificationSoundUri; - } } SyncManager() { @@ -436,15 +417,13 @@ public class SyncManager { if (customization != null) { // There is user customization we need to recover conversationId = BugleDatabaseOperations.getOrCreateConversation(db, threadId, - customization.isArchived(), participants, customization.isMuted(), - customization.noVibrate(), customization.getNotificationSoundUri()); + customization.isArchived(), participants); if (customization.isArchived()) { mArchivedConversations.add(conversationId); } } else { conversationId = BugleDatabaseOperations.getOrCreateConversation(db, threadId, - false/*archived*/, participants, false/*noNotification*/, - false/*noVibrate*/, null/*soundUri*/); + false/*archived*/, participants); } if (conversationId != null) { diff --git a/src/com/android/messaging/datamodel/action/DeleteConversationAction.java b/src/com/android/messaging/datamodel/action/DeleteConversationAction.java index a00f6d6..6b81aa6 100644 --- a/src/com/android/messaging/datamodel/action/DeleteConversationAction.java +++ b/src/com/android/messaging/datamodel/action/DeleteConversationAction.java @@ -35,6 +35,7 @@ import com.android.messaging.datamodel.MessagingContentProvider; import com.android.messaging.sms.MmsUtils; import com.android.messaging.util.Assert; import com.android.messaging.util.LogUtil; +import com.android.messaging.util.NotificationsUtil; import com.android.messaging.widget.WidgetConversationProvider; import java.util.ArrayList; @@ -118,6 +119,10 @@ public class DeleteConversationAction extends Action implements Parcelable { + " has an invalid telephony thread id; will delete messages individually"); deleteConversationMessagesFromTelephony(); } + + // Finally, remove the conversation specific notification channel + NotificationsUtil.deleteNotificationChannel(Factory.get().getApplicationContext(), + conversationId); } else { LogUtil.e(TAG, "DeleteConversationAction: conversationId is empty"); } diff --git a/src/com/android/messaging/datamodel/action/GetOrCreateConversationAction.java b/src/com/android/messaging/datamodel/action/GetOrCreateConversationAction.java index b262141..7dd09c1 100644 --- a/src/com/android/messaging/datamodel/action/GetOrCreateConversationAction.java +++ b/src/com/android/messaging/datamodel/action/GetOrCreateConversationAction.java @@ -110,7 +110,7 @@ public class GetOrCreateConversationAction extends Action implements Parcelable } final String conversationId = BugleDatabaseOperations.getOrCreateConversation(db, threadId, - false, participants, false, false, null); + false, participants); return conversationId; } diff --git a/src/com/android/messaging/datamodel/action/InsertNewMessageAction.java b/src/com/android/messaging/datamodel/action/InsertNewMessageAction.java index 8bf6d5e..20f90dc 100644 --- a/src/com/android/messaging/datamodel/action/InsertNewMessageAction.java +++ b/src/com/android/messaging/datamodel/action/InsertNewMessageAction.java @@ -274,7 +274,7 @@ public class InsertNewMessageAction extends Action implements Parcelable { } final String conversationId = BugleDatabaseOperations.getOrCreateConversation(db, threadId, - false, participants, false, false, null); + false, participants); final ParticipantData self = BugleDatabaseOperations.getOrCreateSelf(db, subId); diff --git a/src/com/android/messaging/datamodel/action/UpdateConversationOptionsAction.java b/src/com/android/messaging/datamodel/action/UpdateConversationOptionsAction.java deleted file mode 100644 index 6c9e739..0000000 --- a/src/com/android/messaging/datamodel/action/UpdateConversationOptionsAction.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.messaging.datamodel.action; - -import android.content.ContentValues; -import android.os.Parcel; -import android.os.Parcelable; - -import com.android.messaging.datamodel.BugleDatabaseOperations; -import com.android.messaging.datamodel.DataModel; -import com.android.messaging.datamodel.DatabaseHelper.ConversationColumns; -import com.android.messaging.datamodel.DatabaseWrapper; -import com.android.messaging.datamodel.MessagingContentProvider; -import com.android.messaging.util.Assert; - -/** - * Action used to update conversation options such as notification settings. - */ -public class UpdateConversationOptionsAction extends Action - implements Parcelable { - /** - * Enable/disable conversation notifications. - */ - public static void enableConversationNotifications(final String conversationId, - final boolean enableNotification) { - Assert.notNull(conversationId); - - final UpdateConversationOptionsAction action = new UpdateConversationOptionsAction( - conversationId, enableNotification, null, null); - action.start(); - } - - /** - * Sets conversation notification sound. - */ - public static void setConversationNotificationSound(final String conversationId, - final String ringtoneUri) { - Assert.notNull(conversationId); - - final UpdateConversationOptionsAction action = new UpdateConversationOptionsAction( - conversationId, null, ringtoneUri, null); - action.start(); - } - - /** - * Enable/disable vibrations for conversation notification. - */ - public static void enableVibrationForConversationNotification(final String conversationId, - final boolean enableVibration) { - Assert.notNull(conversationId); - - final UpdateConversationOptionsAction action = new UpdateConversationOptionsAction( - conversationId, null, null, enableVibration); - action.start(); - } - - private static final String KEY_CONVERSATION_ID = "conversation_id"; - - // Keys for all settable settings. - private static final String KEY_ENABLE_NOTIFICATION = "enable_notification"; - private static final String KEY_RINGTONE_URI = "ringtone_uri"; - private static final String KEY_ENABLE_VIBRATION = "enable_vibration"; - - protected UpdateConversationOptionsAction(final String conversationId, - final Boolean enableNotification, final String ringtoneUri, - final Boolean enableVibration) { - Assert.notNull(conversationId); - actionParameters.putString(KEY_CONVERSATION_ID, conversationId); - if (enableNotification != null) { - actionParameters.putBoolean(KEY_ENABLE_NOTIFICATION, enableNotification); - } - - if (ringtoneUri != null) { - actionParameters.putString(KEY_RINGTONE_URI, ringtoneUri); - } - - if (enableVibration != null) { - actionParameters.putBoolean(KEY_ENABLE_VIBRATION, enableVibration); - } - } - - protected void putOptionValuesInTransaction(final ContentValues values, - final DatabaseWrapper dbWrapper) { - Assert.isTrue(dbWrapper.getDatabase().inTransaction()); - if (actionParameters.containsKey(KEY_ENABLE_NOTIFICATION)) { - values.put(ConversationColumns.NOTIFICATION_ENABLED, - actionParameters.getBoolean(KEY_ENABLE_NOTIFICATION)); - } - - if (actionParameters.containsKey(KEY_RINGTONE_URI)) { - values.put(ConversationColumns.NOTIFICATION_SOUND_URI, - actionParameters.getString(KEY_RINGTONE_URI)); - } - - if (actionParameters.containsKey(KEY_ENABLE_VIBRATION)) { - values.put(ConversationColumns.NOTIFICATION_VIBRATION, - actionParameters.getBoolean(KEY_ENABLE_VIBRATION)); - } - } - - @Override - protected Object executeAction() { - final String conversationId = actionParameters.getString(KEY_CONVERSATION_ID); - - final DatabaseWrapper db = DataModel.get().getDatabase(); - db.beginTransaction(); - try { - final ContentValues values = new ContentValues(); - putOptionValuesInTransaction(values, db); - - BugleDatabaseOperations.updateConversationRowIfExists(db, conversationId, values); - - db.setTransactionSuccessful(); - } finally { - db.endTransaction(); - } - MessagingContentProvider.notifyConversationMetadataChanged(conversationId); - return null; - } - - protected UpdateConversationOptionsAction(final Parcel in) { - super(in); - } - - public static final Parcelable.Creator CREATOR - = new Parcelable.Creator() { - @Override - public UpdateConversationOptionsAction createFromParcel(final Parcel in) { - return new UpdateConversationOptionsAction(in); - } - - @Override - public UpdateConversationOptionsAction[] newArray(final int size) { - return new UpdateConversationOptionsAction[size]; - } - }; - - @Override - public void writeToParcel(final Parcel parcel, final int flags) { - writeActionToParcel(parcel, flags); - } -} diff --git a/src/com/android/messaging/datamodel/data/ConversationListItemData.java b/src/com/android/messaging/datamodel/data/ConversationListItemData.java index f627a09..46d4b64 100644 --- a/src/com/android/messaging/datamodel/data/ConversationListItemData.java +++ b/src/com/android/messaging/datamodel/data/ConversationListItemData.java @@ -52,9 +52,6 @@ public class ConversationListItemData { private String mOtherParticipantNormalizedDestination; private String mSelfId; private int mParticipantCount; - private boolean mNotificationEnabled; - private String mNotificationSoundUri; - private boolean mNotificationVibrate; private boolean mIncludeEmailAddress; private int mMessageStatus; private int mMessageRawTelephonyStatus; @@ -92,9 +89,6 @@ public class ConversationListItemData { INDEX_OTHER_PARTICIPANT_NORMALIZED_DESTINATION); mSelfId = cursor.getString(INDEX_SELF_ID); mParticipantCount = cursor.getInt(INDEX_PARTICIPANT_COUNT); - mNotificationEnabled = cursor.getInt(INDEX_NOTIFICATION_ENABLED) == 1; - mNotificationSoundUri = cursor.getString(INDEX_NOTIFICATION_SOUND_URI); - mNotificationVibrate = cursor.getInt(INDEX_NOTIFICATION_VIBRATION) == 1; mIncludeEmailAddress = cursor.getInt(INDEX_INCLUDE_EMAIL_ADDRESS) == 1; mMessageStatus = cursor.getInt(INDEX_MESSAGE_STATUS); mMessageRawTelephonyStatus = cursor.getInt(INDEX_MESSAGE_RAW_TELEPHONY_STATUS); @@ -199,18 +193,6 @@ public class ConversationListItemData { return mIncludeEmailAddress; } - public boolean getNotificationEnabled() { - return mNotificationEnabled; - } - - public String getNotificationSoundUri() { - return mNotificationSoundUri; - } - - public boolean getNotifiationVibrate() { - return mNotificationVibrate; - } - public final boolean getIsFailedStatus() { return (mMessageStatus == MessageData.BUGLE_STATUS_OUTGOING_FAILED || mMessageStatus == MessageData.BUGLE_STATUS_OUTGOING_FAILED_EMERGENCY_NUMBER || @@ -328,12 +310,6 @@ public class ConversationListItemData { + " as " + ConversationListViewColumns.PREVIEW_CONTENT_TYPE + ", " + DatabaseHelper.CONVERSATIONS_TABLE + '.' + ConversationColumns.PARTICIPANT_COUNT + " as " + ConversationListViewColumns.PARTICIPANT_COUNT + ", " - + DatabaseHelper.CONVERSATIONS_TABLE + '.' + ConversationColumns.NOTIFICATION_ENABLED - + " as " + ConversationListViewColumns.NOTIFICATION_ENABLED + ", " - + DatabaseHelper.CONVERSATIONS_TABLE + '.' + ConversationColumns.NOTIFICATION_SOUND_URI - + " as " + ConversationListViewColumns.NOTIFICATION_SOUND_URI + ", " - + DatabaseHelper.CONVERSATIONS_TABLE + '.' + ConversationColumns.NOTIFICATION_VIBRATION - + " as " + ConversationListViewColumns.NOTIFICATION_VIBRATION + ", " + DatabaseHelper.CONVERSATIONS_TABLE + '.' + ConversationColumns.INCLUDE_EMAIL_ADDRESS + " as " + ConversationListViewColumns.INCLUDE_EMAIL_ADDRESS + ", " @@ -396,9 +372,6 @@ public class ConversationListItemData { ConversationColumns.OTHER_PARTICIPANT_NORMALIZED_DESTINATION; static final String CURRENT_SELF_ID = ConversationColumns.CURRENT_SELF_ID; static final String PARTICIPANT_COUNT = ConversationColumns.PARTICIPANT_COUNT; - static final String NOTIFICATION_ENABLED = ConversationColumns.NOTIFICATION_ENABLED; - static final String NOTIFICATION_SOUND_URI = ConversationColumns.NOTIFICATION_SOUND_URI; - static final String NOTIFICATION_VIBRATION = ConversationColumns.NOTIFICATION_VIBRATION; static final String INCLUDE_EMAIL_ADDRESS = ConversationColumns.INCLUDE_EMAIL_ADDRESS; static final String MESSAGE_STATUS = MessageColumns.STATUS; @@ -424,9 +397,6 @@ public class ConversationListItemData { ConversationListViewColumns.OTHER_PARTICIPANT_NORMALIZED_DESTINATION, ConversationListViewColumns.PARTICIPANT_COUNT, ConversationListViewColumns.CURRENT_SELF_ID, - ConversationListViewColumns.NOTIFICATION_ENABLED, - ConversationListViewColumns.NOTIFICATION_SOUND_URI, - ConversationListViewColumns.NOTIFICATION_VIBRATION, ConversationListViewColumns.INCLUDE_EMAIL_ADDRESS, ConversationListViewColumns.MESSAGE_STATUS, ConversationListViewColumns.SHOW_DRAFT, @@ -456,23 +426,20 @@ public class ConversationListItemData { private static final int INDEX_OTHER_PARTICIPANT_NORMALIZED_DESTINATION = 10; private static final int INDEX_PARTICIPANT_COUNT = 11; private static final int INDEX_SELF_ID = 12; - private static final int INDEX_NOTIFICATION_ENABLED = 13; - private static final int INDEX_NOTIFICATION_SOUND_URI = 14; - private static final int INDEX_NOTIFICATION_VIBRATION = 15; - private static final int INDEX_INCLUDE_EMAIL_ADDRESS = 16; - private static final int INDEX_MESSAGE_STATUS = 17; - private static final int INDEX_SHOW_DRAFT = 18; - private static final int INDEX_DRAFT_PREVIEW_URI = 19; - private static final int INDEX_DRAFT_PREVIEW_CONTENT_TYPE = 20; - private static final int INDEX_DRAFT_SNIPPET_TEXT = 21; - private static final int INDEX_ARCHIVE_STATUS = 22; - private static final int INDEX_MESSAGE_ID = 23; - private static final int INDEX_SUBJECT_TEXT = 24; - private static final int INDEX_DRAFT_SUBJECT_TEXT = 25; - private static final int INDEX_MESSAGE_RAW_TELEPHONY_STATUS = 26; - private static final int INDEX_SNIPPET_SENDER_FIRST_NAME = 27; - private static final int INDEX_SNIPPET_SENDER_DISPLAY_DESTINATION = 28; - private static final int INDEX_IS_ENTERPRISE = 29; + private static final int INDEX_INCLUDE_EMAIL_ADDRESS = 13; + private static final int INDEX_MESSAGE_STATUS = 14; + private static final int INDEX_SHOW_DRAFT = 15; + private static final int INDEX_DRAFT_PREVIEW_URI = 16; + private static final int INDEX_DRAFT_PREVIEW_CONTENT_TYPE = 17; + private static final int INDEX_DRAFT_SNIPPET_TEXT = 18; + private static final int INDEX_ARCHIVE_STATUS = 19; + private static final int INDEX_MESSAGE_ID = 20; + private static final int INDEX_SUBJECT_TEXT = 21; + private static final int INDEX_DRAFT_SUBJECT_TEXT = 22; + private static final int INDEX_MESSAGE_RAW_TELEPHONY_STATUS = 23; + private static final int INDEX_SNIPPET_SENDER_FIRST_NAME = 24; + private static final int INDEX_SNIPPET_SENDER_DISPLAY_DESTINATION = 25; + private static final int INDEX_IS_ENTERPRISE = 26; private static final String DIVIDER_TEXT = ", "; diff --git a/src/com/android/messaging/datamodel/data/PeopleAndOptionsData.java b/src/com/android/messaging/datamodel/data/PeopleAndOptionsData.java index 650a037..b8b4a41 100644 --- a/src/com/android/messaging/datamodel/data/PeopleAndOptionsData.java +++ b/src/com/android/messaging/datamodel/data/PeopleAndOptionsData.java @@ -26,7 +26,6 @@ import android.os.Bundle; import com.android.messaging.datamodel.BoundCursorLoader; import com.android.messaging.datamodel.MessagingContentProvider; import com.android.messaging.datamodel.action.BugleActionToasts; -import com.android.messaging.datamodel.action.UpdateConversationOptionsAction; import com.android.messaging.datamodel.action.UpdateDestinationBlockedAction; import com.android.messaging.datamodel.binding.BindableData; import com.android.messaging.datamodel.binding.BindingBase; @@ -74,7 +73,7 @@ public class PeopleAndOptionsData extends BindableData implements final Uri uri = MessagingContentProvider.buildConversationMetadataUri(mConversationId); return new BoundCursorLoader(bindingId, mContext, uri, - PeopleOptionsItemData.PROJECTION, null, null, null); + new String[]{}, null, null, null); } case PARTICIPANT_LOADER: { @@ -169,33 +168,6 @@ public class PeopleAndOptionsData extends BindableData implements } } - public void enableConversationNotifications(final BindingBase binding, - final boolean enable) { - final String bindingId = binding.getBindingId(); - if (isBound(bindingId)) { - UpdateConversationOptionsAction.enableConversationNotifications( - mConversationId, enable); - } - } - - public void setConversationNotificationSound(final BindingBase binding, - final String ringtoneUri) { - final String bindingId = binding.getBindingId(); - if (isBound(bindingId)) { - UpdateConversationOptionsAction.setConversationNotificationSound(mConversationId, - ringtoneUri); - } - } - - public void enableConversationNotificationVibration( - final BindingBase binding, final boolean enable) { - final String bindingId = binding.getBindingId(); - if (isBound(bindingId)) { - UpdateConversationOptionsAction.enableVibrationForConversationNotification( - mConversationId, enable); - } - } - public void setDestinationBlocked(final BindingBase binding, final boolean blocked) { final String bindingId = binding.getBindingId(); @@ -207,4 +179,8 @@ public class PeopleAndOptionsData extends BindableData implements BugleActionToasts.makeUpdateDestinationBlockedActionListener(mContext)); } } + + public String getConversationId() { + return mConversationId; + } } diff --git a/src/com/android/messaging/datamodel/data/PeopleOptionsItemData.java b/src/com/android/messaging/datamodel/data/PeopleOptionsItemData.java index 5af6a30..7441afc 100644 --- a/src/com/android/messaging/datamodel/data/PeopleOptionsItemData.java +++ b/src/com/android/messaging/datamodel/data/PeopleOptionsItemData.java @@ -17,44 +17,19 @@ package com.android.messaging.datamodel.data; import android.content.Context; import android.database.Cursor; -import android.media.Ringtone; -import android.media.RingtoneManager; import android.net.Uri; import com.android.messaging.R; import com.android.messaging.datamodel.data.ConversationListItemData.ConversationListViewColumns; import com.android.messaging.util.Assert; -import com.android.messaging.util.RingtoneUtil; public class PeopleOptionsItemData { - public static final String[] PROJECTION = { - ConversationListViewColumns.NOTIFICATION_ENABLED, - ConversationListViewColumns.NOTIFICATION_SOUND_URI, - ConversationListViewColumns.NOTIFICATION_VIBRATION, - }; - - // Column index for query projection. - private static final int INDEX_NOTIFICATION_ENABLED = 0; - private static final int INDEX_NOTIFICATION_SOUND_URI = 1; - private static final int INDEX_NOTIFICATION_VIBRATION = 2; - // Identification for each setting that's surfaced to the UI layer. - public static final int SETTING_NOTIFICATION_ENABLED = 0; - public static final int SETTING_NOTIFICATION_SOUND_URI = 1; - public static final int SETTING_NOTIFICATION_VIBRATION = 2; - public static final int SETTING_BLOCKED = 3; - public static final int SETTINGS_COUNT = 4; - - // Type of UI switch to show for the toggle button. - public static final int TOGGLE_TYPE_CHECKBOX = 0; - public static final int TOGGLE_TYPE_SWITCH = 1; + public static final int SETTING_NOTIFICATION = 0; + public static final int SETTING_BLOCKED = 1; + public static final int SETTINGS_COUNT = 2; private String mTitle; - private String mSubtitle; - private Uri mRingtoneUri; - private boolean mCheckable; - private boolean mChecked; - private boolean mEnabled; private int mItemId; private ParticipantData mOtherParticipant; @@ -71,41 +46,12 @@ public class PeopleOptionsItemData { */ public void bind( final Cursor cursor, final ParticipantData otherParticipant, final int settingType) { - mSubtitle = null; - mRingtoneUri = null; - mCheckable = true; - mEnabled = true; mItemId = settingType; mOtherParticipant = otherParticipant; - final boolean notificationEnabled = cursor.getInt(INDEX_NOTIFICATION_ENABLED) == 1; switch (settingType) { - case SETTING_NOTIFICATION_ENABLED: + case SETTING_NOTIFICATION: mTitle = mContext.getString(R.string.notifications_enabled_conversation_pref_title); - mChecked = notificationEnabled; - break; - - case SETTING_NOTIFICATION_SOUND_URI: - mTitle = mContext.getString(R.string.notification_sound_pref_title); - final String ringtoneString = cursor.getString(INDEX_NOTIFICATION_SOUND_URI); - Uri ringtoneUri = RingtoneUtil.getNotificationRingtoneUri(ringtoneString); - - mSubtitle = mContext.getString(R.string.silent_ringtone); - if (ringtoneUri != null) { - final Ringtone ringtone = RingtoneManager.getRingtone(mContext, ringtoneUri); - if (ringtone != null) { - mSubtitle = ringtone.getTitle(mContext); - } - } - mCheckable = false; - mRingtoneUri = ringtoneUri; - mEnabled = notificationEnabled; - break; - - case SETTING_NOTIFICATION_VIBRATION: - mTitle = mContext.getString(R.string.notification_vibrate_pref_title); - mChecked = cursor.getInt(INDEX_NOTIFICATION_VIBRATION) == 1; - mEnabled = notificationEnabled; break; case SETTING_BLOCKED: @@ -113,7 +59,6 @@ public class PeopleOptionsItemData { final int resourceId = otherParticipant.isBlocked() ? R.string.unblock_contact_title : R.string.block_contact_title; mTitle = mContext.getString(resourceId, otherParticipant.getDisplayDestination()); - mCheckable = false; break; default: @@ -125,30 +70,10 @@ public class PeopleOptionsItemData { return mTitle; } - public String getSubtitle() { - return mSubtitle; - } - - public boolean getCheckable() { - return mCheckable; - } - - public boolean getChecked() { - return mChecked; - } - - public boolean getEnabled() { - return mEnabled; - } - public int getItemId() { return mItemId; } - public Uri getRingtoneUri() { - return mRingtoneUri; - } - public ParticipantData getOtherParticipant() { return mOtherParticipant; } diff --git a/src/com/android/messaging/receiver/SmsReceiver.java b/src/com/android/messaging/receiver/SmsReceiver.java index f1f9bcd..c36e9ab 100644 --- a/src/com/android/messaging/receiver/SmsReceiver.java +++ b/src/com/android/messaging/receiver/SmsReceiver.java @@ -252,11 +252,6 @@ public final class SmsReceiver extends BroadcastReceiver { protected Style build(Builder builder) { return null; } - - @Override - public boolean getNotificationVibrate() { - return true; - } } public static void postNewMessageSecondaryUserNotification() { @@ -282,10 +277,7 @@ public final class SmsReceiver extends BroadcastReceiver { final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(Factory.get().getApplicationContext()); - int defaults = Notification.DEFAULT_LIGHTS; - if (BugleNotifications.shouldVibrate(new SecondaryUserNotificationState())) { - defaults |= Notification.DEFAULT_VIBRATE; - } + int defaults = Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE; notification.defaults = defaults; notificationManager.notify(getNotificationTag(), diff --git a/src/com/android/messaging/ui/UIIntents.java b/src/com/android/messaging/ui/UIIntents.java index bf5edd7..1b4bb41 100644 --- a/src/com/android/messaging/ui/UIIntents.java +++ b/src/com/android/messaging/ui/UIIntents.java @@ -264,16 +264,6 @@ public abstract class UIIntents { */ public abstract Intent getViewUrlIntent(final String url); - /** - * Get an intent to launch the ringtone picker - * @param title the title to show in the ringtone picker - * @param existingUri the currently set uri - * @param defaultUri the default uri if none is currently set - * @param toneType type of ringtone to pick, maybe any of RingtoneManager.TYPE_* - */ - public abstract Intent getRingtonePickerIntent(final String title, final Uri existingUri, - final Uri defaultUri, final int toneType); - /** * Get an intent to launch the wireless alert viewer. */ diff --git a/src/com/android/messaging/ui/UIIntentsImpl.java b/src/com/android/messaging/ui/UIIntentsImpl.java index 8a1224a..d64082d 100644 --- a/src/com/android/messaging/ui/UIIntentsImpl.java +++ b/src/com/android/messaging/ui/UIIntentsImpl.java @@ -27,7 +27,6 @@ import android.content.Context; import android.content.Intent; import android.graphics.Point; import android.graphics.Rect; -import android.media.RingtoneManager; import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract.Contacts; @@ -450,16 +449,6 @@ public class UIIntentsImpl extends UIIntents { return resultPendingIntent; } - @Override - public Intent getRingtonePickerIntent(final String title, final Uri existingUri, - final Uri defaultUri, final int toneType) { - return new Intent(RingtoneManager.ACTION_RINGTONE_PICKER) - .putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, toneType) - .putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, title) - .putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, existingUri) - .putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, defaultUri); - } - @Override public PendingIntent getPendingIntentForLowStorageNotifications(final Context context) { final TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context); diff --git a/src/com/android/messaging/ui/appsettings/ApplicationSettingsActivity.java b/src/com/android/messaging/ui/appsettings/ApplicationSettingsActivity.java index 1d67308..19979a9 100644 --- a/src/com/android/messaging/ui/appsettings/ApplicationSettingsActivity.java +++ b/src/com/android/messaging/ui/appsettings/ApplicationSettingsActivity.java @@ -18,18 +18,12 @@ package com.android.messaging.ui.appsettings; import android.app.FragmentTransaction; import android.content.Intent; -import android.content.SharedPreferences; -import android.content.SharedPreferences.OnSharedPreferenceChangeListener; -import android.media.Ringtone; -import android.media.RingtoneManager; import android.net.Uri; import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceFragment; import android.preference.PreferenceScreen; -import android.preference.RingtonePreference; import android.preference.SwitchPreference; -import android.preference.TwoStatePreference; import android.provider.Settings; import androidx.core.app.NavUtils; import android.text.TextUtils; @@ -85,14 +79,10 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity { return super.onOptionsItemSelected(item); } - public static class ApplicationSettingsFragment extends PreferenceFragment implements - OnSharedPreferenceChangeListener { + public static class ApplicationSettingsFragment extends PreferenceFragment { - private String mNotificationsEnabledPreferenceKey; - private TwoStatePreference mNotificationsEnabledPreference; - private String mRingtonePreferenceKey; - private RingtonePreference mRingtonePreference; - private Preference mVibratePreference; + private String mNotificationsPreferenceKey; + private Preference mNotificationsPreference; private String mSmsDisabledPrefKey; private Preference mSmsDisabledPreference; private String mSmsEnabledPrefKey; @@ -112,14 +102,9 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity { getPreferenceManager().setSharedPreferencesName(BuglePrefs.SHARED_PREFERENCES_NAME); addPreferencesFromResource(R.xml.preferences_application); - mNotificationsEnabledPreferenceKey = - getString(R.string.notifications_enabled_pref_key); - mNotificationsEnabledPreference = (TwoStatePreference) findPreference( - mNotificationsEnabledPreferenceKey); - mRingtonePreferenceKey = getString(R.string.notification_sound_pref_key); - mRingtonePreference = (RingtonePreference) findPreference(mRingtonePreferenceKey); - mVibratePreference = findPreference( - getString(R.string.notification_vibration_pref_key)); + mNotificationsPreferenceKey = + getString(R.string.notifications_pref_key); + mNotificationsPreference = findPreference(mNotificationsPreferenceKey); mSmsDisabledPrefKey = getString(R.string.sms_disabled_pref_key); mSmsDisabledPreference = findPreference(mSmsDisabledPrefKey); mSmsEnabledPrefKey = getString(R.string.sms_enabled_pref_key); @@ -130,9 +115,6 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity { (SwitchPreference) findPreference(mSwipeRightToDeleteConversationkey); mIsSmsPreferenceClicked = false; - final SharedPreferences prefs = getPreferenceScreen().getSharedPreferences(); - updateSoundSummary(prefs); - if (!DebugUtils.isDebugEnabled()) { final Preference debugCategory = findPreference(getString( R.string.debug_pref_key)); @@ -154,8 +136,13 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity { } @Override - public boolean onPreferenceTreeClick (PreferenceScreen preferenceScreen, + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (preference.getKey() == mNotificationsPreferenceKey) { + Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS); + intent.putExtra(Settings.EXTRA_APP_PACKAGE, getContext().getPackageName()); + startActivity(intent); + } if (preference.getKey() == mSmsDisabledPrefKey || preference.getKey() == mSmsEnabledPrefKey) { mIsSmsPreferenceClicked = true; @@ -163,35 +150,6 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity { return super.onPreferenceTreeClick(preferenceScreen, preference); } - private void updateSoundSummary(final SharedPreferences sharedPreferences) { - // The silent ringtone just returns an empty string - String ringtoneName = mRingtonePreference.getContext().getString( - R.string.silent_ringtone); - - String ringtoneString = sharedPreferences.getString(mRingtonePreferenceKey, null); - - // Bootstrap the default setting in the preferences so that we have a valid selection - // in the dialog the first time that the user opens it. - if (ringtoneString == null) { - ringtoneString = Settings.System.DEFAULT_NOTIFICATION_URI.toString(); - final SharedPreferences.Editor editor = sharedPreferences.edit(); - editor.putString(mRingtonePreferenceKey, ringtoneString); - editor.apply(); - } - - if (!TextUtils.isEmpty(ringtoneString)) { - final Uri ringtoneUri = Uri.parse(ringtoneString); - final Ringtone tone = RingtoneManager.getRingtone(mRingtonePreference.getContext(), - ringtoneUri); - - if (tone != null) { - ringtoneName = tone.getTitle(mRingtonePreference.getContext()); - } - } - - mRingtonePreference.setSummary(ringtoneName); - } - private void updateSmsEnabledPreferences() { if (!OsUtil.isAtLeastKLP()) { getPreferenceScreen().removePreference(mSmsDisabledPreference); @@ -222,48 +180,14 @@ public class ApplicationSettingsActivity extends BugleActionBarActivity { getPreferenceScreen().removePreference(mSmsEnabledPreference); mSmsDisabledPreference.setSummary(defaultSmsAppLabel); } - updateNotificationsPreferences(); } mIsSmsPreferenceClicked = false; } - private void updateNotificationsPreferences() { - final boolean canNotify = !OsUtil.isAtLeastKLP() - || PhoneUtils.getDefault().isDefaultSmsApp(); - mNotificationsEnabledPreference.setEnabled(canNotify); - } - - @Override - public void onStart() { - super.onStart(); - // We do this on start rather than on resume because the sound picker is in a - // separate activity. - getPreferenceScreen().getSharedPreferences() - .registerOnSharedPreferenceChangeListener(this); - } - @Override public void onResume() { super.onResume(); updateSmsEnabledPreferences(); - updateNotificationsPreferences(); - } - - @Override - public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, - final String key) { - if (key.equals(mNotificationsEnabledPreferenceKey)) { - updateNotificationsPreferences(); - } else if (key.equals(mRingtonePreferenceKey)) { - updateSoundSummary(sharedPreferences); - } - } - - @Override - public void onStop() { - super.onStop(); - getPreferenceScreen().getSharedPreferences() - .unregisterOnSharedPreferenceChangeListener(this); } } } diff --git a/src/com/android/messaging/ui/conversationlist/AbstractConversationListActivity.java b/src/com/android/messaging/ui/conversationlist/AbstractConversationListActivity.java index a2b0bdf..e7bfd66 100644 --- a/src/com/android/messaging/ui/conversationlist/AbstractConversationListActivity.java +++ b/src/com/android/messaging/ui/conversationlist/AbstractConversationListActivity.java @@ -30,7 +30,6 @@ import android.view.View; import com.android.messaging.R; import com.android.messaging.datamodel.action.DeleteConversationAction; import com.android.messaging.datamodel.action.UpdateConversationArchiveStatusAction; -import com.android.messaging.datamodel.action.UpdateConversationOptionsAction; import com.android.messaging.datamodel.action.UpdateDestinationBlockedAction; import com.android.messaging.datamodel.data.ConversationListData; import com.android.messaging.datamodel.data.ConversationListItemData; @@ -190,23 +189,6 @@ public abstract class AbstractConversationListActivity extends BugleActionBarAc exitMultiSelectState(); } - @Override - public void onActionBarNotification(final Iterable conversations, - final boolean isNotificationOn) { - for (final SelectedConversation conversation : conversations) { - UpdateConversationOptionsAction.enableConversationNotifications( - conversation.conversationId, isNotificationOn); - } - - final int textId = isNotificationOn ? - R.string.notification_on_toast_message : R.string.notification_off_toast_message; - final String message = getResources().getString(textId, 1); - UiUtils.showSnackBar(this, findViewById(android.R.id.list), message, - null /* undoRunnable */, - SnackBar.Action.SNACK_BAR_UNDO, mConversationListFragment.getSnackBarInteractions()); - exitMultiSelectState(); - } - @Override public void onActionBarAddContact(final SelectedConversation conversation) { final Uri avatarUri; diff --git a/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java b/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java index de036fc..9331d10 100644 --- a/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java +++ b/src/com/android/messaging/ui/conversationlist/ConversationListItemView.java @@ -127,7 +127,6 @@ public class ConversationListItemView extends FrameLayout implements OnClickList private TextView mTimestampTextView; private ContactIconView mContactIconView; private ImageView mContactCheckmarkView; - private ImageView mNotificationBellView; private ImageView mFailedStatusIconView; private ImageView mCrossSwipeArchiveLeftImageView; private ImageView mCrossSwipeArchiveRightImageView; @@ -153,7 +152,6 @@ public class ConversationListItemView extends FrameLayout implements OnClickList mTimestampTextView = (TextView) findViewById(R.id.conversation_timestamp); mContactIconView = (ContactIconView) findViewById(R.id.conversation_icon); mContactCheckmarkView = (ImageView) findViewById(R.id.conversation_checkmark); - mNotificationBellView = (ImageView) findViewById(R.id.conversation_notification_bell); mFailedStatusIconView = (ImageView) findViewById(R.id.conversation_failed_status_icon); mCrossSwipeArchiveLeftImageView = (ImageView) findViewById(R.id.crossSwipeArchiveIconLeft); mCrossSwipeArchiveRightImageView = @@ -503,9 +501,6 @@ public class ConversationListItemView extends FrameLayout implements OnClickList mAudioAttachmentView.setOnLongClickListener(this); mAudioAttachmentView.setVisibility(audioPreviewVisiblity); - final int notificationBellVisiblity = mData.getNotificationEnabled() ? GONE : VISIBLE; - mNotificationBellView.setVisibility(notificationBellVisiblity); - if (PrefsUtils.isSwipeRightToDeleteEnabled()) { mCrossSwipeArchiveLeftImageView.setImageDrawable(getResources() .getDrawable(R.drawable.ic_delete_small_dark)); diff --git a/src/com/android/messaging/ui/conversationlist/MultiSelectActionModeCallback.java b/src/com/android/messaging/ui/conversationlist/MultiSelectActionModeCallback.java index 64d1436..96c962e 100644 --- a/src/com/android/messaging/ui/conversationlist/MultiSelectActionModeCallback.java +++ b/src/com/android/messaging/ui/conversationlist/MultiSelectActionModeCallback.java @@ -37,8 +37,6 @@ public class MultiSelectActionModeCallback implements Callback { void onActionBarDelete(Collection conversations); void onActionBarArchive(Iterable conversations, boolean isToArchive); - void onActionBarNotification(Iterable conversations, - boolean isNotificationOn); void onActionBarAddContact(final SelectedConversation conversation); void onActionBarBlock(final SelectedConversation conversation); void onActionBarHome(); @@ -52,7 +50,6 @@ public class MultiSelectActionModeCallback implements Callback { public final CharSequence participantLookupKey; public final boolean isGroup; public final boolean isArchived; - public final boolean notificationEnabled; public SelectedConversation(ConversationListItemData data) { conversationId = data.getConversationId(); timestamp = data.getTimestamp(); @@ -61,7 +58,6 @@ public class MultiSelectActionModeCallback implements Callback { participantLookupKey = data.getParticipantLookupKey(); isGroup = data.getIsGroup(); isArchived = data.getIsArchived(); - notificationEnabled = data.getNotificationEnabled(); } } @@ -72,8 +68,6 @@ public class MultiSelectActionModeCallback implements Callback { private MenuItem mUnarchiveMenuItem; private MenuItem mAddContactMenuItem; private MenuItem mBlockMenuItem; - private MenuItem mNotificationOnMenuItem; - private MenuItem mNotificationOffMenuItem; private boolean mHasInflated; public MultiSelectActionModeCallback(final Listener listener) { @@ -89,8 +83,6 @@ public class MultiSelectActionModeCallback implements Callback { mUnarchiveMenuItem = menu.findItem(R.id.action_unarchive); mAddContactMenuItem = menu.findItem(R.id.action_add_contact); mBlockMenuItem = menu.findItem(R.id.action_block); - mNotificationOffMenuItem = menu.findItem(R.id.action_notification_off); - mNotificationOnMenuItem = menu.findItem(R.id.action_notification_on); mHasInflated = true; updateActionIconsVisiblity(); return true; @@ -113,12 +105,6 @@ public class MultiSelectActionModeCallback implements Callback { case R.id.action_unarchive: mListener.onActionBarArchive(mSelectedConversations.values(), false); return true; - case R.id.action_notification_off: - mListener.onActionBarNotification(mSelectedConversations.values(), false); - return true; - case R.id.action_notification_on: - mListener.onActionBarNotification(mSelectedConversations.values(), true); - return true; case R.id.action_add_contact: Assert.isTrue(mSelectedConversations.size() == 1); mListener.onActionBarAddContact(mSelectedConversations.valueAt(0)); @@ -186,16 +172,8 @@ public class MultiSelectActionModeCallback implements Callback { boolean hasCurrentlyArchived = false; boolean hasCurrentlyUnarchived = false; - boolean hasCurrentlyOnNotification = false; - boolean hasCurrentlyOffNotification = false; final Iterable conversations = mSelectedConversations.values(); for (final SelectedConversation conversation : conversations) { - if (conversation.notificationEnabled) { - hasCurrentlyOnNotification = true; - } else { - hasCurrentlyOffNotification = true; - } - if (conversation.isArchived) { hasCurrentlyArchived = true; } else { @@ -203,15 +181,10 @@ public class MultiSelectActionModeCallback implements Callback { } // If we found at least one of each example we don't need to keep looping. - if (hasCurrentlyOffNotification && hasCurrentlyOnNotification && - hasCurrentlyArchived && hasCurrentlyUnarchived) { + if (hasCurrentlyArchived && hasCurrentlyUnarchived) { break; } } - // If we have notification off conversations we show on button, if we have notification on - // conversation we show off button. We can show both if we have a mixture. - mNotificationOffMenuItem.setVisible(hasCurrentlyOnNotification); - mNotificationOnMenuItem.setVisible(hasCurrentlyOffNotification); mArchiveMenuItem.setVisible(hasCurrentlyUnarchived); mUnarchiveMenuItem.setVisible(hasCurrentlyArchived); diff --git a/src/com/android/messaging/ui/conversationsettings/PeopleAndOptionsFragment.java b/src/com/android/messaging/ui/conversationsettings/PeopleAndOptionsFragment.java index b86d952..00af751 100644 --- a/src/com/android/messaging/ui/conversationsettings/PeopleAndOptionsFragment.java +++ b/src/com/android/messaging/ui/conversationsettings/PeopleAndOptionsFragment.java @@ -18,12 +18,12 @@ package com.android.messaging.ui.conversationsettings; import android.app.Activity; import android.app.AlertDialog; import android.app.Fragment; +import android.app.NotificationManager; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Resources; import android.database.Cursor; -import android.media.RingtoneManager; import android.os.Bundle; import android.os.Parcelable; import android.provider.Settings; @@ -49,6 +49,7 @@ import com.android.messaging.ui.CompositeAdapter; import com.android.messaging.ui.PersonItemView; import com.android.messaging.ui.UIIntents; import com.android.messaging.ui.conversation.ConversationActivity; +import com.android.messaging.util.NotificationsUtil; import com.android.messaging.util.Assert; import java.util.ArrayList; @@ -62,11 +63,10 @@ public class PeopleAndOptionsFragment extends Fragment private ListView mListView; private OptionsListAdapter mOptionsListAdapter; private PeopleListAdapter mPeopleListAdapter; + private List mOtherParticipants; private final Binding mBinding = BindingBase.createBinding(this); - private static final int REQUEST_CODE_RINGTONE_PICKER = 1000; - @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -89,17 +89,6 @@ public class PeopleAndOptionsFragment extends Fragment return view; } - @Override - public void onActivityResult(final int requestCode, final int resultCode, final Intent data) { - super.onActivityResult(requestCode, resultCode, data); - if (resultCode == Activity.RESULT_OK && requestCode == REQUEST_CODE_RINGTONE_PICKER) { - final Parcelable pick = data.getParcelableExtra( - RingtoneManager.EXTRA_RINGTONE_PICKED_URI); - final String pickedUri = pick == null ? "" : pick.toString(); - mBinding.getData().setConversationNotificationSound(mBinding, pickedUri); - } - } - @Override public void onDestroy() { super.onDestroy(); @@ -125,30 +114,31 @@ public class PeopleAndOptionsFragment extends Fragment final List participants) { mBinding.ensureBound(data); mPeopleListAdapter.updateParticipants(participants); + mOtherParticipants = participants; final ParticipantData otherParticipant = participants.size() == 1 ? participants.get(0) : null; mOptionsListAdapter.setOtherParticipant(otherParticipant); } @Override - public void onOptionsItemViewClicked(final PeopleOptionsItemData item, - final boolean isChecked) { + public void onOptionsItemViewClicked(final PeopleOptionsItemData item) { switch (item.getItemId()) { - case PeopleOptionsItemData.SETTING_NOTIFICATION_ENABLED: - mBinding.getData().enableConversationNotifications(mBinding, isChecked); - break; - - case PeopleOptionsItemData.SETTING_NOTIFICATION_SOUND_URI: - final Intent ringtonePickerIntent = UIIntents.get().getRingtonePickerIntent( - getString(R.string.notification_sound_pref_title), - item.getRingtoneUri(), Settings.System.DEFAULT_NOTIFICATION_URI, - RingtoneManager.TYPE_NOTIFICATION); - startActivityForResult(ringtonePickerIntent, REQUEST_CODE_RINGTONE_PICKER); - break; - - case PeopleOptionsItemData.SETTING_NOTIFICATION_VIBRATION: - mBinding.getData().enableConversationNotificationVibration(mBinding, - isChecked); + case PeopleOptionsItemData.SETTING_NOTIFICATION: + ArrayList participantsNames = new ArrayList(); + for (ParticipantData participant : mOtherParticipants) { + participantsNames.add(participant.getDisplayName(true)); + } + NotificationsUtil.createNotificationChannelGroup(getActivity(), + NotificationsUtil.CONVERSATION_GROUP_NAME, + R.string.notification_channel_messages_title); + NotificationsUtil.createNotificationChannel(getActivity(), + mBinding.getData().getConversationId(), + String.join(", ", participantsNames), + NotificationManager.IMPORTANCE_DEFAULT, + NotificationsUtil.CONVERSATION_GROUP_NAME); + Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS); + intent.putExtra(Settings.EXTRA_APP_PACKAGE, getContext().getPackageName()); + startActivity(intent); break; case PeopleOptionsItemData.SETTING_BLOCKED: diff --git a/src/com/android/messaging/ui/conversationsettings/PeopleOptionsItemView.java b/src/com/android/messaging/ui/conversationsettings/PeopleOptionsItemView.java index 5b6f3b0..91fd10c 100644 --- a/src/com/android/messaging/ui/conversationsettings/PeopleOptionsItemView.java +++ b/src/com/android/messaging/ui/conversationsettings/PeopleOptionsItemView.java @@ -38,7 +38,7 @@ public class PeopleOptionsItemView extends LinearLayout { * Implemented by the host of this view that handles options click event. */ public interface HostInterface { - void onOptionsItemViewClicked(PeopleOptionsItemData item, boolean isChecked); + void onOptionsItemViewClicked(PeopleOptionsItemData item); } private TextView mTitle; @@ -55,12 +55,10 @@ public class PeopleOptionsItemView extends LinearLayout { @Override protected void onFinishInflate () { mTitle = (TextView) findViewById(R.id.title); - mSubtitle = (TextView) findViewById(R.id.subtitle); - mSwitch = (SwitchCompat) findViewById(R.id.switch_button); setOnClickListener(new OnClickListener() { @Override public void onClick(final View v) { - mHostInterface.onOptionsItemViewClicked(mData, !mData.getChecked()); + mHostInterface.onOptionsItemViewClicked(mData); } }); } @@ -72,28 +70,5 @@ public class PeopleOptionsItemView extends LinearLayout { mHostInterface = hostInterface; mTitle.setText(mData.getTitle()); - final String subtitle = mData.getSubtitle(); - if (TextUtils.isEmpty(subtitle)) { - mSubtitle.setVisibility(GONE); - } else { - mSubtitle.setVisibility(VISIBLE); - mSubtitle.setText(subtitle); - } - - if (mData.getCheckable()) { - mSwitch.setVisibility(VISIBLE); - mSwitch.setChecked(mData.getChecked()); - } else { - mSwitch.setVisibility(GONE); - } - - final boolean enabled = mData.getEnabled(); - if (enabled != isEnabled()) { - mTitle.setEnabled(enabled); - mSubtitle.setEnabled(enabled); - mSwitch.setEnabled(enabled); - setAlpha(enabled ? 1.0f : 0.5f); - setEnabled(enabled); - } } } diff --git a/src/com/android/messaging/util/NotificationsUtil.java b/src/com/android/messaging/util/NotificationsUtil.java new file mode 100644 index 0000000..591f15a --- /dev/null +++ b/src/com/android/messaging/util/NotificationsUtil.java @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.messaging.util; + +import android.app.NotificationChannel; +import android.app.NotificationChannelGroup; +import android.app.NotificationManager; +import android.content.Context; +import android.os.Build; + +public final class NotificationsUtil { + public static final String DEFAULT_CHANNEL_ID = "messaging_channel"; + public static final String CONVERSATION_GROUP_NAME = "conversation_group"; + + private NotificationsUtil() { + } + + public static void createNotificationChannel(Context context, String id, + int titleResId, int priority, String groupId) { + String title = context.getString(titleResId); + createNotificationChannel(context, id, title, priority, groupId); + } + + public static void createNotificationChannel(Context context, String id, + String title, int priority, String groupId) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + return; + } + + NotificationManager manager = context.getSystemService(NotificationManager.class); + NotificationChannel existing = manager.getNotificationChannel(id); + if (existing != null) { + return; + } + + NotificationChannel newChannel = new NotificationChannel(id, title, priority); + newChannel.enableLights(true); + if (groupId != null) { + newChannel.setGroup(groupId); + } + manager.createNotificationChannel(newChannel); + } + + public static void deleteNotificationChannel(Context context, String id) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + return; + } + + NotificationManager manager = context.getSystemService(NotificationManager.class); + manager.deleteNotificationChannel(id); + } + + public static void createNotificationChannelGroup(Context context, String id, + int titleResId) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + return; + } + + NotificationManager manager = context.getSystemService(NotificationManager.class); + NotificationChannelGroup existing = manager.getNotificationChannelGroup(id); + if (existing != null) { + return; + } + + String title = context.getString(titleResId); + NotificationChannelGroup newChannelGroup = new NotificationChannelGroup(id, title); + manager.createNotificationChannelGroup(newChannelGroup); + } + + public static NotificationChannel getNotificationChannel(Context context, String id) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + return null; + } + + NotificationManager manager = context.getSystemService(NotificationManager.class); + return manager.getNotificationChannel(id); + } + + public static NotificationChannelGroup getNotificationChannelGroup(Context context, String id) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + return null; + } + + NotificationManager manager = context.getSystemService(NotificationManager.class); + return manager.getNotificationChannelGroup(id); + } +} diff --git a/src/com/android/messaging/util/RingtoneUtil.java b/src/com/android/messaging/util/RingtoneUtil.java deleted file mode 100644 index a7facfb..0000000 --- a/src/com/android/messaging/util/RingtoneUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.messaging.util; - -import android.content.Context; -import android.net.Uri; -import android.provider.Settings; -import android.text.TextUtils; - -import com.android.messaging.Factory; -import com.android.messaging.R; - -public class RingtoneUtil { - /** - * Return a ringtone Uri for the string representation passed in. Use the app - * and system defaults as fallbacks - * @param ringtoneString is the ringtone to resolve - * @return the Uri of the ringtone or the fallback ringtone - */ - public static Uri getNotificationRingtoneUri(String ringtoneString) { - if (ringtoneString == null) { - // No override specified, fall back to system-wide setting. - final BuglePrefs prefs = BuglePrefs.getApplicationPrefs(); - final Context context = Factory.get().getApplicationContext(); - final String prefKey = context.getString(R.string.notification_sound_pref_key); - ringtoneString = prefs.getString(prefKey, null); - } - - if (!TextUtils.isEmpty(ringtoneString)) { - // We have set a value, even if it is the default Uri at some point - return Uri.parse(ringtoneString); - } else if (ringtoneString == null) { - // We have no setting specified (== null), so we default to the system default - return Settings.System.DEFAULT_NOTIFICATION_URI; - } else { - // An empty string (== "") here is the result of selecting "None" as the ringtone - return null; - } - } -} diff --git a/src/com/android/messaging/widget/WidgetConversationListService.java b/src/com/android/messaging/widget/WidgetConversationListService.java index b67bd79..023c56d 100644 --- a/src/com/android/messaging/widget/WidgetConversationListService.java +++ b/src/com/android/messaging/widget/WidgetConversationListService.java @@ -120,10 +120,6 @@ public class WidgetConversationListService extends RemoteViewsService { remoteViews.setTextViewText(R.id.from, boldifyIfUnread(conv.getName(), hasUnreadMessages)); - // Notifications turned off mini-bell icon - remoteViews.setViewVisibility(R.id.conversation_notification_bell, - conv.getNotificationEnabled() ? View.GONE : View.VISIBLE); - // On click intent. final Intent intent = UIIntents.get().getIntentForConversationActivity(mContext, conv.getConversationId(), null /* draft */); diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml index 07f0d17..3ad7d8e 100644 --- a/tests/AndroidManifest.xml +++ b/tests/AndroidManifest.xml @@ -17,7 +17,7 @@ - + diff --git a/tests/src/com/android/messaging/datamodel/action/ReadWriteDraftMessageActionTest.java b/tests/src/com/android/messaging/datamodel/action/ReadWriteDraftMessageActionTest.java index 518a722..459dd7d 100644 --- a/tests/src/com/android/messaging/datamodel/action/ReadWriteDraftMessageActionTest.java +++ b/tests/src/com/android/messaging/datamodel/action/ReadWriteDraftMessageActionTest.java @@ -113,7 +113,7 @@ public class ReadWriteDraftMessageActionTest extends BugleTestCase { participants.add(ParticipantData.getFromRawPhoneBySystemLocale(participantNumber)); final String conversationId = BugleDatabaseOperations.getOrCreateConversation(db, threadId, - senderBlocked, participants, false, false, null); + senderBlocked, participants); assertNotNull("No conversation", conversationId); return conversationId; } @@ -189,7 +189,7 @@ public class ReadWriteDraftMessageActionTest extends BugleTestCase { participants.add(ParticipantData.getFromRawPhoneBySystemLocale(Long.toString(phoneNumber))); conversationId = BugleDatabaseOperations.getOrCreateConversation(db, threadId, - senderBlocked, participants, false, false, null); + senderBlocked, participants); assertNotNull("No conversation", conversationId); final MessageData actual = BugleDatabaseOperations.readDraftMessageData(db, conversationId,