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

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

Merge "Don't show divider before debug section."

parents c7f52273 74f97c62
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -62,6 +62,7 @@
            android:orientation="vertical"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_height="wrap_content"
            android:paddingTop="20dp"
            android:visibility="gone" />
            android:visibility="gone" />


    </LinearLayout>
    </LinearLayout>
+2 −2
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ public class DebugView extends TableView implements DebugDisplay {


    @Override
    @Override
    public void accept(DocumentInfo info) {
    public void accept(DocumentInfo info) {
        setTitle(R.string.inspector_debug_section);
        setTitle(R.string.inspector_debug_section, false);


        put(R.string.debug_content_uri, info.derivedUri.toString());
        put(R.string.debug_content_uri, info.derivedUri.toString());
        put(R.string.debug_document_id, info.documentId);
        put(R.string.debug_document_id, info.documentId);
@@ -128,7 +128,7 @@ public class DebugView extends TableView implements DebugDisplay {
    private void dumpMetadata(String type, Bundle bundle) {
    private void dumpMetadata(String type, Bundle bundle) {
        String title = mContext.getResources().getString(
        String title = mContext.getResources().getString(
                R.string.inspector_debug_metadata_section);
                R.string.inspector_debug_metadata_section);
        putTitle(String.format(title, type));
        putTitle(String.format(title, type), true);
        List<String> keys = new ArrayList<>(bundle.keySet());
        List<String> keys = new ArrayList<>(bundle.keySet());
        Collections.sort(keys);
        Collections.sort(keys);
        for (String key : keys) {
        for (String key : keys) {
+0 −5
Original line number Original line Diff line number Diff line
@@ -400,11 +400,6 @@ public final class InspectorController {
     */
     */
    public interface TableDisplay extends Display {
    public interface TableDisplay extends Display {


        /**
         * Sets the title of the data.
         */
        void setTitle(@StringRes int title);

        /**
        /**
         * Adds a row in the table.
         * Adds a row in the table.
         */
         */
+1 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ public class MediaView extends TableView implements MediaDisplay {


    @Override
    @Override
    public void accept(DocumentInfo doc, Bundle metadata, @Nullable Runnable geoClickListener) {
    public void accept(DocumentInfo doc, Bundle metadata, @Nullable Runnable geoClickListener) {
        setTitle(R.string.inspector_metadata_section);
        setTitle(R.string.inspector_metadata_section, true);


        Bundle exif = metadata.getBundle(DocumentsContract.METADATA_EXIF);
        Bundle exif = metadata.getBundle(DocumentsContract.METADATA_EXIF);
        if (exif != null) {
        if (exif != null) {
+6 −4
Original line number Original line Diff line number Diff line
@@ -56,17 +56,19 @@ public class TableView extends LinearLayout implements TableDisplay {
        mRes = context.getResources();
        mRes = context.getResources();
    }
    }


    @Override
    void setTitle(@StringRes int title, boolean showDivider) {
    public void setTitle(@StringRes int title) {
        putTitle(mContext.getResources().getString(title), showDivider);
        putTitle(mContext.getResources().getString(title));
    }
    }


    // A naughty title method (that takes strings, not message ids), mostly for DebugView.
    // A naughty title method (that takes strings, not message ids), mostly for DebugView.
    protected void putTitle(CharSequence title) {
    protected void putTitle(CharSequence title, boolean showDivider) {
        TextView view = mTitles.get(title);
        TextView view = mTitles.get(title);
        if (view == null) {
        if (view == null) {
            LinearLayout layout =
            LinearLayout layout =
                (LinearLayout) mInflater.inflate(R.layout.inspector_section_title, null);
                (LinearLayout) mInflater.inflate(R.layout.inspector_section_title, null);
            if (!showDivider) {
                layout.setDividerDrawable(null);
            }
            view = (TextView) layout.findViewById(R.id.inspector_header_title);
            view = (TextView) layout.findViewById(R.id.inspector_header_title);
            addView(layout);
            addView(layout);
            mTitles.put(title, view);
            mTitles.put(title, view);
Loading