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

Commit bf71177f authored by Wenyi Wang's avatar Wenyi Wang
Browse files

Apply correct styles to account filter activities on tablets

The modified styles should work well in Dialer.

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: I425c5610a5df15c1a634c5d7f578422c5cefc9ce
parent e07607ab
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);