Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically get package name #5221

Merged
merged 1 commit into from
Jan 1, 2021
Merged

Dynamically get package name #5221

merged 1 commit into from
Jan 1, 2021

Conversation

B0pol
Copy link
Member

@B0pol B0pol commented Dec 19, 2020

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • remove usage of harcoded package name org.schabi.newpipe
  • it fixes issues with forks or debug builds, e.g. when you open two newpipe apps (with debug or fork apps), close one notification, it closes all newpipe notifications

Fixes the following issue(s)

APK testing

Due diligence

@TobiGr
Copy link
Member

TobiGr commented Dec 19, 2020

There are two more references in SubscriptionsImportService. However, I am not sure if we should change that.

tobias@tobias-mint-3:~/Dokumente/NewPipe/NewPipe/app/src/main/java$ grep -irn '"org.schabi.newpipe'
org/schabi/newpipe/local/subscription/services/SubscriptionsImportService.java:69:    public static final String IMPORT_COMPLETE_ACTION = "org.schabi.newpipe.local.subscription"
org/schabi/newpipe/local/subscription/services/SubscriptionsExportService.java:53:    public static final String EXPORT_COMPLETE_ACTION = "org.schabi.newpipe.local.subscription"
org/schabi/newpipe/local/feed/service/FeedLoadService.kt:70:        private const val ACTION_CANCEL = "org.schabi.newpipe.local.feed.service.FeedLoadService.CANCEL"
org/schabi/newpipe/player/MainPlayer.java:67:            = "org.schabi.newpipe.player.MainPlayer.CLOSE";
org/schabi/newpipe/player/MainPlayer.java:69:            = "org.schabi.newpipe.player.MainPlayer.PLAY_PAUSE";
org/schabi/newpipe/player/MainPlayer.java:71:            = "org.schabi.newpipe.player.MainPlayer.OPEN_CONTROLS";
org/schabi/newpipe/player/MainPlayer.java:73:            = "org.schabi.newpipe.player.MainPlayer.REPEAT";
org/schabi/newpipe/player/MainPlayer.java:75:            = "org.schabi.newpipe.player.MainPlayer.ACTION_PLAY_NEXT";
org/schabi/newpipe/player/MainPlayer.java:77:            = "org.schabi.newpipe.player.MainPlayer.ACTION_PLAY_PREVIOUS";
org/schabi/newpipe/player/MainPlayer.java:79:            = "org.schabi.newpipe.player.MainPlayer.ACTION_FAST_REWIND";
org/schabi/newpipe/player/MainPlayer.java:81:            = "org.schabi.newpipe.player.MainPlayer.ACTION_FAST_FORWARD";
org/schabi/newpipe/player/MainPlayer.java:83:            = "org.schabi.newpipe.player.MainPlayer.ACTION_SHUFFLE";
org/schabi/newpipe/player/MainPlayer.java:85:            = "org.schabi.newpipe.player.MainPlayer.ACTION_RECREATE_NOTIFICATION";
org/schabi/newpipe/fragments/detail/VideoDetailFragment.java:148:            "org.schabi.newpipe.VideoDetailFragment.ACTION_SHOW_MAIN_PLAYER";
org/schabi/newpipe/fragments/detail/VideoDetailFragment.java:150:            "org.schabi.newpipe.VideoDetailFragment.ACTION_HIDE_MAIN_PLAYER";
org/schabi/newpipe/fragments/detail/VideoDetailFragment.java:152:            "org.schabi.newpipe.VideoDetailFragment.ACTION_PLAYER_STARTED";
org/schabi/newpipe/fragments/detail/VideoDetailFragment.java:154:            "org.schabi.newpipe.VideoDetailFragment.ACTION_VIDEO_FRAGMENT_RESUMED";
org/schabi/newpipe/fragments/detail/VideoDetailFragment.java:156:            "org.schabi.newpipe.VideoDetailFragment.ACTION_VIDEO_FRAGMENT_STOPPED";

Code looks good to me. I didn't test the changes yet.

@B0pol
Copy link
Member Author

B0pol commented Dec 19, 2020

fixed in the last commit

@B0pol B0pol added bug Issue is related to a bug feed Issue is related to the feed player notification Anything to do with the MediaStyle notification player Issues related to any player (main, popup and background) labels Dec 20, 2020
it fixes issues with forks or debug builds, e.g. when you open two newpipe apps (with debug or fork apps), close one notification, it closes all newpipe notifications
fixes TeamNewPipe#4653
@B0pol B0pol mentioned this pull request Dec 23, 2020
5 tasks
Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good and everything seems to work fine (tested on Android 4.4, 7, 11)

I'd suggest to wait for @Stypox's review. It is better to double-check this PR.

@Stypox Stypox merged commit 1b4bde4 into TeamNewPipe:dev Jan 1, 2021
@opusforlife2
Copy link
Collaborator

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug feed Issue is related to the feed player notification Anything to do with the MediaStyle notification player Issues related to any player (main, popup and background)
Projects
None yet
4 participants