forked from TeamNewPipe/NewPipe
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new Localization and Downloader implementations from extractor
- Loading branch information
1 parent
e64a780
commit 063bd33
Showing
20 changed files
with
294 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,13 +21,14 @@ | |
import org.acra.config.ACRAConfigurationException; | ||
import org.acra.config.ConfigurationBuilder; | ||
import org.acra.sender.ReportSenderFactory; | ||
import org.schabi.newpipe.extractor.Downloader; | ||
import org.schabi.newpipe.extractor.NewPipe; | ||
import org.schabi.newpipe.extractor.downloader.Downloader; | ||
import org.schabi.newpipe.report.AcraReportSenderFactory; | ||
import org.schabi.newpipe.report.ErrorActivity; | ||
import org.schabi.newpipe.report.UserAction; | ||
import org.schabi.newpipe.settings.SettingsActivity; | ||
import org.schabi.newpipe.util.ExtractorHelper; | ||
import org.schabi.newpipe.util.Localization; | ||
import org.schabi.newpipe.util.StateSaver; | ||
|
||
import java.io.IOException; | ||
|
@@ -44,6 +45,7 @@ | |
import io.reactivex.functions.Consumer; | ||
import io.reactivex.plugins.RxJavaPlugins; | ||
|
||
|
||
/* | ||
* Copyright (C) Hans-Christoph Steiner 2016 <[email protected]> | ||
* App.java is part of NewPipe. | ||
|
@@ -95,7 +97,9 @@ public void onCreate() { | |
SettingsActivity.initSettings(this); | ||
|
||
NewPipe.init(getDownloader(), | ||
org.schabi.newpipe.util.Localization.getPreferredExtractorLocal(this)); | ||
Localization.getPreferredLocalization(this), | ||
Localization.getPreferredContentCountry(this)); | ||
|
||
StateSaver.init(this); | ||
initNotificationChannel(); | ||
|
||
|
@@ -109,7 +113,7 @@ public void onCreate() { | |
} | ||
|
||
protected Downloader getDownloader() { | ||
return org.schabi.newpipe.Downloader.init(null); | ||
return DownloaderImpl.init(null); | ||
} | ||
|
||
private void configureRxJavaErrorHandler() { | ||
|
@@ -195,12 +199,12 @@ private void initACRA() { | |
null, | ||
null, | ||
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none", | ||
"Could not initialize ACRA crash report", R.string.app_ui_crash)); | ||
"Could not initialize ACRA crash report", R.string.app_ui_crash)); | ||
} | ||
} | ||
|
||
public void initNotificationChannel() { | ||
if (Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O) { | ||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { | ||
return; | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.