VFY:修改后的索尼爱立信启动器中出现死代码错误
我正在使角圈在 hdpi 设备上工作。除了按“添加”按钮(也长按屏幕)和按应用程序抽屉中的排序样式按钮外,一切正常。两者都会产生发射器的 F/c。奇怪的是,它可以在我的 OG Droid 和 Xoom 上运行,但不能在我的 Droid Incredible 2 上运行。
Logcat:
I/ActivityManager(24294): Displayed
com.sonyericsson.home/.HomeActivity: +1s573ms W/cornerbuttons(26412):
Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_topleftcornerbutton.xml
W/cornerbuttons(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_toprightcornerbutton.xml
W/cornerbuttons(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_bottomleftcornerbutton.xml
W/cornerbuttons(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_bottomrightcornerbutton.xml
W/app-tray(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_apptray.xml
I/dalvikvm(26412): Could not find method
android.app.AlertDialog$Builder.<init>, referenced from method
com.sonyericsson.home.HomeActivity$AddDialog.createDialog
D/dalvikvm(26412): VFY: dead code 0x0011-0034 in
Lcom/sonyericsson/home/HomeActivity$AddDialog;.createDialog
()Landroid/app/Dialog; I/ActivityManager(24294): Displayed
com.sonyericsson.home/.HomeActivity: +1s651ms I/dalvikvm(26442): Could
not find method android.app.AlertDialog$Builder.<init>, referenced
from method com.sonyericsson.home.HomeActivity$SortDialog.createDialog
D/dalvikvm(26442): VFY: dead code 0x0019-0047 in
Lcom/sonyericsson/home/HomeActivity$SortDialog;.createDialog
()Landroid/app/Dialog;
PS: the f/cs occur even without my modifications
I am in the process of making the corner circles work on hdpi devices. Everything works except pressing the "add" button (long pressing screen as well), and pressing the sorting style button in the app drawer. Both result in a F/c of the launcher. The odd thing is it is working on both my OG Droid as well as my Xoom, but not my Droid Incredible 2.
The Logcat:
I/ActivityManager(24294): Displayed
com.sonyericsson.home/.HomeActivity: +1s573ms W/cornerbuttons(26412):
Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_topleftcornerbutton.xml
W/cornerbuttons(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_toprightcornerbutton.xml
W/cornerbuttons(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_bottomleftcornerbutton.xml
W/cornerbuttons(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_bottomrightcornerbutton.xml
W/app-tray(26412): Customization file not found:
/etc/customization/settings/com/sonyericsson/home/default_settings_apptray.xml
I/dalvikvm(26412): Could not find method
android.app.AlertDialog$Builder.<init>, referenced from method
com.sonyericsson.home.HomeActivity$AddDialog.createDialog
D/dalvikvm(26412): VFY: dead code 0x0011-0034 in
Lcom/sonyericsson/home/HomeActivity$AddDialog;.createDialog
()Landroid/app/Dialog; I/ActivityManager(24294): Displayed
com.sonyericsson.home/.HomeActivity: +1s651ms I/dalvikvm(26442): Could
not find method android.app.AlertDialog$Builder.<init>, referenced
from method com.sonyericsson.home.HomeActivity$SortDialog.createDialog
D/dalvikvm(26442): VFY: dead code 0x0019-0047 in
Lcom/sonyericsson/home/HomeActivity$SortDialog;.createDialog
()Landroid/app/Dialog;
PS: the f/cs occur even without my modifications
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
反编译后,您会发现在SortDialog内部类“HomeActivity$SortDialog.smali”的createDialog()方法中引用了Util类来找出要装饰AlertDialogBuilder<的主题/strong> 与。
SMALI :
或者在 Java 中,
它们的 Utils 类然后检查要应用于 SortDialog 的已保存主题。由于主题未设置(我怎么不知道?),它返回 0 或 -1 的 int(不确定)。
j 是返回的内容,并且 sRtlAlphabetField 未正确初始化,我猜您会
看到上面的调用正在调用在启动器的 Android R.java 文件中找到的 Alphabet_isRtl 的资源 id 。它一定不能返回有效的资源标识符,因此为什么当 Util 方法返回 -1 时?或 0 无法使用给定的 int 参数创建 AlertDialog 的新实例。输出 HomeActivity$SortDialog 或 Util 类中 i 的值的简单日志行将向您显示它尝试用作主题值的内容,无论哪种方式,它都可能是 Gumpf。
这可能是一个漫长的过程,但我很确定这就是发生此问题的原因,并且您希望在 AddToStageDialog、PickActivityDialog、AddDialog 和 SortDialog“onCreate() 方法中出现此错误。
因为它们都调用相同的方法line :
我猜解决方案是编辑以下内容的 SMALI 类:AddToStageDialog、PickActivityDialog、AddDialog 和 SortDialog,以便它们使用构造函数创建 AlertDialog.Builder只需将上下文作为参数即可,
但
如果没有主题部分,您可能会到处寻找类似的调用,
您好运!
祝 编辑后的 smali 代码是:
from:
to:
在我上面提到的对话框类中执行此操作,它将解决问题:)
When decompiled you'll find that in the createDialog() method of the SortDialog inner class "HomeActivity$SortDialog.smali" is referencing the Util class to find out what theme to decorate the AlertDialogBuilder with.
SMALI :
or in Java
Their Utils class then checks the saved theme in which it is to apply to the SortDialog. Since the theme isn't set (how I don't know?) it returns back an int of 0 or -1 (not sure).
j is what is being returned and the sRtlAlphabetField was not initialized properly I'm guessing
You see that call above is calling for the resource id of alphabet_isRtl which is found in the Android R.java file of the launcher. It mustn't be getting back a valid resource identifier hence why when the Util method returns -1? or 0 it is unable to create a new instance of the AlertDialog with the given int param. A simple log line to output the value of either i in the HomeActivity$SortDialog or Util class would show you what it's trying to use as the theme value, either way it's probably gumpf.
This may be a long shot but I'm pretty sure that's why this issue is occurring and you'd expect to have this error in the AddToStageDialog, PickActivityDialog, AddDialog and SortDialog "onCreate() methods.
Since they're all calling the same line :
I'm guessing the solution would be to edit the SMALI classes for : AddToStageDialog, PickActivityDialog, AddDialog and SortDialog so that they create an AlertDialog.Builder using the constructor that just takes the context as the parameter.
i.e
That may do it but without the theming part you may be hunting for similar calls like this all over the place.
Good luck!
Edit : I tested this myself and I've got it working, the edited smali code is :
from:
to:
Do this in the dialog classes I mentioned above and it will solve the problem :)