mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 721354 - Remove onFinishInflate handling from AboutHomeContent (r=blassey)
This commit is contained in:
parent
cd502e16a1
commit
8f355cae4b
@ -114,14 +114,7 @@ public class AboutHomeContent extends ScrollView {
|
||||
public AboutHomeContent(Context context) {
|
||||
super(context);
|
||||
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
synchronized (this) {
|
||||
if (mTopSitesGrid != null && mAddonsLayout != null && mLastTabsLayout != null)
|
||||
return;
|
||||
mInflater.inflate(R.layout.abouthome_content, this);
|
||||
|
||||
mTopSitesGrid = (GridView)findViewById(R.id.top_sites_grid);
|
||||
mTopSitesGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@ -176,7 +169,6 @@ public class AboutHomeContent extends ScrollView {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void setTopSitesVisibility(boolean visible, boolean hasTopSites) {
|
||||
int visibility = visible ? View.VISIBLE : View.GONE;
|
||||
@ -250,8 +242,7 @@ public class AboutHomeContent extends ScrollView {
|
||||
}
|
||||
|
||||
void init(final Activity activity) {
|
||||
mInflater.inflate(R.layout.abouthome_content, this);
|
||||
final Runnable generateCursorsRunnable = new Runnable() {
|
||||
GeckoAppShell.getHandler().post(new Runnable() {
|
||||
public void run() {
|
||||
if (mCursor != null)
|
||||
activity.stopManagingCursor(mCursor);
|
||||
@ -294,14 +285,7 @@ public class AboutHomeContent extends ScrollView {
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Runnable finishInflateRunnable = new Runnable() {
|
||||
public void run() {
|
||||
onFinishInflate();
|
||||
GeckoAppShell.getHandler().post(generateCursorsRunnable);
|
||||
}
|
||||
};
|
||||
GeckoApp.mAppContext.mMainHandler.post(finishInflateRunnable);
|
||||
});
|
||||
}
|
||||
|
||||
public void setUriLoadCallback(UriLoadCallback uriLoadCallback) {
|
||||
|
Loading…
Reference in New Issue
Block a user