Bug 1401779: Use HC+ Actvitiy.onCreateView. r=liuche
In the docs [1], the version of onCreateView we've been using states:
This implementation does nothing and is for pre-HONEYCOMB apps. Newer apps
should use onCreateView(View, String, Context, AttributeSet).
Since we no longer support pre-HC devices, this patch moves us to the new
version.
[1]: https://developer.android.com/reference/android/app/Activity.html#onCreateView(java.lang.String,%20android.content.Context,%20android.util.AttributeSet)
MozReview-Commit-ID: 4ISOLHZC4XJ
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -355,17 +355,17 @@ public class BrowserApp extends GeckoApp
// it's unlikely that StreamOverridablePageIconLayout will be used elsewhere and how messy it is to pass references
// from an object with the application lifecycle to the individual views using the cache in activity stream, we settle
// for storing it here and setting it on all new instances.
private final Set<String> mStreamIconLayoutFailedRequestCache = StreamOverridablePageIconLayout.newFailedRequestCache();
private boolean mHasResumed;
@Override
- public View onCreateView(final String name, final Context context, final AttributeSet attrs) {
+ public View onCreateView(final View parent, final String name, final Context context, final AttributeSet attrs) {
final View view;
if (BrowserToolbar.class.getName().equals(name)) {
view = BrowserToolbar.create(context, attrs);
} else if (TabsPanel.TabsLayout.class.getName().equals(name)) {
view = TabsPanel.createTabsLayout(context, attrs);
} else if (StreamOverridablePageIconLayout.class.getName().equals(name)) {
view = new StreamOverridablePageIconLayout(context, attrs, mStreamIconLayoutFailedRequestCache);
} else {