Skip to content

Conversation

avently
Copy link
Contributor

@avently avently commented Aug 3, 2020

What is it?

  • Bug fix (user facing)
  • Feature (user facing)
  • Code base improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

For some reason supported calls in API 19 (https://developer.android.com/reference/java/util/Objects#requireNonNull(T)) actually unsupported in API 19 (see #4060) even when the same code works on other devices with API 19 :). So I just deleted these calls.

Fixes the following issues

fixes #4060

Agreement

@ghost
Copy link

ghost commented Aug 3, 2020

Thanks for watch my issues and find a fix very fast.

@wb9688
Copy link
Contributor

wb9688 commented Aug 3, 2020

@avently: It's just @domiuns' custom ROM that's weird. Try making a release build and it should work fine on his device. I think that the requireNonNull calls will only change the error message in the crash report when it happens to be null, so this PR could be safely merged, if we want that.

@avently
Copy link
Contributor Author

avently commented Aug 3, 2020

@domiuns please, try both apks inside the archive. Do all/none of them crashes?

apks-with-and-without-fix.zip

@wb9688 actually these check are unneeded. IDEA highlighed that some calls can be null but in that context they couldn't be null. So requireNonNull just highlights this thing to compiler and to a developer.

@ghost
Copy link

ghost commented Aug 3, 2020

@avently i have test all of two apk.
Apk with no fix

Exception

  • User Action: ui error
  • Request: App crash, UI failure
  • Content Country: IT
  • Content Language: it-IT
  • App Language: it_IT
  • Service: none
  • Version: 0.19.8
  • OS: Linux Android 4.4.4 - 19
Crash log

java.lang.NoClassDefFoundError: java.util.Objects
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.openMainPlayer(VideoDetailFragment.java:1180)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.lambda$dAtumQzji3VV2MwKInn8YF6nNs8(VideoDetailFragment.java)
	at org.schabi.newpipe.fragments.detail.-$$Lambda$VideoDetailFragment$dAtumQzji3VV2MwKInn8YF6nNs8.run(lambda)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.replaceQueueIfUserConfirms(VideoDetailFragment.java:2101)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.openVideoPlayer(VideoDetailFragment.java:1148)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.access$1400(VideoDetailFragment.java:133)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment$1.onServiceConnected(VideoDetailFragment.java:311)
	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1131)
	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1148)
	at android.os.Handler.handleCallback(Handler.java:725)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:153)
	at android.app.ActivityThread.main(ActivityThread.java:5297)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
	at dalvik.system.NativeStart.main(Native Method)


Apk with fix
-no problem i have found

Is normal this?
Music notification when video is in play
IMG_20200803_143001
IMG_20200803_143032

@wb9688
Copy link
Contributor

wb9688 commented Aug 3, 2020

@wb9688 actually these check are unneeded. IDEA highlighed that some calls can be null but in that context they couldn't be null. So requireNonNull just highlights this thing to compiler and to a developer.

@avently: I know what it does ;)

@wb9688
Copy link
Contributor

wb9688 commented Aug 3, 2020

@domiuns: Yes, that's normal with the new unified player

@TobiGr TobiGr merged commit 773316c into TeamNewPipe:dev Aug 3, 2020
This was referenced Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expandable player with unified UI ANDROID 4.4.4 crash normale player

3 participants