-
Notifications
You must be signed in to change notification settings - Fork 111
Move to new version of Activity.onCreateView #1247
Comments
I'll try my best to solve this! |
@unicorn-io Sorry I missed you on IRC! The code is in MainActivity: https://searchfox.org/mozilla-mobile/rev/5a56c1a6fc20f4eae318d378e717244a7e136824/firefox-tv/app/src/main/java/org/mozilla/tv/firefox/MainActivity.kt#206 For future reference, you should be able to find it with plain text search in Android Studio, on the command line, GitHub code search, etc. |
I have moved the version am I supposed to apply for pull request? |
@unicorn-io Yes, please open a pull request and (if GitHub lets you) flag me for review! |
@mcomella i have flagged you for review |
…eView The old implementation caused obscure bugs. Now we have moved to the Latest version of Activity.onCreateView giving better compatibility
…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
…eView The old implementation caused obscure bugs. Now we have moved to the Latest version of Activity.onCreateView giving better compatibility, as the latest version required new argument in the argument list. Google specifies that the argument may be null.
@mcomella please review the changes |
The old implementation caused obscure bugs. Now we have moved to the Latest version of Activity.onCreateView giving better compatibility, as the latest version required new argument in the argument list. Google specifies that the argument may be null.
Closed by #2295. |
….onCreateView" This reverts commit 7789714. This caused a crash upon startup. We will work out why after fixing master
This reverts commit 7789714. This caused a crash upon startup. We will work out why after fixing master
This created a start-up crash on master and was backed out in bdc868d |
I believe the issue is that the platform type was described as nonnull, while the activity will pass a null |
With the backed out PR, I get the following stack trace: Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter parent
at org.mozilla.tv.firefox.MainActivity.onCreateView(Unknown Source:33)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:780)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.android.internal.policy.DecorView.onResourcesLoaded(DecorView.java:1901)
at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2579)
at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2652)
at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2066)
at org.mozilla.tv.firefox.MainActivity.onCreate(MainActivity.kt:67) @unicorn-io We get a crash on startup and had to back out your changes: did you see this locally when you wrote the patch? Can you try to fix the issue and open a new PR? |
I will try to fix it. |
this seems to be the issue as per my checks |
…eView The old implementation caused obscure bugs. Now we have moved to the Latest version of Activity.onCreateView giving better compatibility, as the latest version required new argument in the argument list. Google specifies that the argument may be null.
…teView The old implementation caused obscure bugs. Now we have moved to the latest version of Activity.onCreateView giving better compatibility. The new parameter was specified nullable as google specifies that the argument may be null.
The old implementation caused obscure bugs. Now we have moved to the latest version of Activity.onCreateView giving better compatibility. The new parameter was specified nullable as google specifies that the argument may be null.
Merged in #2356 |
i.e. https://developer.android.com/reference/android/app/Activity.html#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet)
The old implementation caused obscure crash bugs on fennec (see bugs duped to this) so we should move to the new one.
The text was updated successfully, but these errors were encountered: