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

Commit 85af84ed authored by Jason Monk's avatar Jason Monk Committed by android-build-merger
Browse files

Merge "Dump fragments in sysui when dumping" into pi-dev am: cff36e41

am: 2accad53

Change-Id: If5c3f14f3f1248f46ed543f9c0fefe69f26f4cc9
parents b1ab9691 2accad53
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -23,14 +23,18 @@ import android.util.Log;
import android.view.View;

import com.android.systemui.ConfigurationChangedReceiver;
import com.android.systemui.Dumpable;
import com.android.systemui.SystemUI;
import com.android.systemui.SystemUIApplication;

import java.io.FileDescriptor;
import java.io.PrintWriter;

/**
 * Holds a map of root views to FragmentHostStates and generates them as needed.
 * Also dispatches the configuration changes to all current FragmentHostStates.
 */
public class FragmentService implements ConfigurationChangedReceiver {
public class FragmentService implements ConfigurationChangedReceiver, Dumpable {

    private static final String TAG = "FragmentService";

@@ -65,6 +69,14 @@ public class FragmentService implements ConfigurationChangedReceiver {
        }
    }

    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("Dumping fragments:");
        for (FragmentHostState state : mHosts.values()) {
            state.mFragmentHostManager.getFragmentManager().dump("  ", fd, pw, args);
        }
    }

    private class FragmentHostState {
        private final View mView;