Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98d558ea authored by Steve McKay's avatar Steve McKay
Browse files

Improved debug output.

Override toString on State, RootItem, and AppItem.

Change-Id: If4c9cb3bbeab711a92e4a49250dc5cfca5a1e3bd
parent 1d1a1633
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -135,6 +135,23 @@ public class State implements android.os.Parcelable {
        out.writeParcelable(sortModel, 0);
    }

    @Override
    public String toString() {
        return "State{"
                + "action=" + action
                + ", acceptMimes=" + acceptMimes
                + ", allowMultiple=" + allowMultiple
                + ", localOnly=" + localOnly
                + ", showDeviceStorageOption=" + showDeviceStorageOption
                + ", showAdvanced=" + showAdvanced
                + ", stack=" + stack
                + ", dirConfigs=" + dirConfigs
                + ", excludedAuthorities=" + excludedAuthorities
                + ", openableOnly=" + openableOnly
                + ", sortModel=" + sortModel
                + "}";
    }

    public static final ClassLoaderCreator<State> CREATOR = new ClassLoaderCreator<State>() {
        @Override
        public State createFromParcel(Parcel in) {
+8 −0
Original line number Diff line number Diff line
@@ -83,4 +83,12 @@ class AppItem extends Item {
    void open() {
        mActionHandler.openRoot(info);
    }

    @Override
    public String toString() {
        return "AppItem{"
                + "id=" + stringId
                + ", resolveInfo=" + info
                + "}";
    }
}
+9 −0
Original line number Diff line number Diff line
@@ -120,4 +120,13 @@ class RootItem extends Item {
        inflater.inflate(R.menu.root_context_menu, menu);
        menuManager.updateRootContextMenu(menu, root, docInfo);
    }

    @Override
    public String toString() {
        return "RootItem{"
                + "id=" + stringId
                + ", root=" + root
                + ", docInfo=" + docInfo
                + "}";
    }
}
+3 −1
Original line number Diff line number Diff line
@@ -299,7 +299,9 @@ public class RootsFragment extends Fragment {
        // Omit ourselves from the list
        for (ResolveInfo info : infos) {
            if (!context.getPackageName().equals(info.activityInfo.packageName)) {
                apps.add(new AppItem(info, mActionHandler));
                AppItem app = new AppItem(info, mActionHandler);
                if (VERBOSE) Log.v(TAG, "Adding handler app: " + app);
                apps.add(app);
            }
        }