mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 14:16:58 -04:00
Merge branch 'gl4es' of https://github.com/khanhduytran0/PojavLauncher.git into gl4es
This commit is contained in:
commit
03edbeb4cf
@ -1022,8 +1022,23 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
rsaList = getCipherServices("Cipher", "RSA");
|
rsaList = getCipherServices("Cipher", "RSA");
|
||||||
rsaPkcs1List = getCipherServices("Cipher", "RSA/ECB/PKCS1PADDING");
|
rsaPkcs1List = getCipherServices("Cipher", "RSA/ECB/PKCS1PADDING");
|
||||||
|
|
||||||
rsaList.clear();
|
if (Build.VERSION.SDK_INT > 23) {
|
||||||
rsaList.addAll(rsaPkcs1List);
|
Method rsaMethod_putService = Provider.class.getDeclaredMethod("putService", Provider.Service.class);
|
||||||
|
rsaMethod_putService.setAccessible(true);
|
||||||
|
|
||||||
|
Method rsaMethod_removeService = Provider.class.getDeclaredMethod("removeService", Provider.Service.class);
|
||||||
|
rsaMethod_removeService.setAccessible(true);
|
||||||
|
|
||||||
|
for (Provider.Service s : rsaList) {
|
||||||
|
rsaMethod_removeService.invoke(s.getProvider(), s);
|
||||||
|
}
|
||||||
|
for (Provider.Service s : rsaPkcs1List) {
|
||||||
|
rsaMethod_putService.invoke(s.getProvider(), s);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rsaList.clear();
|
||||||
|
rsaList.addAll(rsaPkcs1List);
|
||||||
|
}
|
||||||
} catch (Throwable th) {
|
} catch (Throwable th) {
|
||||||
th.printStackTrace();
|
th.printStackTrace();
|
||||||
|
|
||||||
@ -1066,7 +1081,10 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
return Services.getServices(type + "." + algorithm);
|
return Services.getServices(type + "." + algorithm);
|
||||||
} else if (Build.VERSION.SDK_INT == 23) {
|
} else if (Build.VERSION.SDK_INT == 23) {
|
||||||
// 6.0 (Marshmallow) only
|
// 6.0 (Marshmallow) only
|
||||||
return Services.getServices(type, algorithm);
|
|
||||||
|
// FIXME it may not work!
|
||||||
|
// return Services.getServices(type, algorithm);
|
||||||
|
return new ArrayList<Provider.Service>();
|
||||||
} else {
|
} else {
|
||||||
// 7.0 (Nougat) and above
|
// 7.0 (Nougat) and above
|
||||||
List<Provider> providers = sun.security.jca.ProviderList.providers();
|
List<Provider> providers = sun.security.jca.ProviderList.providers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user