diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-04-01 13:37:39 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-04-03 11:12:44 -0700 |
commit | 6e9fa1a4b74dc4e35470739cfd64881cb9bcc7b1 (patch) | |
tree | 1da9f58bf17952a7657bcc4d727102cfd94d539b /tests/LegacyAssistant | |
parent | 2fdeeabe78b0f54f3163b1b3741ac813828b3511 (diff) |
Add test assist to implement motion study
This change introduces another test VoiceInteractionService, Assist,
to test the full SystemUI -> assist layer motion when invoking
assist.
The old assist test project was renamed to LegacyAssist.
Change-Id: Iddf8a36a76083625f8aa4faecef1930e9952d05b
Diffstat (limited to 'tests/LegacyAssistant')
-rw-r--r-- | tests/LegacyAssistant/Android.mk | 11 | ||||
-rw-r--r-- | tests/LegacyAssistant/AndroidManifest.xml | 39 | ||||
-rw-r--r-- | tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_activated.png | bin | 0 -> 13757 bytes | |||
-rw-r--r-- | tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_normal.png | bin | 0 -> 5732 bytes | |||
-rw-r--r-- | tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_activated.png | bin | 0 -> 8786 bytes | |||
-rw-r--r-- | tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_normal.png | bin | 0 -> 4480 bytes | |||
-rw-r--r-- | tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_activated.png | bin | 0 -> 19647 bytes | |||
-rw-r--r-- | tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_normal.png | bin | 0 -> 7327 bytes | |||
-rw-r--r-- | tests/LegacyAssistant/res/drawable/ic_action_assist.xml | 36 | ||||
-rw-r--r-- | tests/LegacyAssistant/res/layout/assist_intent_activity.xml | 43 | ||||
-rw-r--r-- | tests/LegacyAssistant/res/values/strings.xml | 20 | ||||
-rw-r--r-- | tests/LegacyAssistant/src/com/google/android/test/legacyassistant/AssistActivity.java | 31 |
12 files changed, 180 insertions, 0 deletions
diff --git a/tests/LegacyAssistant/Android.mk b/tests/LegacyAssistant/Android.mk new file mode 100644 index 000000000000..0ad48d1ccef0 --- /dev/null +++ b/tests/LegacyAssistant/Android.mk @@ -0,0 +1,11 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_PACKAGE_NAME := LegacyAssistant + +LOCAL_MODULE_TAGS := tests +LOCAL_CERTIFICATE := platform + +include $(BUILD_PACKAGE) diff --git a/tests/LegacyAssistant/AndroidManifest.xml b/tests/LegacyAssistant/AndroidManifest.xml new file mode 100644 index 000000000000..7ae510379980 --- /dev/null +++ b/tests/LegacyAssistant/AndroidManifest.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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.google.android.test.legacyassistant"> + + <application android:label="@string/activity_title"> + + <activity android:name=".AssistActivity" + android:theme="@android:style/Theme.NoTitleBar"> + + <!-- Handle assist intent --> + <intent-filter> + <action android:name="android.intent.action.ASSIST" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + + <!-- Provide icon for search --> + <meta-data android:name="com.android.systemui.action_assist_icon" + android:resource="@drawable/ic_action_assist" /> + + </activity> + + </application> + +</manifest> diff --git a/tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_activated.png b/tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_activated.png Binary files differnew file mode 100644 index 000000000000..cea8ac4e2779 --- /dev/null +++ b/tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_activated.png diff --git a/tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_normal.png b/tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_normal.png Binary files differnew file mode 100644 index 000000000000..bb7702dca638 --- /dev/null +++ b/tests/LegacyAssistant/res/drawable-hdpi/ic_action_assist_normal.png diff --git a/tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_activated.png b/tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_activated.png Binary files differnew file mode 100644 index 000000000000..5841d82b22ae --- /dev/null +++ b/tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_activated.png diff --git a/tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_normal.png b/tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_normal.png Binary files differnew file mode 100644 index 000000000000..3851f03f8405 --- /dev/null +++ b/tests/LegacyAssistant/res/drawable-mdpi/ic_action_assist_normal.png diff --git a/tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_activated.png b/tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_activated.png Binary files differnew file mode 100644 index 000000000000..778db195a86f --- /dev/null +++ b/tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_activated.png diff --git a/tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_normal.png b/tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_normal.png Binary files differnew file mode 100644 index 000000000000..ad49125879a4 --- /dev/null +++ b/tests/LegacyAssistant/res/drawable-xhdpi/ic_action_assist_normal.png diff --git a/tests/LegacyAssistant/res/drawable/ic_action_assist.xml b/tests/LegacyAssistant/res/drawable/ic_action_assist.xml new file mode 100644 index 000000000000..05c4bf5796dc --- /dev/null +++ b/tests/LegacyAssistant/res/drawable/ic_action_assist.xml @@ -0,0 +1,36 @@ +<?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. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item + android:state_enabled="true" + android:state_active="false" + android:state_focused="false" + android:drawable="@drawable/ic_action_assist_normal" /> + + <item + android:state_enabled="true" + android:state_active="true" + android:state_focused="false" + android:drawable="@drawable/ic_action_assist_activated" /> + + <item + android:state_enabled="true" + android:state_active="false" + android:state_focused="true" + android:drawable="@drawable/ic_action_assist_activated" /> + +</selector> diff --git a/tests/LegacyAssistant/res/layout/assist_intent_activity.xml b/tests/LegacyAssistant/res/layout/assist_intent_activity.xml new file mode 100644 index 000000000000..49785bc78a26 --- /dev/null +++ b/tests/LegacyAssistant/res/layout/assist_intent_activity.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2009, 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. +*/ +--> + +<!-- This is the general lock screen which shows information about the + state of the device, as well as instructions on how to get past it + depending on the state of the device. It is the same for landscape + and portrait.--> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center"> + + <TextView android:id="@+id/label" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/search_label" + /> + + <EditText android:id="@+id/search_input" + android:layout_width="match_parent" + android:layout_height="wrap_content" + /> + +</LinearLayout> + diff --git a/tests/LegacyAssistant/res/values/strings.xml b/tests/LegacyAssistant/res/values/strings.xml new file mode 100644 index 000000000000..a59c1ef74c60 --- /dev/null +++ b/tests/LegacyAssistant/res/values/strings.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<resources> + <string name="activity_title">Assistant</string> + <string name="search_label">Orilla Search Engine</string> +</resources> diff --git a/tests/LegacyAssistant/src/com/google/android/test/legacyassistant/AssistActivity.java b/tests/LegacyAssistant/src/com/google/android/test/legacyassistant/AssistActivity.java new file mode 100644 index 000000000000..b3dbb1519359 --- /dev/null +++ b/tests/LegacyAssistant/src/com/google/android/test/legacyassistant/AssistActivity.java @@ -0,0 +1,31 @@ +/* + * 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. + */ + +package com.google.android.test.legacyassistant; + +import android.app.Activity; +import android.os.Bundle; +import com.google.android.test.legacyassistant.R; + +public class AssistActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.assist_intent_activity); + } + +} |