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

Commit 84440eb4 authored by Steve McKay's avatar Steve McKay Committed by Ben Lin
Browse files

Add DebugInfo view.

Extract base TableView class.
Add new KeyValueRow class.
Allow inspector to be force enabled from debug command.
Allow debug view in inspector to be enabled when docinfo is enabled.

Bug: 62635757
Change-Id: Ibef5b21af2a5f25839222880e2b63f0ceee74d06
parent 03cd3b69
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@
        </activity>

        <activity
            android:enabled="@bool/feature_inspector"
            android:name=".inspector.DocumentInspectorActivity"
            android:label="@string/menu_inspector"
            android:icon="@drawable/launcher_icon"
+9 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.android.documentsui.inspector.HeaderView
            android:id="@+id/inspector_header_view"
            android:layout_width="match_parent"
@@ -34,5 +33,13 @@
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

        <com.android.documentsui.inspector.DebugView
            android:id="@+id/inspector_debug_view"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone" />

    </LinearLayout>
</ScrollView>
+6 −4
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.documentsui.inspector.KeyValueRow
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
@@ -22,7 +23,7 @@
    android:paddingLeft="18dp">

    <TextView
        android:id="@+id/key"
        android:id="@+id/table_row_key"
        android:layout_height="wrap_content"
        android:layout_width="0dp"
        android:layout_weight="1"
@@ -31,11 +32,12 @@
    </TextView>

    <TextView
        android:id="@+id/value"
        android:id="@+id/table_row_value"
        android:layout_height="wrap_content"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:textColor="@color/inspector_value"
        android:textSize="14dp">
    </TextView>
</LinearLayout>
 No newline at end of file

</com.android.documentsui.inspector.KeyValueRow>
+1 −0
Original line number Diff line number Diff line
@@ -404,6 +404,7 @@ public abstract class AbstractActionHandler<T extends Activity & CommonAddons>

        mState.debugMode = enabled;
        mInjector.features.forceFeature(R.bool.feature_command_interceptor, enabled);
        mInjector.features.forceFeature(R.bool.feature_inspector, enabled);
        mActivity.invalidateOptionsMenu();

        if (enabled) {
+5 −0
Original line number Diff line number Diff line
@@ -104,6 +104,11 @@ public final class Shared {
     */
    public static final String EXTRA_BENCHMARK = "com.android.documentsui.benchmark";

    /**
     * Extra flag used to signify to inspector that debug section can be shown.
     */
    public static final String EXTRA_SHOW_DEBUG = "com.android.documentsui.SHOW_DEBUG";

    /**
     * Maximum number of items in a Binder transaction packet.
     */
Loading