01-15 12:13:22.838 9986 9986 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
1. we can find NoSuchMethodError exception in the log
01-01 01:31:05.279 15621 15621 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method b()I in class Landroid/net/http/SslError; or its super classes (declaration of 'android.net.http.SslError' appears in /system/framework/framework.jar)
2. apk has it's own android.net.http.SslError in the class.dex, not that one in the /system/framework/framework.jar
sslError.class
package android.net.http;
import java.security.cert.X509Certificate;
public class SslError
{
@Deprecated
public SslError(int paramInt, SslCertificate paramSslCertificate)
{
throw new RuntimeException("Stub!");
}
...
3. the exception is thrown when call paramSslError.b() by it's onReceivedSslError() of class3.dex,
d.class
public void onReceivedSslError(WebView paramWebView, SslErrorHandler paramSslErrorHandler, SslError paramSslError)
{
util.LOGI("ssl error " + paramSslError.b());
if (true == QuickLoginWebViewActivity.a)
{
paramSslErrorHandler.proceed();
return;
}
AlertDialog.Builder localBuilder = new AlertDialog.Builder(this.b);
localBuilder.setMessage("页面证书错误(" + paramSslError.b() + "),是否继续?");
localBuilder.setPositiveButton("继续", new e(this, paramSslErrorHandler));
localBuilder.setNegativeButton("取消", new f(this, paramSslErrorHandler));
AlertDialog localAlertDialog = localBuilder.create();
4. after parsered the class.dex, we can find the class sslError lied in it, but it's method b() is not in it.
method b() defined in sslError.java ,
public int b()
{
throw new RuntimeException("Stub!");
}
5. after parsered the class3.dex, we can find method b() lied in it's method section, it's index is 570, but it's class does not lie in class3.dex, rather than lie in class.dex, so the ResolveMethod() in the class_linker.cc can't find the method b(), then an exception of NoSuchMethodError is thrown. it's an issue of multidex caused by apk owner.
6.why the issue only found on SDM450?
then we go back to the callback function onReceivedSslError(),
public void onReceivedSslError(WebView paramWebView, SslErrorHandler paramSslErrorHandler, SslError paramSslError)
{
util.LOGI("ssl error " + paramSslError.b());
if (true == QuickLoginWebViewActivity.a)
{
paramSslErrorHandler.proceed();
return;
}
AlertDialog.Builder localBuilder = new AlertDialog.Builder(this.b);
localBuilder.setMessage("页面证书错误(" + paramSslError.b() + "),是否继续?");
localBuilder.setPositiveButton("继续", new e(this, paramSslErrorHandler));
localBuilder.setNegativeButton("取消", new f(this, paramSslErrorHandler));
AlertDialog localAlertDialog = localBuilder.create();
try
{
localAlertDialog.show();
return;
}
catch (Exception localException)
{
}
}
we can know issue happened when "页面证书错误", what caused the 页面证书错误? so many causes, in this case, I found it's caused by system time.
if we set a wrong system time, pixel8.0/sdm670 will crash also, if the time is right, all devices work well.
so it's moved to p2-p3 3rd-party classify.