backout b9c914cdbfd1 for bustage

This commit is contained in:
Wes Johnston 2013-07-09 14:10:27 -07:00
parent 3176ea60e7
commit 5e607040c9

View File

@ -124,11 +124,6 @@ public class TopSitesView extends GridView {
// We can assume that the adapter count and view count are the same in this case because our grid view
// force all items to be visible all the time
View view = getChildAt(info.position);
// The grid view might get temporarily out of sync with the
// adapter refreshes (e.g. on device rotation)
if (view == null) {
return;
}
TopSitesViewHolder holder = (TopSitesViewHolder) view.getTag();
if (TextUtils.isEmpty(holder.getUrl())) {
menu.findItem(R.id.abouthome_open_new_tab).setVisible(false);
@ -293,9 +288,8 @@ public class TopSitesView extends GridView {
// The grid view might get temporarily out of sync with the
// adapter refreshes (e.g. on device rotation)
if (view == null) {
if (view == null)
continue;
}
TopSitesViewHolder holder = (TopSitesViewHolder)view.getTag();
final String url = holder.getUrl();
@ -516,11 +510,6 @@ public class TopSitesView extends GridView {
private void clearThumbnailsWithUrl(final String url) {
for (int i = 0; i < mTopSitesAdapter.getCount(); i++) {
final View view = getChildAt(i);
// The grid view might get temporarily out of sync with the
// adapter refreshes (e.g. on device rotation)
if (view == null) {
continue;
}
final TopSitesViewHolder holder = (TopSitesViewHolder) view.getTag();
if (holder.getUrl().equals(url)) {
@ -561,11 +550,6 @@ public class TopSitesView extends GridView {
final int position = info.position;
final View v = getChildAt(position);
// The grid view might get temporarily out of sync with the
// adapter refreshes (e.g. on device rotation)
if (view == null) {
return;
}
final TopSitesViewHolder holder = (TopSitesViewHolder) v.getTag();
final String url = holder.getUrl();
// Quickly update the view so that there isn't as much lag between the request and response
@ -584,11 +568,6 @@ public class TopSitesView extends GridView {
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
final int position = info.position;
View v = getChildAt(position);
// The grid view might get temporarily out of sync with the
// adapter refreshes (e.g. on device rotation)
if (view == null) {
return;
}
final TopSitesViewHolder holder = (TopSitesViewHolder) v.getTag();
holder.setPinned(true);
@ -620,11 +599,6 @@ public class TopSitesView extends GridView {
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
int position = info.position;
View v = getChildAt(position);
// The grid view might get temporarily out of sync with the
// adapter refreshes (e.g. on device rotation)
if (view == null) {
return;
}
TopSitesViewHolder holder = (TopSitesViewHolder) v.getTag();
// Decode "user-entered" URLs before showing them to the user to edit.
@ -647,11 +621,6 @@ public class TopSitesView extends GridView {
return;
final View v = getChildAt(position);
// The grid view might get temporarily out of sync with the
// adapter refreshes (e.g. on device rotation)
if (view == null) {
return;
}
final TopSitesViewHolder holder = (TopSitesViewHolder) v.getTag();
String title = data.getStringExtra(AwesomeBar.TITLE_KEY);