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

Commit 36b6c501 authored by Fang Yunong's avatar Fang Yunong Committed by Gerrit - the friendly Code Review server
Browse files

Settings:Change the way of email account displayed

Show only the default mailbox account with the system in list,hide others.

Change-Id: I5a86ed19c06c55032a6d4a7ddac30466885b57bd
CRs-fixed: 1071041
parent 61418a8d
Loading
Loading
Loading
Loading
+5 −45
Original line number Diff line number Diff line
@@ -1092,51 +1092,11 @@
        <item>45507</item>
    </string-array>

    <!-- Defined the hide accounts' type -->
    <string-array name="hide_account_list">
        <item>com.qualcomm.qti.RIDL</item>
        <item>com.android.localphone</item>
        <item>com.android.sim</item>
        <item>com.android.wanadoo</item>
        <item>com.android.orangemail</item>
        <item>com.android.correoorange</item>
        <item>com.android.orangemobile</item>
        <item>com.android.multibox</item>
        <item>com.android.belgacom</item>
        <item>com.android.skynet</item>
        <item>com.android.telenet</item>
        <item>com.android.scarlet</item>
        <item>com.android.euphony</item>
        <item>com.android.voo</item>
        <item>com.android.tele2</item>
        <item>com.android.versatel</item>
        <item>com.android.tiscali</item>
        <item>com.android.swing</item>
        <item>com.android.versatelasdl</item>
        <item>com.android.brutele</item>
        <item>com.android.teledisnet</item>
        <item>com.android.tvcablenet</item>
        <item>com.android.mobistar</item>
        <item>com.android.vodafone</item>
        <item>com.android.hotmail</item>
        <item>com.android.sapo</item>
        <item>com.android.netcabo</item>
        <item>com.android.clix</item>
        <item>com.android.alice</item>
        <item>com.android.yahoo</item>
        <item>com.android.outlook</item>
        <item>com.android.gmail</item>
        <item>com.android.aol</item>
        <item>com.android.free</item>
        <item>com.android.laposte</item>
        <item>com.android.sfr</item>
        <item>com.android.orange</item>
        <item>com.android.noos</item>
        <item>com.android.vodafone</item>
        <item>com.android.hotmail</item>
        <item>com.android.sapo</item>
        <item>com.android.netcabo</item>
        <item>com.android.clix</item>
    <!-- Defined the show accounts' type -->
    <string-array name="show_account_list">
        <item>com.android.exchange</item>
        <item>com.google</item>
        <item>com.android.email</item>
    </string-array>

    <string-array name="plmn_list_for_apn_disable">
+5 −5
Original line number Diff line number Diff line
@@ -794,13 +794,13 @@ public final class Utils extends com.android.settingslib.Utils {
     * Returns if need show the account with the given account type.
     */
    public static boolean showAccount(Context context, String accountType) {
        String[] hideAccounts = context.getResources().getStringArray(R.array.hide_account_list);
        if (hideAccounts == null || hideAccounts.length == 0) return true;
        String[] showAccounts = context.getResources().getStringArray(R.array.show_account_list);
        if (showAccounts == null || showAccounts.length == 0) return false;

        for (String account : hideAccounts) {
            if (account.equals(accountType)) return false;
        for (String account : showAccounts) {
            if (account.equals(accountType)) return true;
        }
        return true;
        return false;
    }

    /**