aboutsummaryrefslogtreecommitdiff
path: root/tests/EmbeddedKitchenSinkApp/res
diff options
context:
space:
mode:
authorPavel Maltsev <pavelm@google.com>2017-07-16 19:48:57 -0700
committerPavel Maltsev <pavelm@google.com>2017-07-19 19:23:12 -0700
commit905968cf95d4c8608d6d9351b5dd10fe994a1220 (patch)
treea05c210fae4e5139f12ce852d7066e17fd2abc32 /tests/EmbeddedKitchenSinkApp/res
parent909546fc1aea53bb86fb1a91d11a11bd2cd4befd (diff)
downloadCar-905968cf95d4c8608d6d9351b5dd10fe994a1220.tar.gz
Allow activities in instrument cluster
- Added new CarInstrumentClusterManager to start activity in the cluster and subscribe to cluster specific events - Cluster vendor implementation (InstrumentClusterRenderingService) was extended, now it can notify Car Service with ActivityOptions that holds info how to launch activity in the cluster for specific category, also it can send additional info such as unobscured bounds (ClusterActivityState) - added DirectRenderingClusterSample which is an example of vendor implementation that utilizes new features - added FakeClusterNavigationActivity in Kitchensink which is a dummy nav activity that can be run in the cluster, it has appropriate permissions and activity category in manifest Test: kitchensink Bug: b/37500371 Change-Id: Ic4b3709a3b7e1310dbd1c499990eea64479b3333
Diffstat (limited to 'tests/EmbeddedKitchenSinkApp/res')
-rw-r--r--tests/EmbeddedKitchenSinkApp/res/layout/fake_cluster_navigation_activity.xml29
-rw-r--r--tests/EmbeddedKitchenSinkApp/res/layout/instrument_cluster.xml17
-rw-r--r--tests/EmbeddedKitchenSinkApp/res/layout/kitchen_content.xml15
-rw-r--r--tests/EmbeddedKitchenSinkApp/res/values/strings.xml7
4 files changed, 56 insertions, 12 deletions
diff --git a/tests/EmbeddedKitchenSinkApp/res/layout/fake_cluster_navigation_activity.xml b/tests/EmbeddedKitchenSinkApp/res/layout/fake_cluster_navigation_activity.xml
new file mode 100644
index 0000000000..11f0a6b862
--- /dev/null
+++ b/tests/EmbeddedKitchenSinkApp/res/layout/fake_cluster_navigation_activity.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/app_bg">
+
+ <ImageView
+ android:id="@+id/unobscuredArea"
+ android:alpha="0.25"
+ android:background="@android:color/white"
+ android:layout_height="0dp"
+ android:layout_width="0dp"/>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/tests/EmbeddedKitchenSinkApp/res/layout/instrument_cluster.xml b/tests/EmbeddedKitchenSinkApp/res/layout/instrument_cluster.xml
index 71c7fca195..cb785a9790 100644
--- a/tests/EmbeddedKitchenSinkApp/res/layout/instrument_cluster.xml
+++ b/tests/EmbeddedKitchenSinkApp/res/layout/instrument_cluster.xml
@@ -17,26 +17,25 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="160dp"
+ android:layout_marginTop="40dp"
android:layout_marginStart="40dp">
<LinearLayout
android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
- android:text="@string/cluster_start" android:id="@+id/cluster_start_button"
- android:layout_column="0" android:textSize="32sp"/>
+ android:text="@string/cluster_start" android:id="@+id/cluster_start_button"/>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
- android:text="@string/cluster_turn_left" android:id="@+id/cluster_turn_left_button"
- android:layout_column="0" android:textSize="32sp"/>
+ android:text="@string/cluster_turn_left" android:id="@+id/cluster_turn_left_button"/>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content"
- android:text="@string/cluster_stop" android:id="@+id/cluster_stop_button"
- android:layout_column="0" android:textSize="32sp"/>
+ android:text="@string/cluster_stop" android:id="@+id/cluster_stop_button"/>
+ <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
+ android:text="@string/cluster_start_activity" android:id="@+id/cluster_start_activity"/>
</LinearLayout>
</LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/tests/EmbeddedKitchenSinkApp/res/layout/kitchen_content.xml b/tests/EmbeddedKitchenSinkApp/res/layout/kitchen_content.xml
index 75545088ed..49497a2b0c 100644
--- a/tests/EmbeddedKitchenSinkApp/res/layout/kitchen_content.xml
+++ b/tests/EmbeddedKitchenSinkApp/res/layout/kitchen_content.xml
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+
<!-- We use this container to place kitchen app fragments. It insets the fragment contents -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/kitchen_content"
diff --git a/tests/EmbeddedKitchenSinkApp/res/values/strings.xml b/tests/EmbeddedKitchenSinkApp/res/values/strings.xml
index 72e08fa1eb..75fbceb158 100644
--- a/tests/EmbeddedKitchenSinkApp/res/values/strings.xml
+++ b/tests/EmbeddedKitchenSinkApp/res/values/strings.xml
@@ -113,10 +113,11 @@
<string name="open_kb_button">Hide/Show Input</string>
<!-- instrument cluster -->
- <string name="cluster_start">Start Nav</string>
- <string name="cluster_turn_left">Turn left</string>
- <string name="cluster_stop">Stop Nav</string>
+ <string name="cluster_start">Start metadata</string>
+ <string name="cluster_turn_left">Send turn-by-turn</string>
+ <string name="cluster_stop">Stop metadata</string>
<string name="cluster_nav_app_context_loss">Navigation app context lost!</string>
+ <string name="cluster_start_activity">Start Nav Activity</string>
<!-- input test -->
<string name="volume_up">Volume +</string>