1

I'm reworking some code to make it usable with the new RootTools 3.0 (which fixes an important bug):

One section I rewrote looks like this, with a callback-class for better readability. I'm adding the size of two directories to tell the total of browser cache that may be cleared:

@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());
                            }
                        });
                    }
                });
            }
        });

A bit more complex than it was with the .waitforfinish, but I'm having a serious problem in debugging: the inner most call(SumSize input) seems to work correctly, but there is no way to see what the total is when debugging. Is this a bug in Java with final outer variables? A bug in Android? A bug in Eclipse?

NoBugs
  • 9,310
  • 13
  • 80
  • 146

1 Answers1

0

Your Variables view needs to be set to Show Constants. You can toggle this from the Java section of its local menu.

nitind
  • 19,089
  • 4
  • 34
  • 43
  • Thanks, but this doesn't seem to make a difference. Even Ctrl+Shift+I inspector doesn't show this value. – NoBugs Jul 01 '13 at 14:31