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

Commit 6e1e38e2 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 26177 into eclair

* changes:
  Fix bug 2102658
parents c898063d 66210455
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:orientation="horizontal"
    android:paddingLeft="9dip"
    android:paddingRight="5dip"
    android:gravity="center_vertical"
>

@@ -87,17 +86,16 @@
    <View android:id="@+id/divider"
        android:layout_width="1dip"
        android:layout_height="fill_parent"
        android:layout_marginRight="11dip"
        android:background="@drawable/divider_vertical_dark"
    />

    <ImageView android:id="@+id/secondary_action_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dip"
        android:layout_marginRight="7dip"
        android:layout_width="64dip"
        android:layout_height="fill_parent"
        android:layout_centerVertical="true"
        android:gravity="center"
        android:scaleType="centerInside"
        android:scaleType="center"
        android:background="@android:drawable/list_selector_background"
    />

</LinearLayout>
+16 −18
Original line number Diff line number Diff line
@@ -231,8 +231,6 @@ public class ViewContactActivity extends Activity

        //TODO Read this value from a preference
        mShowSmsLinksForAllPhones = true;

        startEntityQuery();
    }

    @Override
@@ -306,10 +304,6 @@ public class ViewContactActivity extends Activity
                    ContactsSource.LEVEL_SUMMARY);
            addTab(rawContactId, ContactsUtils.createTabIndicatorView(mTabWidget.getTabParent(), source));
        }

        selectInitialTab();
        mTabWidget.setVisibility(View.VISIBLE);
        mTabWidget.postInvalidate();
    }

    /**
@@ -342,6 +336,8 @@ public class ViewContactActivity extends Activity

        mTabWidget.setCurrentTab(selectedTabIndex);
        onTabSelectionChanged(selectedTabIndex, false);
        mTabWidget.setVisibility(View.VISIBLE);
        mTabWidget.postInvalidate();
    }

    private void addAllTab() {
@@ -352,10 +348,12 @@ public class ViewContactActivity extends Activity
    }

    public void onTabSelectionChanged(int tabIndex, boolean clicked) {
        long rawContactId = getTabRawContactId(tabIndex);
        Long rawContactId = getTabRawContactId(tabIndex);
        if (rawContactId != null) {
            mSelectedRawContactId = rawContactId;
            bindData();
        }
    }

    /**
     * Return the RawContact id associated with the tab at an index.
@@ -363,7 +361,7 @@ public class ViewContactActivity extends Activity
     * @param index The index of the tab in question.
     * @return The contactId associated with the tab at the specified index.
     */
    protected long getTabRawContactId(int index) {
    protected Long getTabRawContactId(int index) {
        return mTabRawContactIdMap.get(index);
    }

@@ -392,7 +390,7 @@ public class ViewContactActivity extends Activity
                clearCurrentTabs();
                mEntities = readEntities(iterator);
                bindTabs();
                bindData();
                selectInitialTab();
            }
        } finally {
            if (iterator != null) {
@@ -851,6 +849,13 @@ public class ViewContactActivity extends Activity
                // TODO: entry.contactId should be renamed to entry.rawContactId
                long contactId = entValues.getAsLong(RawContacts._ID);

                // This performs the tab filtering
                if (mSelectedRawContactId != null
                        && mSelectedRawContactId != contactId
                        && mSelectedRawContactId != ALL_CONTACTS_ID) {
                    continue;
                }

                for (NamedContentValues subValue : entity.getSubValues()) {
                    ViewEntry entry = new ViewEntry();

@@ -896,13 +901,6 @@ public class ViewContactActivity extends Activity
                        mRawContactIds.add(entry.contactId);
                    }

                    // This performs the tab filtering
                    if (mSelectedRawContactId != null
                            && mSelectedRawContactId != entry.contactId
                            && mSelectedRawContactId != ALL_CONTACTS_ID) {
                        continue;
                    }

                    if (CommonDataKinds.Phone.CONTENT_ITEM_TYPE.equals(mimetype)
                            || CommonDataKinds.Email.CONTENT_ITEM_TYPE.equals(mimetype)
                            || CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE.equals(mimetype)