From 9195a1202483053606f43e871915a5405e955306 Mon Sep 17 00:00:00 2001 From: Martin Hibdon Date: Tue, 21 Jan 2014 16:57:06 -0800 Subject: [PATCH] Create AuthenticationFragment This is one fragment that holds all types of authentication information, e.g. password, OAuth info, and client certificates. What gets displayed depends upon the type of account it is dealing with. So far this is only used in AccountSetupIncoming, but later it can be added to other settings fragments. There are still some issues with this, but I'd like to check it in sooner than later to unblock other work. Change-Id: Iea675ad5c1727f32ca0baa270dfa793ab7109993 --- res/drawable-hdpi/ic_add_authentication.png | Bin 0 -> 254 bytes res/drawable-hdpi/ic_clear_authentication.png | Bin 0 -> 1455 bytes .../account_setup_incoming_fragment.xml | 41 +-- res/layout/authentication_fragment.xml | 180 +++++++++++ res/layout/password_selector.xml | 37 +++ res/values/attrs.xml | 1 + res/values/strings.xml | 8 + res/xml/services.xml | 2 + .../email/activity/setup/AccountSettings.java | 2 +- .../setup/AccountSetupIncomingFragment.java | 81 ++--- .../setup/AuthenticationFragment.java | 294 ++++++++++++++++++ .../email/service/EmailServiceUtils.java | 3 + 12 files changed, 562 insertions(+), 87 deletions(-) create mode 100644 res/drawable-hdpi/ic_add_authentication.png create mode 100644 res/drawable-hdpi/ic_clear_authentication.png create mode 100644 res/layout/authentication_fragment.xml create mode 100644 res/layout/password_selector.xml create mode 100644 src/com/android/email/activity/setup/AuthenticationFragment.java diff --git a/res/drawable-hdpi/ic_add_authentication.png b/res/drawable-hdpi/ic_add_authentication.png new file mode 100644 index 0000000000000000000000000000000000000000..f3fde9772fdd5173ec96d0ab224325059b6ad91f GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1SD0tpLGH$#^NA%Cx&(BWL^R}oCO|{#S9GG z!XV7ZFl&wkP>{XE)7O>#9wVQyl;Z8`x(h%d$r9Iy66gHf+|;}h2Ir#G#FEq$h4Rdj z35D`1AX{jM##Tzy_sr(sPu|{Z?g_oHL)r z4pfN@78omd3IVn6nDC}|cfD41npxdfrqj(ak*}soICTC!fvgtFzQ^qIvt6kC==Fnp OKq8*5elF{r5}E+-LPR|P literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/ic_clear_authentication.png b/res/drawable-hdpi/ic_clear_authentication.png new file mode 100644 index 0000000000000000000000000000000000000000..800eca40eb2ac2c265aec9aaf833f9bf8aac649a GIT binary patch literal 1455 zcmV;g1yK5lP)00001b5ch_0Itp) z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RZ0S*%!A&nu~RsaA18FWQhbVF}# zZDnqB07G(RVRU6=Aa`kWXdp*PO;A^X4i^9b1sq94K~!ko?V3$UGF=qMbu=rhN6RQs zN-HWWB&ilfkWwuwA%~XHVnAF)aAyeNjsdjDbK*Q5O*ueW5}S za{D4M(0La^Jml-lb!K`h@N9MNJ->VB-1|Rg4xc1R-fuR9_scB{kOjyB{BjdQ{_pYe z@%HvM5D47e-SK!lrBbQYYE>$gR4V;u0usUi0631LD5_Gal255rDilR=90vf9-)cNa z@3mTODttpj!|Lkl_cG7}`2BtqMbm9yS67$EB2H-rnB+TmYp~DH4e&{_y<#ytA|OZEq1w5dZn} zhkB6G($d}C-B>L4Lyytc)>hhukjZ3=i;Iy+gqa^VH#azr>-GBNXnMUK$MKt+8x8ZfoA{!EG;eN z=jW#zkd^@o;Qs#JY&OHkRa;vdEdv06APA$;C=^oZF}+^za=F+7yuQ9}ZEY167Q!^aDINiva-_H*eDi@`FuX@PBgoX$R3sAF+}y0MuV--2a&roOvWtrgtJMk_(+GkT6cjL1 z2|YbM+}s1H7K_DpcXz9+tG`a;3=R&Sot<%W6Q^U?-`_7UFX!BKsZ@$#SU4Q!Mhj6h ztgWq;l$3DgdQMJ`TCJX$nF)nLoQXMVi$JsK0qPi-n3%{& z7o?_pb8~ZS3Nx$#uCA`sYBe+0^YZe#y1Lkxm6!vB!(j}=;N{)lrdF%1R;$P3VP6#E zG4?*A4B?YCH8nY%&O{>dFLL5^YtR0+nxCI%oI^7Q002x+PfH{c_Gdqz&zDFf{r&xu zlanVWC(K|n25>kWN~MzH;uL~ZR#qAe28Y9uX;fqeaB*?b*4CD3MgosfS68>Nu#gc$ z1^@&>eAI1djkXp>@u0PZ?j;GMNk}9%ukI zH#cQ68N8Yw8yow3%0wdJa=E&@yO}ZQ^?JYG&l~^%pwsE##R7_=S65e`21z6m*VotM z+96t2V$|;}fvPH@QmKqaW3tC1waLI_GQr0pbz*>` zs8*|G*h%tx+dPuSr|nw&xs5i-tSH-dnFYuKWC5}OS%BYc{{c@9GaP{-@{a%j002ov JPDHLkV1mfHo|XUr literal 0 HcmV?d00001 diff --git a/res/layout/account_setup_incoming_fragment.xml b/res/layout/account_setup_incoming_fragment.xml index 4e64a5b15..07540563d 100644 --- a/res/layout/account_setup_incoming_fragment.xml +++ b/res/layout/account_setup_incoming_fragment.xml @@ -20,6 +20,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" > + - - + android:layout_height="wrap_content"/> + - + - - - - diff --git a/res/layout/authentication_fragment.xml b/res/layout/authentication_fragment.xml new file mode 100644 index 000000000..3ae2915fe --- /dev/null +++ b/res/layout/authentication_fragment.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/layout/password_selector.xml b/res/layout/password_selector.xml new file mode 100644 index 000000000..b402f10e9 --- /dev/null +++ b/res/layout/password_selector.xml @@ -0,0 +1,37 @@ + + + + + + + + + diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 322934c27..bd198dfec 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -30,6 +30,7 @@ + diff --git a/res/values/strings.xml b/res/values/strings.xml index c5dda07c4..6034ebc6d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -202,6 +202,14 @@ Email address Password + + Signed in with %s + + Authentication + + Add authentication + + Clear authentication Manual setup