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

Commit 86ee9f37 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Hardware / Software Canvas comparison tool"

parents 62d3fd89 c3683b55
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2012 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.
#

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src)

LOCAL_PACKAGE_NAME := CanvasCompare

LOCAL_MODULE_TAGS := tests

LOCAL_JAVA_LIBRARIES := android.test.runner

include $(BUILD_PACKAGE)
+47 −0
Original line number Diff line number Diff line
<!-- Copyright (C) 2012 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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.test.hwuicompare" >

    <!-- for perfhud -->
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Holo.Light.NoActionBar">
        <activity
            android:name="AutomaticActivity"
            android:label="CanvasAutoCompare" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="ManualActivity"
            android:label="CanvasManualCompare" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <uses-library android:name="android.test.runner" />
    </application>
    <instrumentation
        android:name="android.test.InstrumentationTestRunner"
        android:targetPackage="com.android.test.hwuicompare"
        android:label="HW/SW Canvas comparison tool."/>

</manifest>
+24.4 KiB
Loading image diff...
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <com.android.test.hwuicompare.MainView
        android:id="@+id/hardware_view"
        android:layout_width="@dimen/layer_width"
        android:layout_height="@dimen/layer_width" />

    <ImageView
        android:id="@+id/software_image_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true" />

    <ImageView
        android:id="@+id/hardware_image_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true" />

</RelativeLayout>
+119 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:orientation="vertical" >

    <HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >

        <LinearLayout
            android:id="@+id/spinner_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal" />
    </HorizontalScrollView>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:baselineAligned="true"
        android:orientation="horizontal" >

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:orientation="horizontal" >

            <com.android.test.hwuicompare.MainView
                android:id="@+id/hardware_view"
                android:layout_width="@dimen/layer_width"
                android:layout_height="@dimen/layer_width" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:orientation="horizontal" >

            <com.android.test.hwuicompare.MainView
                android:id="@+id/software_view"
                android:layout_width="@dimen/layer_width"
                android:layout_height="@dimen/layer_width" />
        </LinearLayout>
    </LinearLayout>

    <ImageView
        android:id="@+id/compare_image_view"
        android:layout_width="@dimen/layer_width_double"
        android:layout_height="@dimen/layer_height_double"
        android:filter="false" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal" >

        <ImageButton
            android:id="@+id/previous"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:contentDescription="@string/previous_combination"
            android:src="@android:drawable/ic_media_previous" />

        <ImageButton
            android:id="@+id/next"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:contentDescription="@string/next_combination"
            android:src="@android:drawable/ic_media_next" />

        <TextView
            android:id="@+id/current_error"
            android:layout_width="100dp"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textAppearance="?android:attr/textAppearanceLarge" />

        <Button
            android:id="@+id/show_hardware_version"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/show_hardware_version" />

        <Button
            android:id="@+id/show_software_version"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/show_software_version" />

        <Button
            android:id="@+id/show_error_heatmap"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/show_error_heatmap" />
    </LinearLayout>

</LinearLayout>
Loading