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

Commit 8a6d154b authored by blong's avatar blong Committed by Gerrit - the friendly Code Review server
Browse files

Fix ClassCastException for ContactsFragment

- Adjust ok button size
- Fix ClassCastException for ContactsFragment

CRs-Fixed: 1064493

Change-Id: I370ea4ed4e5877bdad699b3abfd3e29677cc5444
parent a8debdb8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -87,20 +87,20 @@
        android:layout_width="match_parent"
        android:layout_height="@dimen/multi_pick_linear_layout_for_button_height"
        android:layout_gravity="bottom"
        android:gravity="end|center_vertical"
        android:orientation="vertical" >
        android:gravity="center"
        android:orientation="horizontal" >

        <TextView
            android:id="@+id/btn_ok"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginEnd="@dimen/ok_or_clear_button_margin_end"
            android:enabled="false"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:fontFamily="sans-serif-medium"
            android:paddingRight="16dp"
            android:paddingLeft="16dp"
            android:gravity="end|center_vertical"
            android:gravity="center"
            android:text="@string/btn_ok"
            android:textSize="@dimen/ok_or_clear_button_text_size" />

+2 −2
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP
            // occur crash.
            position = getRtlPosition(position);

            if (mAreTabsHiddenInViewPager || mPickMode.isPickCall()) {
            if (mAreTabsHiddenInViewPager || !mPickMode.isPickPhone()) {
                if (mPickMode.isPickCall()) {
                    mDelCallLogFragment = new DelCallLogFragment();
                    mDelCallLogFragment.setCheckListListener(new CheckListListener());
@@ -295,7 +295,7 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP
        public Object instantiateItem(ViewGroup container, int position) {

            Fragment f = (Fragment) super.instantiateItem(container, position);
            if (mAreTabsHiddenInViewPager || mPickMode.isPickCall()) {
            if (mAreTabsHiddenInViewPager || !mPickMode.isPickPhone()) {
                if (mPickMode.isPickCall()) {
                    if (mDelCallLogFragment == null) {
                        mDelCallLogFragment = (DelCallLogFragment) f;
+4 −6
Original line number Diff line number Diff line
@@ -591,6 +591,8 @@ public class ContactsFragment extends ListFragment {

    public void startQuery() {
        Uri uri = getUriToQuery();
        if(uri == null)
            return;
        ContactListFilter filter = (ContactListFilter) mPickMode.getIntent()
                .getParcelableExtra(AccountFilterActivity.KEY_EXTRA_CONTACT_LIST_FILTER);
        if (filter != null) {
@@ -1124,19 +1126,15 @@ public class ContactsFragment extends ListFragment {

    private Uri querySimContacts(int subscription) {
        Uri uri = null;
        TelephonyManager tm = (TelephonyManager) mContext
                .getSystemService(Context.TELEPHONY_SERVICE);

        if (subscription != SimContactsConstants.SLOT1
                && subscription != SimContactsConstants.SLOT2) {
            return uri;
        }
        int subId = MoreContactUtils.getActiveSubId(mContext, subscription);
        if (subId > 0 && tm.getPhoneCount() > 1) {
        if (subId > 0) {
            uri = Uri.parse(SimContactsConstants.SIM_SUB_URI + subId);
        }
        else {
            uri = Uri.parse(SimContactsConstants.SIM_URI);
        }

        return uri;
    }