mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-11 20:15:03 -05:00
Show warning about data coming over unsafe http. Bit of restyling for detection screen ( note: still a 'hack' to get the progresscircle high enough ).
This commit is contained in:
parent
a645ea08b3
commit
0bf09401c9
@ -13,39 +13,53 @@
|
||||
android:paddingBottom="6dip"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/status_message"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<TextView android:id="@+id/autoconfig_warning"
|
||||
android:gravity="center"
|
||||
android:textColor="#C44141"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="Warning blaat blaat" />
|
||||
android:text="@string/account_setup_autoconfig_unsafe_connection" />
|
||||
|
||||
<ProgressBar android:id="@+id/autoconfig_progress"
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<!-- kind of a hack.... need to have a look at whis this is behind the buttons -->
|
||||
<ProgressBar android:id="@+id/autoconfig_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status_message"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginBottom="50dp"
|
||||
style="@android:style/Widget.ProgressBar.Large" />
|
||||
|
||||
<Button android:id="@+id/autoconfig_button_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/autoconfig_progress"
|
||||
android:text="@string/cancel_action"/>
|
||||
<LinearLayout
|
||||
android:layout_below="@id/autoconfig_progress"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<Button android:id="@+id/autoconfig_button_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel_action"/>
|
||||
|
||||
<Button android:id="@+id/autoconfig_button_next"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/autoconfig_progress"
|
||||
android:layout_toRightOf="@id/autoconfig_button_cancel"
|
||||
android:text="@string/next_action"/>
|
||||
<Button android:id="@+id/autoconfig_button_next"
|
||||
android:drawableRight="@drawable/button_indicator_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/next_action"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
@ -372,6 +372,7 @@ http://k9mail.googlecode.com/
|
||||
<string name="account_setup_confirm_incoming_title">Confirm incoming server settings</string>
|
||||
<string name="account_setup_confirm_outgoing_title">Confirm outgoing server settings</string>
|
||||
<string name="account_setup_autoconfig_info">Attempting to configure your account...</string>
|
||||
<string name="account_setup_autoconfig_unsafe_connection">Warning! This information was acquired over an unencrypted connection, be sure to verify the specifics following next!</string>
|
||||
<string name="account_setup_autoconfig_test_safe_serverside">Looking for safe server-side configuration files...</string>
|
||||
<string name="account_setup_autoconfig_test_unsafe_serverside">Looking for UNSAFE server-side configuration files...</string>
|
||||
<string name="account_setup_autoconfig_test_ispdb">Querying ISP database for configuration settings...</string>
|
||||
@ -381,7 +382,7 @@ http://k9mail.googlecode.com/
|
||||
<string name="account_setup_autoconfig_missing">not found!</string>
|
||||
<string name="account_setup_autoconfig_succesful">successful!</string>
|
||||
<string name="account_setup_autoconfig_fail">failed!</string>
|
||||
<string name="account_setup_autoconfig_forcemanual">No settings found, use manual configuration.</string>
|
||||
<string name="account_setup_autoconfig_forcemanual">No were settings found, use manual configuration to continue.</string>
|
||||
<string name="account_setup_autoconfig_trynext">Searching other places for configuration settings...</string>
|
||||
|
||||
<string name="account_setup_names_title">You\'re almost done!</string>
|
||||
|
@ -92,6 +92,7 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
||||
private boolean bDoneSearching = false;
|
||||
private boolean bFound = false;
|
||||
private boolean bParseFailed = false;
|
||||
private boolean bUnsafe = false;
|
||||
|
||||
/*
|
||||
Start the auto-configuration activity
|
||||
@ -114,7 +115,7 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
||||
setContentView(R.layout.account_setup_autoconfig);
|
||||
mMessageView = (TextView)findViewById(R.id.status_message);
|
||||
mWarningMsg = (TextView)findViewById(R.id.autoconfig_warning);
|
||||
mWarningMsg.setVisibility(View.GONE);
|
||||
mWarningMsg.setVisibility(View.INVISIBLE);
|
||||
mProgressCircle = (ProgressBar)findViewById(R.id.autoconfig_progress);
|
||||
mProgressCircle.setIndeterminate(true);
|
||||
mProgressCircle.setVisibility(View.VISIBLE);
|
||||
@ -182,8 +183,7 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
||||
setMessage(R.string.account_setup_autoconfig_succesful,false);
|
||||
|
||||
// alert user these settings might be tampered with!!! ( no https )
|
||||
if( i >= UNSAFE_URL_START )
|
||||
mWarningMsg.setVisibility(View.VISIBLE);
|
||||
if( i >= UNSAFE_URL_START ) bUnsafe = true;
|
||||
|
||||
bFound = true;
|
||||
continue;
|
||||
@ -243,7 +243,7 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On
|
||||
// 2. Nothing came up, must manually config.. + help?
|
||||
// 3. Data did not came over HTTPS this could be UNSAFE !!!!!!
|
||||
mProgressCircle.setVisibility(View.INVISIBLE);
|
||||
mWarningMsg.setVisibility(View.VISIBLE);
|
||||
if( bUnsafe /*&& !bForceManual*/ ) mWarningMsg.setVisibility(View.VISIBLE);
|
||||
mNextButton.setEnabled(true);
|
||||
if( bForceManual )
|
||||
mNextButton.setText(getString(R.string.account_setup_basics_manual_setup_action));
|
||||
|
Loading…
Reference in New Issue
Block a user