Bug 1401779: Use HC+ Actvitiy.onCreateView. r=liuche
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 20 Sep 2017 16:30:03 -0700
changeset 431638 22f5e644534bfc2296e5d76785ad511436456269
parent 431637 7bb527a1748fad509712d02775c2637c2e3172aa
child 431639 1bf51e25a57b34f579979a1f5dea8cf013a9ce21
push id7785
push userryanvm@gmail.com
push dateThu, 21 Sep 2017 13:39:55 +0000
treeherdermozilla-beta@06d4034a8a03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs1401779
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -348,17 +348,17 @@ public class BrowserApp extends GeckoApp
     ));
 
     @NonNull
     private SearchEngineManager mSearchEngineManager; // Contains reference to Context - DO NOT LEAK!
 
     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 {
             view = super.onCreateView(name, context, attrs);
         }