Skip to content

Commit

Permalink
Issue mozilla-mobile#1247: Use the latest version of Activity.onCreat…
Browse files Browse the repository at this point in the history
…eView

The old implementation caused obscure bugs. Now we have moved to the Latest version of Activity.onCreateView giving better compatibility by adding a new argument in the argument list. Google specifies that the argument may be null
  • Loading branch information
unicorn-io committed May 21, 2019
1 parent a1b01e8 commit f515f9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/org/mozilla/tv/firefox/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ class MainActivity : LocaleAwareAppCompatActivity(), OnUrlEnteredListener, Media
super.onDestroy()
}

override fun onCreateView(name: String, context: Context, attrs: AttributeSet): View? {
override fun onCreateView(parent: View, name: String, context: Context, attrs: AttributeSet): View? {
return if (name == EngineView::class.java.name) {
context.serviceLocator.engineViewCache.getEngineView(context, attrs) {
setupForApp()
}
} else super.onCreateView(name, context, attrs)
} else super.onCreateView(parent, name, context, attrs)
}

override fun onBackPressed() {
Expand Down

0 comments on commit f515f9f

Please sign in to comment.