mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-01 05:48:22 +03:00
BraveNewPipeLegacy: Move setting HttpsURLConnection default ssl factory to BraveApp
This commit is contained in:
parent
142c40f461
commit
9472c69e70
2 changed files with 9 additions and 7 deletions
|
@ -1,6 +1,9 @@
|
|||
package org.schabi.newpipe;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
import org.conscrypt.Conscrypt;
|
||||
import org.schabi.newpipe.util.BraveTLSSocketFactory;
|
||||
|
||||
import java.security.Security;
|
||||
|
||||
|
@ -11,5 +14,11 @@ public class BraveApp extends MultiDexApplication {
|
|||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Security.insertProviderAt(Conscrypt.newProvider(), 1);
|
||||
|
||||
// enable TLS1.2/1.3 for <=kitkat devices, to fix download and play for
|
||||
// media.ccc.de, rumble, soundcloud, peertube sources
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
|
||||
BraveTLSSocketFactory.setAsDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import android.content.Intent;
|
|||
import android.content.IntentFilter;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
@ -86,7 +85,6 @@ import org.schabi.newpipe.util.PermissionHelper;
|
|||
import org.schabi.newpipe.util.SerializedCache;
|
||||
import org.schabi.newpipe.util.ServiceHelper;
|
||||
import org.schabi.newpipe.util.StateSaver;
|
||||
import org.schabi.newpipe.util.BraveTLSSocketFactory;
|
||||
import org.schabi.newpipe.util.ThemeHelper;
|
||||
import org.schabi.newpipe.views.FocusOverlayView;
|
||||
|
||||
|
@ -131,11 +129,6 @@ public class MainActivity extends AppCompatActivity {
|
|||
+ "savedInstanceState = [" + savedInstanceState + "]");
|
||||
}
|
||||
|
||||
// enable TLS1.1/1.2 for kitkat devices, to fix download and play for media.ccc.de sources
|
||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
|
||||
BraveTLSSocketFactory.setAsDefault();
|
||||
}
|
||||
|
||||
ThemeHelper.setDayNightMode(this);
|
||||
ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue