From 8b775631eb55d8fbe5bb4650668d632c3a53a07e Mon Sep 17 00:00:00 2001 From: qnhoang81 Date: Tue, 19 Feb 2013 19:38:31 -0700 Subject: [PATCH] Settings part: Add Sprint Tools (CDMATools) into settings. (Part 1 of 3) -devices can set this in overlay. (Not for all CDMA devices) For more information see this thread: http://forum.xda-developers.com/showthread.php?t=1774503 Patchset 2: get rid of TABS Patchset 3: attempting to make it look clean Patchset 4: last attempt tonight to clean it... Patchset 5: rename Change-Id: I121f61cd16d4064a1ded85428ac4857c653e6582 --- res/drawable-hdpi/ic_sprint_tools.png | Bin 0 -> 3394 bytes res/drawable-mdpi/ic_sprint_tools.png | Bin 0 -> 3181 bytes res/drawable-xhdpi/ic_sprint_tools.png | Bin 0 -> 3676 bytes res/values/bools.xml | 3 +++ res/values/strings.xml | 3 +++ res/xml/settings_headers.xml | 9 +++++++++ src/com/android/settings/Settings.java | 12 ++++++++++-- 7 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 res/drawable-hdpi/ic_sprint_tools.png create mode 100644 res/drawable-mdpi/ic_sprint_tools.png create mode 100644 res/drawable-xhdpi/ic_sprint_tools.png diff --git a/res/drawable-hdpi/ic_sprint_tools.png b/res/drawable-hdpi/ic_sprint_tools.png new file mode 100644 index 0000000000000000000000000000000000000000..18acb56e2d4af9b9ea924eb7dc3c3d87e4714ffc GIT binary patch literal 3394 zcmV-I4ZZS-P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_If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0<1uBPEn_xvfX+Gwz-QueSXSd)N+rGT zl>j$3gt|h$pKG&65*zLNL_R2r?gNp9o&%In^vU}NFLI+g%V%I>mCyb&Ul_5fRSnusqzT$58*=cF}rp{C+95cA4pB(QZL zl+L6(K}_a7umLf)=-rh^$WfDp902M?_mP&I^(rD>M1G6Nn{)2(+KX=Y{b!GFfI9m( Y0Qm)Sy1fCvQ2+n{07*qoM6N<$f)=zpl>h($ literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_sprint_tools.png b/res/drawable-mdpi/ic_sprint_tools.png new file mode 100644 index 0000000000000000000000000000000000000000..1e23f6511a3579dcb65ecd349cba4394b0347272 GIT binary patch literal 3181 zcmV-z43hJSP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUO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+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004)Nkl{fnW #)xgRY|d& z&h)UFX%C4beb&>y1Gs%tes13u%>w`efEBO1my>eK~`$00uHBNiss_f_MP{FxHDtAVx*uBCIWj=l=c} zePj?k#>LptssM`+H9%$`)DYaQPXi!Bm%^)~2AG5o79|7^M-G_z!*gIko2;G24=>Dz zCpdtWbSi|yI0u>D%8-<`%4!&2sj4R0v9uTx_Y4wQHjQy0Y9dBA172ZDQGyJ}o% zy+<-0;mukOXb>*rmGa2$3E2ctAkxKKSG10FRv(yJ+i7DsGX36?@c!>_$G-yrDJI;L TQZmWK00000NkvXXu0mjfD$Us8 literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_sprint_tools.png b/res/drawable-xhdpi/ic_sprint_tools.png new file mode 100644 index 0000000000000000000000000000000000000000..615e375f4e5194e43f92ba4c6f38d1439135f680 GIT binary patch literal 3676 zcmV-i4x{mjP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O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zxQxitU) zG5|N?ht~O-4bD84TfG{9fcSR<^xGq}3i8441%QKJNnC3~&xi@2Vh->Opim5`5`gHI zLeK!ng)?=K4$`l(HU$K&57-GI^Z@pX!8NfVr~oJ-0KieP8oHPe)BqMhD1^@_1fSh0 z0FMJ0c>8ncXk(rVL(3Jj)W?D_3SdN3Zv>%Nh|d&p0vo~y00A*`5ID!>jELF*geS)HUKEa68~W}695mVBpTPfxAaIVklS0Un1gK&=-5Vd!G0yd! z4~i;o(4su2n}vBpr*VQ73CoAreFgEeNAH*qAm`kPh<+HS-qLzO<7*8T_EWS427haf zS3#Y4=7(1KpsHX;f{Mh4Rn%BP{A8Rk8wvy1M;Jh}qWE_{>7v_R#E;bkeNeGC_6fh7 zbKjMF{zOFId>t_#9G6eRaeloX&7ow-M~CMKvvBmE-DsAt!73`)*&s73>x79BVkA1u z$?83Pemd-{JHwh>bMdYT_A*yI*JqWB>j4S9xg@)*x#FV&FoYn@?<=nO6aX@XPgq*v z$pU_*G%blmUIj}Eox2-H*pG?d`WEQtx=hS^Vli`U+5-^Q^_F`A>M01WnhQV6C1 zB8iU*!3;oT@z<1glK>KlXQk800Vumen}M)KYiv^xQa4AZuDz(6AIa|r7>jQWIzVaf z2N;U~Fz_`XNb3Qm(f*wraB2vWicoa%6NMLvou&B$3qVTo28om?iQ<&SlZ#IYVXiS^ zCBBF9hG%RDp(`>6L-9-V`XzORQqvtSwj$mr*C?d`>aB>64PmrBZeVXj^z7U0Cg!io zKPzvU5D^`Me&}We#d&m>s;k&wNOeGEny&&)~o6L+0t0E7^d ziDy9QC$>oyD-=#HUXh)S24fb<&}!m^5SDj_{OM2+TH^(6#75d-vu&{ false + + + false diff --git a/res/values/strings.xml b/res/values/strings.xml index dd8e552258bf..24281814679a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4487,4 +4487,7 @@ Device hostname + + + Sprint Tools diff --git a/res/xml/settings_headers.xml b/res/xml/settings_headers.xml index 4c0b924b60e6..d9e470f8ebd5 100644 --- a/res/xml/settings_headers.xml +++ b/res/xml/settings_headers.xml @@ -98,6 +98,15 @@ android:targetClass="com.cyanogenmod.settings.device.DeviceSettings" /> +
+ +
+
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java index 2893f854effb..40e0b3aa3d58 100644 --- a/src/com/android/settings/Settings.java +++ b/src/com/android/settings/Settings.java @@ -125,7 +125,8 @@ public class Settings extends PreferenceActivity R.id.rom_control, R.id.themes, R.id.performance, - R.id.advanced_settings + R.id.advanced_settings, + R.id.sprint_tools }; private SharedPreferences mDevelopmentPreferences; @@ -436,7 +437,10 @@ private void updateHeaderList(List
target) { } else if (id == R.id.advanced_settings) { if (!needsAdvancedSettings()) target.remove(header); - } else if (id == R.id.wifi_settings) { + } else if (id == R.id.sprint_tools) { + if (!isSprintDevice()) + target.remove(header); + } else if (id == R.id.wifi_settings) { // Remove WiFi Settings if WiFi service is not available. if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI)) { target.remove(i); @@ -556,6 +560,10 @@ private boolean needsAdvancedSettings() { return getResources().getBoolean(R.bool.has_advanced_settings); } + private boolean isSprintDevice() { + return getResources().getBoolean(R.bool.is_sprint_device); + } + private void getMetaData() { try { ActivityInfo ai = getPackageManager().getActivityInfo(getComponentName(),