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

Commit 89999f4d authored by Wenyi Wang's avatar Wenyi Wang
Browse files

Apply correct styles to account filter activities on tablets

We use dialtacts_theme_color defined in ContactsCommon to ensure that
both Contacts and Dialer work well.

In addition, ag/808228 checked the "Customize" filter on click to enable
Talkback. We may need to uncheck it when user presses "Cancel" on
CustomContactListFilterActivity, to avoid 2 filters being checked at the
same time. This error doesn't occur on phones, and occurs only on tablets.

Bug: 26439461
Bug: 25629359
Change-Id: Idc31eb1abd55fd2468c85a6671eb6317092d7017
parent 0597f6c4
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -63,6 +63,10 @@ public class AccountFilterActivity extends AppCompatActivity

    private ContactListFilter mCurrentFilter;

    private ContactListFilterView mCustomFilterView; // the "Customize" filter

    private boolean mIsCustomFilterViewSelected;

    @Override
    protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);
@@ -170,6 +174,8 @@ public class AccountFilterActivity extends AppCompatActivity
        final ContactListFilter filter = (ContactListFilter) view.getTag();
        if (filter == null) return; // Just in case
        if (filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) {
            mCustomFilterView = listFilterView;
            mIsCustomFilterViewSelected = listFilterView.isChecked();
            final Intent intent = new Intent(this,
                    CustomContactListFilterActivity.class);
            listFilterView.setActivated(true);
@@ -190,6 +196,12 @@ public class AccountFilterActivity extends AppCompatActivity

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (resultCode == AppCompatActivity.RESULT_CANCELED && mCustomFilterView != null &&
                !mIsCustomFilterViewSelected) {
            mCustomFilterView.setActivated(false);
            return;
        }

        if (resultCode != AppCompatActivity.RESULT_OK) {
            return;
        }
+4 −0
Original line number Diff line number Diff line
@@ -78,6 +78,10 @@ public class ContactListFilterView extends LinearLayout {
        setContentDescription(generateContentDescription());
    }

    public boolean isChecked() {
        return mRadioButton.isChecked();
    }

    public void bindView(AccountTypeManager accountTypes) {
        if (mAccountType == null) {
            mIcon = (ImageView) findViewById(R.id.icon);