Placeholder application for maps.

This application has a TextView that conveys to the user that no maps
app has been installed on the device.

Test: manually tested
Change-Id: Id009f2e9d6a253f609de8f0485ffa58df4541d84
diff --git a/car-maps-placeholder/Android.mk b/car-maps-placeholder/Android.mk
new file mode 100644
index 0000000..a8bcd04
--- /dev/null
+++ b/car-maps-placeholder/Android.mk
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2016 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)
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := CarMapsPlaceholder
+
+LOCAL_CERTIFICATE := platform
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+LOCAL_DEX_PREOPT := false
+
+include packages/services/Car/car-support-lib/car-support.mk
+
+include $(BUILD_PACKAGE)
diff --git a/car-maps-placeholder/AndroidManifest.xml b/car-maps-placeholder/AndroidManifest.xml
new file mode 100644
index 0000000..e166420
--- /dev/null
+++ b/car-maps-placeholder/AndroidManifest.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2016 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.car.mapsplaceholder">
+    <uses-sdk
+        android:minSdkVersion="23"
+        android:targetSdkVersion="23" />
+
+    <application android:label="@string/app_name"
+        android:icon="@drawable/logo_my_maps" >
+
+        <activity android:name=".MapsPlaceholderActivity"
+            android:theme="@style/CarMapsTheme"
+            android:launchMode="singleTask"
+            android:label="@string/app_name"
+            android:resizeableActivity="true">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+                <category android:name="android.intent.category.APP_MAPS" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/car-maps-placeholder/res/drawable-hdpi/logo_my_maps.png b/car-maps-placeholder/res/drawable-hdpi/logo_my_maps.png
new file mode 100644
index 0000000..36eb65f
--- /dev/null
+++ b/car-maps-placeholder/res/drawable-hdpi/logo_my_maps.png
Binary files differ
diff --git a/car-maps-placeholder/res/drawable-mdpi/logo_my_maps.png b/car-maps-placeholder/res/drawable-mdpi/logo_my_maps.png
new file mode 100644
index 0000000..1531bc7
--- /dev/null
+++ b/car-maps-placeholder/res/drawable-mdpi/logo_my_maps.png
Binary files differ
diff --git a/car-maps-placeholder/res/drawable-xhdpi/logo_my_maps.png b/car-maps-placeholder/res/drawable-xhdpi/logo_my_maps.png
new file mode 100644
index 0000000..6edc35c
--- /dev/null
+++ b/car-maps-placeholder/res/drawable-xhdpi/logo_my_maps.png
Binary files differ
diff --git a/car-maps-placeholder/res/drawable-xxhdpi/logo_my_maps.png b/car-maps-placeholder/res/drawable-xxhdpi/logo_my_maps.png
new file mode 100644
index 0000000..97e7e96
--- /dev/null
+++ b/car-maps-placeholder/res/drawable-xxhdpi/logo_my_maps.png
Binary files differ
diff --git a/car-maps-placeholder/res/layout/maps_placeholder_activity.xml b/car-maps-placeholder/res/layout/maps_placeholder_activity.xml
new file mode 100644
index 0000000..d35ce29
--- /dev/null
+++ b/car-maps-placeholder/res/layout/maps_placeholder_activity.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:background="@color/car_green_500"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <TextView
+        android:layout_gravity="center"
+        android:layout_width="@dimen/error_text_container_width"
+        android:layout_height="wrap_content"
+        android:text="@string/error_text"
+        style="@style/CarBody1.Light" />
+</FrameLayout>
diff --git a/car-maps-placeholder/res/values/dimens.xml b/car-maps-placeholder/res/values/dimens.xml
new file mode 100644
index 0000000..d826b53
--- /dev/null
+++ b/car-maps-placeholder/res/values/dimens.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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>
+    <!-- The width of the container holding the error text. -->
+    <dimen name="error_text_container_width">600dp</dimen>
+</resources>
diff --git a/car-maps-placeholder/res/values/strings.xml b/car-maps-placeholder/res/values/strings.xml
new file mode 100644
index 0000000..ae66690
--- /dev/null
+++ b/car-maps-placeholder/res/values/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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>
+    <!-- Application launcher name. -->
+    <string name="app_name">Maps</string>
+
+    <!-- Text to convey to the user that the current device does not have a maps application. -->
+    <string name="error_text">No maps application installed. Please contact your car
+        manufacturer.</string>
+</resources>
diff --git a/car-maps-placeholder/res/values/themes.xml b/car-maps-placeholder/res/values/themes.xml
new file mode 100644
index 0000000..93ee5a7
--- /dev/null
+++ b/car-maps-placeholder/res/values/themes.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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>
+    <style name="CarMapsTheme" parent="@android:style/Theme.Material.Light.NoActionBar">
+        <item name="android:statusBarColor">@color/car_green_700</item>
+    </style>
+</resources>
diff --git a/car-maps-placeholder/src/com/android/car/mapsplaceholder/MapsPlaceholderActivity.java b/car-maps-placeholder/src/com/android/car/mapsplaceholder/MapsPlaceholderActivity.java
new file mode 100644
index 0000000..755af72
--- /dev/null
+++ b/car-maps-placeholder/src/com/android/car/mapsplaceholder/MapsPlaceholderActivity.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 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.android.car.mapsplaceholder;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+/**
+ * An activity that notifies the user that no maps application has been installed.
+ */
+public class MapsPlaceholderActivity extends Activity {
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.maps_placeholder_activity);
+    }
+}