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

Commit 56d56ee9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure the dashboard header remains after pressing back."

parents 87777900 288f1ebf
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -201,8 +201,6 @@ public class PermissionUsageFragment extends SettingsWithLargeHeader implements
    public void onStart() {
        super.onStart();
        getActivity().setTitle(R.string.permission_usage_title);

        hideHeader();
    }

    /**
@@ -439,6 +437,7 @@ public class PermissionUsageFragment extends SettingsWithLargeHeader implements
        // Update header.
        if (mFilterGroup == null) {
            screen.addPreference(createBarChart(usages, timeFilterItem, context));
            hideHeader();
        } else {
            AppPermissionGroup group = getGroup(mFilterGroup);
            if (group != null) {
+9 −2
Original line number Diff line number Diff line
@@ -49,8 +49,15 @@ public abstract class SettingsWithLargeHeader extends PermissionsFrameFragment
        ViewGroup root = (ViewGroup) super.onCreateView(inflater, container, savedInstanceState);

        if (!DeviceUtils.isTelevision(getContext())) {
            if (mHeader == null) {
                mHeader = inflater.inflate(R.layout.header_large, root, false);
                getPreferencesContainer().addView(mHeader, 0);
            } else if (mHeader.getVisibility() == View.VISIBLE) {
                ((ViewGroup) mHeader.getParent()).removeView(mHeader);
                getPreferencesContainer().addView(mHeader, 0);
                updateHeader(mHeader);
                mHeader.requireViewById(R.id.header_link).setVisibility(View.VISIBLE);
            }
        }

        return root;