Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4a07ebe authored by Matthew Brace's avatar Matthew Brace
Browse files

Fixed an authentication issue with WebDav support that caused by the last...

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.

parent c544596d
Loading
Loading
Loading
Loading
+61 −54
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:scrollbarStyle="outsideInset">
    <LinearLayout
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_width="fill_parent"
@@ -41,11 +46,12 @@
            android:text="@string/account_setup_options_notify_ringtone_label" />
            android:text="@string/account_setup_options_notify_ringtone_label" />
        <View
        <View
            android:layout_width="fill_parent"
            android:layout_width="fill_parent"
        android:layout_height="0px"
            android:layout_height="fill_parent"
            android:layout_weight="1" />
            android:layout_weight="1" />
        <RelativeLayout
        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_width="fill_parent"
        android:layout_height="54px"
            android:layout_height="fill_parent"
            android:gravity="bottom|right"
            android:background="@drawable/bottombar_565">
            android:background="@drawable/bottombar_565">
            <Button
            <Button
                android:id="@+id/next"
                android:id="@+id/next"
@@ -58,3 +64,4 @@
                android:layout_centerVertical="true" />
                android:layout_centerVertical="true" />
        </RelativeLayout>
        </RelativeLayout>
    </LinearLayout>
    </LinearLayout>
</ScrollView>
+35 −28
Original line number Original line Diff line number Diff line
@@ -8,6 +8,11 @@
        android:layout_width="fill_parent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_height="fill_parent"
        />
        />
    <ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:scrollbarStyle="outsideInset">
        <LinearLayout
        <LinearLayout
            android:id="@+id/empty"
            android:id="@+id/empty"
            android:layout_width="fill_parent"
            android:layout_width="fill_parent"
@@ -26,6 +31,7 @@
            <RelativeLayout
            <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_width="fill_parent"
                android:layout_height="54px"
                android:layout_height="54px"
                android:gravity="bottom|right"
                android:background="@drawable/bottombar_565">
                android:background="@drawable/bottombar_565">
                <Button
                <Button
                    android:id="@+id/add_new_account"
                    android:id="@+id/add_new_account"
@@ -38,4 +44,5 @@
                    android:layout_centerVertical="true" />
                    android:layout_centerVertical="true" />
            </RelativeLayout>
            </RelativeLayout>
        </LinearLayout>
        </LinearLayout>
    </ScrollView>
</FrameLayout>
</FrameLayout>
+12 −2
Original line number Original line Diff line number Diff line
@@ -442,18 +442,28 @@ public class WebDavStore extends Store {
                                        String url) throws IOException {
                                        String url) throws IOException {
        String authPath = "/exchweb/bin/auth/owaauth.dll";
        String authPath = "/exchweb/bin/auth/owaauth.dll";
        CookieStore cookies = null;
        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 */
        /* Browser Client */
        DefaultHttpClient httpclient = new DefaultHttpClient();
        DefaultHttpClient httpclient = new DefaultHttpClient();


        /* Post Method */
        /* Post Method */
        HttpPost httppost = new HttpPost(url + authPath);
        HttpPost httppost = new HttpPost(finalUrl + authPath);


        /** Build the POST data to use */
        /** Build the POST data to use */
        ArrayList<BasicNameValuePair> pairs = new ArrayList();
        ArrayList<BasicNameValuePair> pairs = new ArrayList();
        pairs.add(new BasicNameValuePair("username", username));
        pairs.add(new BasicNameValuePair("username", username));
        pairs.add(new BasicNameValuePair("password", password));
        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("flags", "0"));
        pairs.add(new BasicNameValuePair("SubmitCreds", "Log+On"));
        pairs.add(new BasicNameValuePair("SubmitCreds", "Log+On"));
        pairs.add(new BasicNameValuePair("forcedownlevel", "0"));
        pairs.add(new BasicNameValuePair("forcedownlevel", "0"));