e6cc662abc
There are two major, interrelated parts to this CL: 1) Clean up the activities to reduce the use of Intents to pass information between activities; instead, we use a common SetupData structure that automatically saved/restored as necessary during the setup flow. A fair amount of code and inconsistent use of Bundle extras has been eliminated in the process. * Create SetupData structure, setters/getters, and initialization methods to simplify the preservation of state during setup flow * Remove all state/flow extras from Intents; Intents now only specify the Activity to be started, which should greatly simplify the transition to Fragments. * Remove all state/flow fields from Activities * Modify existing setup activity unit tests and confirm tests pass 2) Create AccountManager accounts for POP/IMAP email accounts to provide consistency in user experience. Also, internal flows are now identical as between account types. * Move account reconciliation from SyncManager to MailService, so that reconciliation is consistent between email and exchange accounts; move unit tests as appropriate * Add a "Sync Email" setting for POP/IMAP/EAS * Change MailService to respect the "Sync Email" setting in Settings -> Accounts & sync * Create PopImapSyncAdapterService to handle manual POP/IMAP sync as requested by SyncManager; add EmailSyncAdapterService to perform the same function for EAS * Use new PopImapAuthenticatorService to add AccountManager accounts for POP/IMAP accounts; setup appropriate stanzas in AndroidManifest and add related xml files * Update AccountSettings to use SetupData Miscellaneous other changes: * Only allow valid port numbers in incoming/outgoing setup Bug: 1712475 Change-Id: Ibdac52fb2c5578b86bf3992ddb1acd10f162391a
101 lines
4.4 KiB
XML
101 lines
4.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2008 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<ScrollView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:fillViewport="true" >
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical" >
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical" >
|
|
<TextView
|
|
android:text="@string/account_setup_options_mail_check_frequency_label"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_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="match_parent" />
|
|
<TextView
|
|
android:id="@+id/account_sync_window_label"
|
|
android:text="@string/account_setup_options_mail_window_label"
|
|
android:visibility="gone"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="?android:attr/textColorPrimary" />
|
|
<Spinner
|
|
android:id="@+id/account_sync_window"
|
|
android:visibility="gone"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent" />
|
|
<CheckBox
|
|
android:id="@+id/account_default"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent"
|
|
android:text="@string/account_setup_options_default_label" />
|
|
<CheckBox
|
|
android:id="@+id/account_notify"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent"
|
|
android:text="@string/account_setup_options_notify_label" />
|
|
<CheckBox
|
|
android:id="@+id/account_sync_contacts"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent"
|
|
android:text="@string/account_setup_options_sync_contacts_label"
|
|
android:visibility="gone" />
|
|
<CheckBox
|
|
android:id="@+id/account_sync_calendar"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent"
|
|
android:text="@string/account_setup_options_sync_calendar_label"
|
|
android:visibility="gone" />
|
|
<CheckBox
|
|
android:id="@+id/account_sync_email"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent"
|
|
android:text="@string/account_setup_options_sync_email_label" />
|
|
</LinearLayout>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="54dip"
|
|
android:background="@android:drawable/bottom_bar">
|
|
<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>
|