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

Commit 7cc08923 authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Fix QSImpl dump register

Make sure that we call `onCreate` to register.

Test: adb shell dumpsys activity service
com.android.systemui/.SystemUIService
Fixes: 305931767
Flag: NONE

Change-Id: I9835db1741a18ef8c18c9190a7e1d88f7e0037d8
parent a894e1d8
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ public class QSFragmentLegacy extends LifecycleFragment implements QS {
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        QSFragmentComponent qsFragmentComponent = mQsComponentFactory.create(getView());
        mQsImpl = mQsImplProvider.get();
        mQsImpl.onCreate(null);
        mQsImpl.onComponentCreated(qsFragmentComponent, savedInstanceState);
    }

@@ -85,21 +86,13 @@ public class QSFragmentLegacy extends LifecycleFragment implements QS {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (mQsImpl != null) {
            mQsImpl.onCreate(savedInstanceState);
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    public void onDestroyView() {
        if (mQsImpl != null) {
            mQsImpl.onDestroy();
            mQsImpl = null;
        }
        super.onDestroyView();
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
+1 −1
Original line number Diff line number Diff line
@@ -940,7 +940,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl
    @Override
    public void dump(PrintWriter pw, String[] args) {
        IndentingPrintWriter indentingPw = new IndentingPrintWriter(pw, /* singleIndent= */ "  ");
        indentingPw.println("QSFragment:");
        indentingPw.println("QSImpl:");
        indentingPw.increaseIndent();
        indentingPw.println("mQsBounds: " + mQsBounds);
        indentingPw.println("mQsExpanded: " + mQsExpanded);
+3 −1
Original line number Diff line number Diff line
@@ -174,7 +174,9 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr

    @Override
    public void destroy() {
        super.destroy();
        // Don't call super as this may be called before the view is dettached and calling super
        // will remove the attach listener. We don't need to do that, because once this object is
        // detached from the graph, it will be gc.
        mHost.removeCallback(mQSHostCallback);

        for (TileRecord record : mRecords) {