summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Chen2016-10-20 13:50:11 -0500
committerAnthony Chen2016-10-20 13:50:40 -0500
commit90e57440a1164b8224c945b4277cbd7df8c1bab5 (patch)
treef60b1167c1e584b379a3ddf3a797b51a643219ac /car-maps-placeholder
parent4f5e5f3f7106956358a45cbb3e48fb09d330b571 (diff)
downloadplatform-packages-services-car-90e57440a1164b8224c945b4277cbd7df8c1bab5.tar.gz
platform-packages-services-car-90e57440a1164b8224c945b4277cbd7df8c1bab5.tar.xz
platform-packages-services-car-90e57440a1164b8224c945b4277cbd7df8c1bab5.zip
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
Diffstat (limited to 'car-maps-placeholder')
-rw-r--r--car-maps-placeholder/Android.mk37
-rw-r--r--car-maps-placeholder/AndroidManifest.xml39
-rw-r--r--car-maps-placeholder/res/drawable-hdpi/logo_my_maps.pngbin0 -> 2040 bytes
-rw-r--r--car-maps-placeholder/res/drawable-mdpi/logo_my_maps.pngbin0 -> 1282 bytes
-rw-r--r--car-maps-placeholder/res/drawable-xhdpi/logo_my_maps.pngbin0 -> 2561 bytes
-rw-r--r--car-maps-placeholder/res/drawable-xxhdpi/logo_my_maps.pngbin0 -> 4038 bytes
-rw-r--r--car-maps-placeholder/res/layout/maps_placeholder_activity.xml28
-rw-r--r--car-maps-placeholder/res/values/dimens.xml19
-rw-r--r--car-maps-placeholder/res/values/strings.xml23
-rw-r--r--car-maps-placeholder/res/values/themes.xml20
-rw-r--r--car-maps-placeholder/src/com/android/car/mapsplaceholder/MapsPlaceholderActivity.java31
11 files changed, 197 insertions, 0 deletions
diff --git a/car-maps-placeholder/Android.mk b/car-maps-placeholder/Android.mk
new file mode 100644
index 00000000..a8bcd044
--- /dev/null
+++ b/car-maps-placeholder/Android.mk
@@ -0,0 +1,37 @@
1#
2# Copyright (C) 2016 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17LOCAL_PATH:= $(call my-dir)
18
19include $(CLEAR_VARS)
20
21LOCAL_SRC_FILES := $(call all-java-files-under, src)
22
23LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
24
25LOCAL_PACKAGE_NAME := CarMapsPlaceholder
26
27LOCAL_CERTIFICATE := platform
28
29LOCAL_MODULE_TAGS := optional
30
31LOCAL_PROGUARD_ENABLED := disabled
32
33LOCAL_DEX_PREOPT := false
34
35include packages/services/Car/car-support-lib/car-support.mk
36
37include $(BUILD_PACKAGE)
diff --git a/car-maps-placeholder/AndroidManifest.xml b/car-maps-placeholder/AndroidManifest.xml
new file mode 100644
index 00000000..e166420c
--- /dev/null
+++ b/car-maps-placeholder/AndroidManifest.xml
@@ -0,0 +1,39 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2016 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 -->
17
18<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19 package="com.android.car.mapsplaceholder">
20 <uses-sdk
21 android:minSdkVersion="23"
22 android:targetSdkVersion="23" />
23
24 <application android:label="@string/app_name"
25 android:icon="@drawable/logo_my_maps" >
26
27 <activity android:name=".MapsPlaceholderActivity"
28 android:theme="@style/CarMapsTheme"
29 android:launchMode="singleTask"
30 android:label="@string/app_name"
31 android:resizeableActivity="true">
32 <intent-filter>
33 <action android:name="android.intent.action.MAIN" />
34 <category android:name="android.intent.category.LAUNCHER" />
35 <category android:name="android.intent.category.APP_MAPS" />
36 </intent-filter>
37 </activity>
38 </application>
39</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 00000000..36eb65f8
--- /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 00000000..1531bc7c
--- /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 00000000..6edc35c3
--- /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 00000000..97e7e96c
--- /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 00000000..d35ce299
--- /dev/null
+++ b/car-maps-placeholder/res/layout/maps_placeholder_activity.xml
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<FrameLayout
17 xmlns:android="http://schemas.android.com/apk/res/android"
18 android:background="@color/car_green_500"
19 android:layout_width="match_parent"
20 android:layout_height="match_parent" >
21
22 <TextView
23 android:layout_gravity="center"
24 android:layout_width="@dimen/error_text_container_width"
25 android:layout_height="wrap_content"
26 android:text="@string/error_text"
27 style="@style/CarBody1.Light" />
28</FrameLayout>
diff --git a/car-maps-placeholder/res/values/dimens.xml b/car-maps-placeholder/res/values/dimens.xml
new file mode 100644
index 00000000..d826b531
--- /dev/null
+++ b/car-maps-placeholder/res/values/dimens.xml
@@ -0,0 +1,19 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<resources>
17 <!-- The width of the container holding the error text. -->
18 <dimen name="error_text_container_width">600dp</dimen>
19</resources>
diff --git a/car-maps-placeholder/res/values/strings.xml b/car-maps-placeholder/res/values/strings.xml
new file mode 100644
index 00000000..ae66690d
--- /dev/null
+++ b/car-maps-placeholder/res/values/strings.xml
@@ -0,0 +1,23 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<resources>
17 <!-- Application launcher name. -->
18 <string name="app_name">Maps</string>
19
20 <!-- Text to convey to the user that the current device does not have a maps application. -->
21 <string name="error_text">No maps application installed. Please contact your car
22 manufacturer.</string>
23</resources>
diff --git a/car-maps-placeholder/res/values/themes.xml b/car-maps-placeholder/res/values/themes.xml
new file mode 100644
index 00000000..93ee5a7d
--- /dev/null
+++ b/car-maps-placeholder/res/values/themes.xml
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<resources>
17 <style name="CarMapsTheme" parent="@android:style/Theme.Material.Light.NoActionBar">
18 <item name="android:statusBarColor">@color/car_green_700</item>
19 </style>
20</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 00000000..755af72c
--- /dev/null
+++ b/car-maps-placeholder/src/com/android/car/mapsplaceholder/MapsPlaceholderActivity.java
@@ -0,0 +1,31 @@
1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.car.mapsplaceholder;
18
19import android.app.Activity;
20import android.os.Bundle;
21
22/**
23 * An activity that notifies the user that no maps application has been installed.
24 */
25public class MapsPlaceholderActivity extends Activity {
26 @Override
27 protected void onCreate(Bundle savedInstanceState) {
28 super.onCreate(savedInstanceState);
29 setContentView(R.layout.maps_placeholder_activity);
30 }
31}