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

Commit 92f095a2 authored by cketti's avatar cketti
Browse files

Remove Push setting from 'AccountSetupOptions'

parent 1303430e
Loading
Loading
Loading
Loading
+1 −21
Original line number Diff line number Diff line
@@ -13,11 +13,9 @@ import android.widget.Spinner;

import com.fsck.k9.Account;
import com.fsck.k9.Core;
import com.fsck.k9.DI;
import com.fsck.k9.Preferences;
import com.fsck.k9.ui.R;
import com.fsck.k9.activity.K9Activity;
import com.fsck.k9.controller.MessagingController;


public class AccountSetupOptions extends K9Activity implements OnClickListener {
@@ -25,8 +23,6 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {

    private static final String EXTRA_MAKE_DEFAULT = "makeDefault";

    private final MessagingController messagingController = DI.get(MessagingController.class);

    private Spinner mCheckFrequencyView;

    private Spinner mDisplayCountView;
@@ -34,7 +30,6 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {

    private CheckBox mNotifyView;
    private CheckBox mNotifySyncView;
    private CheckBox mPushEnable;

    private Account mAccount;

@@ -54,7 +49,6 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
        mDisplayCountView = findViewById(R.id.account_display_count);
        mNotifyView = findViewById(R.id.account_notify);
        mNotifySyncView = findViewById(R.id.account_notify_sync);
        mPushEnable = findViewById(R.id.account_enable_push);

        findViewById(R.id.next).setOnClickListener(this);

@@ -110,16 +104,6 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
                                            .getAutomaticCheckIntervalMinutes());
        SpinnerOption.setSpinnerOptionValue(mDisplayCountView, mAccount
                                            .getDisplayCount());


        boolean isPushCapable = messagingController.isPushCapable(mAccount);
        if (!isPushCapable) {
            mPushEnable.setVisibility(View.GONE);
        } else {
            mPushEnable.setChecked(true);
        }


    }

    private void onDone() {
@@ -131,11 +115,7 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
        mAccount.setDisplayCount((Integer)((SpinnerOption)mDisplayCountView
                                           .getSelectedItem()).value);

        if (mPushEnable.isChecked()) {
            mAccount.setFolderPushMode(Account.FolderMode.FIRST_CLASS);
        } else {
        mAccount.setFolderPushMode(Account.FolderMode.NONE);
        }

        Preferences.getPreferences(getApplicationContext()).saveAccount(mAccount);
        if (mAccount.equals(Preferences.getPreferences(this).getDefaultAccount()) ||
+0 −9
Original line number Diff line number Diff line
@@ -35,15 +35,6 @@
                android:layout_height="wrap_content"
                android:contentDescription="@string/account_setup_options_mail_check_frequency_label" />

            <CheckBox
                android:id="@+id/account_enable_push"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:summary="@string/account_setup_options_enable_push_summary"
                android:text="@string/account_setup_options_enable_push_label"
                android:textColor="?android:attr/textColorPrimary"
                />

            <TextView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"