【发布时间】:2013-06-28 04:19:12
【问题描述】:
我正在修改一些代码以使其可用于新的RootTools 3.0 (which fixes an important bug):
我重写的一个部分看起来像这样,带有一个回调类以提高可读性。我正在添加两个目录的大小,以告知可能被清除的浏览器缓存的总数:
@Override
protected void onResume() {
super.onResume();
//Refresh views:
try {
//Show browser's cache size:
ShellCommands.getListing("/data/data/com.android.browser/app_databases/", null, new Callback<SumSize>() {
@Override
public void call(SumSize localstore) throws InterruptedException, IOException, TimeoutException, RootDeniedException {
final SumSize total = localstore;
getFirefoxProfiles(new Callback<String>() {
@Override
public void call(String input) throws InterruptedException, IOException, TimeoutException, RootDeniedException {
ShellCommands.getListing(input+"/Cache/", null, new Callback<SumSize>() {
@Override
public void call(SumSize input) {
total.add(input);
((TextView)findViewById(R.id.lblClearBrowser)).setText(total.getReadable());
}
});
}
});
}
});
比.waitforfinish 复杂一点,但我在调试时遇到了一个严重的问题:最里面的调用(SumSize 输入)似乎工作正常,但没有办法查看总数是调试的时候。这是带有final 外部变量的Java 中的错误吗? Android中的错误? Eclipse 中的错误?
【问题讨论】:
-
您在
this中可以看到什么?也许你可以找到this.val$total -
你的调试断点在哪里?
-
@johnchen902 你是对的 - 它是
this.val$total。你知道为什么它不会在鼠标悬停时弹出,或者右键单击显示 - 检查吗? -
@NoBugs 不知道,我不熟悉调试器。我平时用的很多
System.out.println。
标签: java android eclipse adb roottools