File tree Expand file tree Collapse file tree
src/main/java/com/liskovsoft/smartyoutubetv2/tv/ui/main Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ android {
5757 applicationId " app.smarttube"
5858 minSdkVersion project. properties. minSdkVersion
5959 targetSdkVersion project. properties. targetSdkVersion
60- versionCode 2380
61- versionName " 31.90 "
60+ versionCode 2383
61+ versionName " 31.93 "
6262 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
6363 buildConfigField " long" , " TIMESTAMP" , System . currentTimeMillis() + " L"
6464
Original file line number Diff line number Diff line change 3636import org .conscrypt .Conscrypt ;
3737
3838import java .lang .Thread .UncaughtExceptionHandler ;
39+ import java .security .Provider ;
3940import java .security .Security ;
4041
4142public class MainApplication extends MultiDexApplication { // fix: Didn't find class "com.google.firebase.provider.FirebaseInitProvider"
@@ -62,9 +63,19 @@ public void onCreate() {
6263 //if (Build.VERSION.SDK_INT < 29 && Conscrypt.isAvailable()) {
6364 // Security.insertProviderAt(Conscrypt.newProvider(), 1);
6465 //}
65- if (NetworkData .instance (this ).isConscryptEnabled ()) {
66+
67+ // Important: Initialize the native Conscrypt provider BEFORE reading any configs/SharedPreferences.
68+ // Otherwise, early disk I/O shifts the ClassLoader on some Android TV devices, causing silent JNI linking errors.
69+ Provider conscryptProvider = null ;
70+ try {
71+ conscryptProvider = Conscrypt .newProvider ();
72+ } catch (Throwable e ) {
73+ // UnsatisfiedLinkError
74+ }
75+
76+ if (conscryptProvider != null && NetworkData .instance (this ).isConscryptEnabled ()) {
6677 try {
67- Security .insertProviderAt (Conscrypt . newProvider () , 1 );
78+ Security .insertProviderAt (conscryptProvider , 1 );
6879 } catch (Throwable e ) {
6980 // UnsatisfiedLinkError
7081 }
You can’t perform that action at this time.
0 commit comments