From 70338ac1581be2129e1e2e2b3ef27f1a7a43ea1a Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Mon, 28 Nov 2016 18:40:50 +0100 Subject: [PATCH] wear PoweRGbg fixes --- .../wearintegration/WatchUpdaterService.java | 1 + wear/build.gradle | 1 + .../nightscout/androidaps/NWPreferences.java | 3 +- .../main/res/drawable-hdpi/settings_off.png | Bin 0 -> 851 bytes .../main/res/drawable-hdpi/settings_on.png | Bin 0 -> 601 bytes .../main/res/drawable-mdpi/settings_off.png | Bin 0 -> 551 bytes .../main/res/drawable-mdpi/settings_on.png | Bin 0 -> 408 bytes .../main/res/drawable-xhdpi/settings_off.png | Bin 0 -> 1091 bytes .../main/res/drawable-xhdpi/settings_on.png | Bin 0 -> 779 bytes .../main/res/drawable-xxhdpi/settings_off.png | Bin 0 -> 1848 bytes .../main/res/drawable-xxhdpi/settings_on.png | Bin 0 -> 1285 bytes wear/src/main/res/xml/preferences.xml | 144 +++++++++++------- wear/wear.iml | 16 +- 13 files changed, 98 insertions(+), 67 deletions(-) create mode 100644 wear/src/main/res/drawable-hdpi/settings_off.png create mode 100644 wear/src/main/res/drawable-hdpi/settings_on.png create mode 100644 wear/src/main/res/drawable-mdpi/settings_off.png create mode 100644 wear/src/main/res/drawable-mdpi/settings_on.png create mode 100644 wear/src/main/res/drawable-xhdpi/settings_off.png create mode 100644 wear/src/main/res/drawable-xhdpi/settings_on.png create mode 100644 wear/src/main/res/drawable-xxhdpi/settings_off.png create mode 100644 wear/src/main/res/drawable-xxhdpi/settings_on.png diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java index f835df7171..b9d42a72f1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java @@ -276,6 +276,7 @@ public class WatchUpdaterService extends WearableListenerService implements NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile(); + if( profile == null) return; long beginBasalSegmentTime = startTimeWindow; long runningTime = startTimeWindow; diff --git a/wear/build.gradle b/wear/build.gradle index 26fc3e0e72..3906ab934a 100644 --- a/wear/build.gradle +++ b/wear/build.gradle @@ -52,4 +52,5 @@ dependencies { compile files('libs/hellocharts-library-1.5.5.jar') compile(name:'ustwo-clockwise-debug', ext:'aar') compile 'com.android.support:support-v4:23.0.1' + compile 'me.denley.wearpreferenceactivity:wearpreferenceactivity:0.5.0' } diff --git a/wear/src/main/java/info/nightscout/androidaps/NWPreferences.java b/wear/src/main/java/info/nightscout/androidaps/NWPreferences.java index 7a2ce9bb6c..a6e23c23cd 100644 --- a/wear/src/main/java/info/nightscout/androidaps/NWPreferences.java +++ b/wear/src/main/java/info/nightscout/androidaps/NWPreferences.java @@ -5,8 +5,9 @@ import android.os.Bundle; import android.preference.PreferenceActivity; import info.nightscout.androidaps.R; +import preference.WearPreferenceActivity; -public class NWPreferences extends PreferenceActivity { +public class NWPreferences extends WearPreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/wear/src/main/res/drawable-hdpi/settings_off.png b/wear/src/main/res/drawable-hdpi/settings_off.png new file mode 100644 index 0000000000000000000000000000000000000000..ab7e4249a7461ff1076114567767c118dec989ee GIT binary patch literal 851 zcmV-Z1FZasP)i}y zB1WsC*4vY<7;WnR6u$#!w2)(#V-akLhuQ2MqE#Wg|+O!DIt~|X`vXvvEZLmwJN>=yc0r) zMBRwEKM7*B=s>p+S)|1*>bCGbtG+8}aSK2*Xan28UXTW7!DTQCJ_v#1O8Y0Go}SHt zD2d;q&AOjAAO=axTT1ZiH2QGn|-~o66zJghs zKIyrH+v!vf&KZl3IyhF*{B+jmQKLWlJwRHjF`DN2=$%o0u(F2uUo===bQk+Wrobek5rhjgH10FD%_AZI@$)P1<7H{fY<6d0Uemz5;72u(cYzG;BQw z%lr;%&Aj`_j=#ys>%d04vZdZ7+d<|%LxzBE7wz{LZ3ng35yUqid01(2nRd%VPv?9j zZy6yVUqSoVqW#JFaNv%XIvdY4QB=378y4+v2Q5Cvq2Cg4L`e#FgEu_VNi%xmx<|DC z>}6nd;=p<_hw1McQMZ!cj+qkVKlC;oNTE7DHxTg dMCCs$e*v^!I(?3=8TSAH002ovPDHLkV1g3Rj8Xsq literal 0 HcmV?d00001 diff --git a/wear/src/main/res/drawable-hdpi/settings_on.png b/wear/src/main/res/drawable-hdpi/settings_on.png new file mode 100644 index 0000000000000000000000000000000000000000..d22797b946fce90ded6946503af8e5652c8daaa6 GIT binary patch literal 601 zcmV-f0;c_mP)YBmy)jC_ryBArgRgI1Ldtb>TE;;Xb85qhCuQ8yKftZeg169PgfG-^b?6)Qr46Nyh*I2c? z_zIBBVc;2*+1bEk4)Ge}b`|di*9Ht+0+$^P^cxVb;g>D05O_fY=wvk=1i>6w23z1R z4+FPglkS}bqcmm*&EYj8G)PU@J~#yrAeDzWUZiO56R<~`0!B>uvMfYaa|p_fK8a!w zwUPJ@)?ekDPDLODJ}nf^=3Zo4%)G$to%pao{5u%oRfT%Mi$w8Hpj$+fb}vCZE3wU@ z)`J=6I$uMw~kuEGHYE6t)M+>4>l4GL9mr$<8d7kZHtUho>ClMZz2HNP+ n7Yq7x7L@)d=!6qa{KNPGd0x-I@hGY|00000NkvXXu0mjf#H$DU literal 0 HcmV?d00001 diff --git a/wear/src/main/res/drawable-mdpi/settings_off.png b/wear/src/main/res/drawable-mdpi/settings_off.png new file mode 100644 index 0000000000000000000000000000000000000000..8ead2a2c504b44791a88f1a8779609ba923feacc GIT binary patch literal 551 zcmV+?0@(eDP)t9>NoXk+MS&>rM^{Ls@@A94BIp=p~U9Q5gFw*IC2`F|_zz`U4Qoso~aw>T% z_$8X15U{}ntlOQu8hkJT@4#!PfEh}B39jjR%C6)^;Es|8z!*K>0L2agy_E13RDeqG zMsqzf6DhRTD(C?H^u`HF7G$<-G?$=?3<5v!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9WY0o^998fA4P)^fXm4Wz+Ts55s zjM}WbOQUyweXU6jXcl&9A)64#fkvw3`E(kngly(}eAju{BnR|I7}odj%)y3Fp+nSI zaorT-lc?pjQ+AY2kK!ZXmp~=aDQ}D!@jDG2kJ)8(%;4$M;ER=`%b{`jW3Fs!K68J_f6)C0aSSr<)kz_2CUyX^XUO@q;HOGOxR+xW$#2!?3U z49YE`Gk}Shp9453Qcj_n;DYQ#IvpyD3n-v~0tzUgfC8EZ{Rh32<6h%O>oouX002ov JPDHLkV1m<6^w0nR literal 0 HcmV?d00001 diff --git a/wear/src/main/res/drawable-xhdpi/settings_on.png b/wear/src/main/res/drawable-xhdpi/settings_on.png new file mode 100644 index 0000000000000000000000000000000000000000..db90aa602c5066ed4071315e5ad271dec6e0187b GIT binary patch literal 779 zcmV+m1N8ifP)!7DgB^8 zB`pzK%qY}M|EKMH;0!Fw?m9Eh+&SL42R?7R_uTK7JNMVQIXNawm@r`?m`EfN2SG`g z4Y&h3!zz9!SODKaUKkB%0vpWbFd8tHWWY$+#MdN=x2On{0ljGqcp4V*C153u0l&e% zFc{F8M!ZG4?&2f7>}4`wntr3R0hh9fx2V(EfMFX34C*Sr!iIR_A1K$+fG0K$ARg!@ zzL1wWy9O+QJvtfC?m)ant4>SbvURq42-px>s{Tz3^{8m0zIN>zTg_%x?qn zv}#oPwfr3hp9PDjrT38Edw>EkBvAYtuvgVaXa{&MNc`hKiYrLk1=a%;PIm{lgWeWj z&2Y=>H_KuwO6bU0u&7Y{4{%D_0qGd{szCe{I4bp&cv^u0)soNttqKfik!(Pp0t0#^ z8!)TDfJv$1OBJmEwC~t2(SR!om%)n?4S1x`fS5!BJ}NX|Oq%!t-j}N~VAa!GU=Iwq z;6emFk!uFmK-|Uu&q*@iuEP`DL#h`h{lAEdr%pyuwp9BLIl7>4C*TNkL_$PFL_|bH zL_|bH#Enc$OeBSca1C%f;U-}s9P(3y9fY^#O$f&TwS=>TQ-o?^BzOaK6RrSjgppv$ zznXB|Vt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~Ugarc^6vz>%PcpTSL1su|Ftb-kZ}0TD#hWH2!a6%6|RD21;K!W3LCH| z2nIAOY`_)M#n0m1BvlQdzNeuk8!(d_VpZN`pK7uJWg4snZ8X_{iy9bEXR7$rY5iIQ z1D=>_K(0oeZrLUpu-;{%Uh{V0P7f-pWhNR>>tdx+8`~a28z|tci*1s}OcOuMt=mq8 zxku-<26)aQK7Z!)Ic-LrsN}O!PEOdoFre5*k7x&{ijWWE3GqAWv5gNzkqHKr57Pd(*G_fg z!MHN{bo)S;fp0g#fNTBS(Lm`YUxD>0I(mD#pF1n+O;~`7&;O4&1*9u9&Jf>&@icC% zow^%P7^ansc_S2-<}>TJM1PB$S9$3BG9 vlKhV{2?+@a2?+@a2?+@a2?+@a30LADm|toE9`Xib00000NkvXXu0mjfcdALD literal 0 HcmV?d00001 diff --git a/wear/src/main/res/xml/preferences.xml b/wear/src/main/res/xml/preferences.xml index eb59d8a4e4..97f8bb4027 100644 --- a/wear/src/main/res/xml/preferences.xml +++ b/wear/src/main/res/xml/preferences.xml @@ -1,73 +1,99 @@ - - + + - + - + - + - + - + - + - + - + - + - - - + - - - + diff --git a/wear/wear.iml b/wear/wear.iml index dfd9e96a36..33cd39a6c1 100644 --- a/wear/wear.iml +++ b/wear/wear.iml @@ -43,6 +43,13 @@ + + + + + + + @@ -51,13 +58,6 @@ - - - - - - - @@ -131,6 +131,7 @@ + @@ -151,6 +152,7 @@ +