mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-03 06:22:17 -05:00
Fixed an authentication issue with WebDav support that caused by the last update. Added support for scrolling on 2 of the screens in the account setup process to allow the full steps to be done in landscape mode. There are some graphical regressions in portrait mode from it that aren't resolved yet.
This commit is contained in:
parent
c544596d8f
commit
a4a07ebe19
@ -1,60 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:text="@string/account_setup_options_mail_check_frequency_label"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbarStyle="outsideInset">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<Spinner
|
||||
android:id="@+id/account_check_frequency"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
<TextView
|
||||
android:text="@string/account_setup_options_mail_display_count_label"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<Spinner
|
||||
android:id="@+id/account_display_count"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
<CheckBox
|
||||
android:id="@+id/account_default"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/account_setup_options_default_label" />
|
||||
<CheckBox
|
||||
android:id="@+id/account_notify"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/account_setup_options_notify_label" />
|
||||
<CheckBox
|
||||
android:id="@+id/account_notify_ringtone"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/account_setup_options_notify_ringtone_label" />
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1" />
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="54px"
|
||||
android:background="@drawable/bottombar_565">
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
android:text="@string/next_action"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:text="@string/account_setup_options_mail_check_frequency_label"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:minWidth="@dimen/button_minWidth"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<Spinner
|
||||
android:id="@+id/account_check_frequency"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
<TextView
|
||||
android:text="@string/account_setup_options_mail_display_count_label"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<Spinner
|
||||
android:id="@+id/account_display_count"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
<CheckBox
|
||||
android:id="@+id/account_default"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/account_setup_options_default_label" />
|
||||
<CheckBox
|
||||
android:id="@+id/account_notify"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/account_setup_options_notify_label" />
|
||||
<CheckBox
|
||||
android:id="@+id/account_notify_ringtone"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:text="@string/account_setup_options_notify_ringtone_label" />
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1" />
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="bottom|right"
|
||||
android:background="@drawable/bottombar_565">
|
||||
<Button
|
||||
android:id="@+id/next"
|
||||
android:text="@string/next_action"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:minWidth="@dimen/button_minWidth"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -8,34 +8,41 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/empty"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scrollbarStyle="outsideInset">
|
||||
<LinearLayout
|
||||
android:id="@+id/empty"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/accounts_welcome"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1" />
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="54px"
|
||||
android:background="@drawable/bottombar_565">
|
||||
<Button
|
||||
android:id="@+id/add_new_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:minWidth="@dimen/button_minWidth"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/next_action"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
android:textSize="14sp"
|
||||
android:text="@string/accounts_welcome"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="1" />
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="54px"
|
||||
android:gravity="bottom|right"
|
||||
android:background="@drawable/bottombar_565">
|
||||
<Button
|
||||
android:id="@+id/add_new_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:minWidth="@dimen/button_minWidth"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/next_action"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
|
@ -442,18 +442,28 @@ public class WebDavStore extends Store {
|
||||
String url) throws IOException {
|
||||
String authPath = "/exchweb/bin/auth/owaauth.dll";
|
||||
CookieStore cookies = null;
|
||||
String[] urlParts = url.split("/");
|
||||
String finalUrl = "";
|
||||
|
||||
for (int i = 0; i <= 2; i++) {
|
||||
if (i != 0) {
|
||||
finalUrl = finalUrl + "/" + urlParts[i];
|
||||
} else {
|
||||
finalUrl = urlParts[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* Browser Client */
|
||||
DefaultHttpClient httpclient = new DefaultHttpClient();
|
||||
|
||||
/* Post Method */
|
||||
HttpPost httppost = new HttpPost(url + authPath);
|
||||
HttpPost httppost = new HttpPost(finalUrl + authPath);
|
||||
|
||||
/** Build the POST data to use */
|
||||
ArrayList<BasicNameValuePair> pairs = new ArrayList();
|
||||
pairs.add(new BasicNameValuePair("username", username));
|
||||
pairs.add(new BasicNameValuePair("password", password));
|
||||
pairs.add(new BasicNameValuePair("destination", url + "/Exchange/"));
|
||||
pairs.add(new BasicNameValuePair("destination", finalUrl + "/Exchange/"));
|
||||
pairs.add(new BasicNameValuePair("flags", "0"));
|
||||
pairs.add(new BasicNameValuePair("SubmitCreds", "Log+On"));
|
||||
pairs.add(new BasicNameValuePair("forcedownlevel", "0"));
|
||||
|
Loading…
Reference in New Issue
Block a user