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

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

Merge "Remove support for in-grid debug info."

parents bc18d739 b97b56e5
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2013 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<com.android.documentsui.ui.DocumentDebugInfo
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/grid_item_margin"
    android:textAlignment="viewStart"
    android:textSize="11sp"
    android:textColor="#FF000000" />
+6 −6
Original line number Diff line number Diff line
@@ -15,6 +15,12 @@
     limitations under the License.
-->

<!-- FYI: This layout has an extra top level container view that was previously used
     to allow for the insertion of debug info. The debug info is now gone, but the
     container remains because there is a high likelihood of UI regression relating
     to focus and selection states, some of which are specific to keyboard
     when touch mode is not enable. So, if you, heroic engineer of the future,
     decide to rip these out, please be sure to check out focus and keyboards. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
@@ -90,10 +96,4 @@

    </FrameLayout>

    <FrameLayout
        android:id="@+id/debug_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#FFEFEFEF" />

</LinearLayout>
 No newline at end of file
+6 −5
Original line number Diff line number Diff line
@@ -14,6 +14,12 @@
     limitations under the License.
-->

<!-- FYI: This layout has an extra top level container view that was previously used
     to allow for the insertion of debug info. The debug info is now gone, but the
     container remains because there is a high likelihood of UI regression relating
     to focus and selection states, some of which are specific to keyboard
     when touch mode is not enable. So, if you, heroic engineer of the future,
     decide to rip these out, please be sure to check out focus and keyboards. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
@@ -148,9 +154,4 @@

    </RelativeLayout>

    <FrameLayout
        android:id="@+id/debug_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#FFEFEFEF" />
</LinearLayout>
 No newline at end of file
+0 −21
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ public abstract class DocumentHolder
    protected @Nullable String mModelId;

    private final View mSelectionHotspot;
    private final @Nullable FrameLayout mDebugContainer;
    private @Nullable DocumentDebugInfo mDebugInfo;

    // See #addKeyEventListener for details on the need for this field.
@@ -69,8 +68,6 @@ public abstract class DocumentHolder
        mContext = context;

        mSelectionHotspot = itemView.findViewById(R.id.icon_check);

        mDebugContainer = (FrameLayout) itemView.findViewById(R.id.debug_info);
    }

    /**
@@ -152,24 +149,6 @@ public abstract class DocumentHolder
        return false;
    }

    protected void includeDebugInfo(DocumentInfo doc) {
        if (mDebugContainer == null) {
            return;
        }
        if (DebugFlags.getDocumentDetailsEnabled()) {
            assert(Build.IS_DEBUGGABLE);
            if (mDebugInfo == null) {
                assert(mDebugContainer.getChildAt(0) == null);
                mDebugInfo = inflateLayout(mContext, mDebugContainer, R.layout.document_debug_info);
                mDebugContainer.addView(mDebugInfo);
            }
            mDebugInfo.update(doc);
            mDebugContainer.setVisibility(View.VISIBLE);
        } else {
            mDebugContainer.setVisibility(View.GONE);
        }
    }

    static void setEnabledRecursive(View itemView, boolean enabled) {
        if (itemView == null || itemView.isEnabled() == enabled) {
            return;
+0 −5
Original line number Diff line number Diff line
@@ -89,10 +89,5 @@ final class GridDirectoryHolder extends DocumentHolder {
        mTitle.setText(
                getCursorString(cursor, Document.COLUMN_DISPLAY_NAME),
                TextView.BufferType.SPANNABLE);

        if (DebugFlags.getDocumentDetailsEnabled()) {
            String authority = getCursorString(cursor, RootCursorWrapper.COLUMN_AUTHORITY);
            includeDebugInfo(DocumentInfo.fromCursor(cursor, authority));
        }
    }
}
Loading