summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2018-12-05 10:02:42 -0800
committerHyunyoung Song <hyunyoungs@google.com>2018-12-05 11:21:27 -0800
commit7d9ffd99a32a8f65bcee45b72018dff0ba644aa6 (patch)
treecddabadc78fbd327ab6a8e13fd57f954f081ff79
parent832a305fff1121c8009e1e59f91f3ddf8af875f8 (diff)
Add the three icon shapes as overlays
Bug: 118757933 Test: $ adb shell cmd overlay [enable|disable] --user 0 \ com.android.theme.icon.[square|squircle|roundedrect|teardrop] Change-Id: If269b777c80a213e7302e8d609807495705b9f57
-rw-r--r--packages/overlays/IconShapeRoundedRectOverlay/Android.mk30
-rw-r--r--packages/overlays/IconShapeRoundedRectOverlay/AndroidManifest.xml27
-rw-r--r--packages/overlays/IconShapeRoundedRectOverlay/res/values/config.xml26
-rw-r--r--packages/overlays/IconShapeRoundedRectOverlay/res/values/strings.xml23
-rw-r--r--packages/overlays/IconShapeSquareOverlay/Android.mk (renamed from packages/overlays/AdaptiveIconChangeOverlay/Android.mk)4
-rw-r--r--packages/overlays/IconShapeSquareOverlay/AndroidManifest.xml (renamed from packages/overlays/AdaptiveIconChangeOverlay/AndroidManifest.xml)2
-rw-r--r--packages/overlays/IconShapeSquareOverlay/res/values/config.xml (renamed from packages/overlays/AdaptiveIconChangeOverlay/res/values/config.xml)0
-rw-r--r--packages/overlays/IconShapeSquareOverlay/res/values/strings.xml (renamed from packages/overlays/AdaptiveIconChangeOverlay/res/values/strings.xml)4
-rw-r--r--packages/overlays/IconShapeSquircleOverlay/Android.mk30
-rw-r--r--packages/overlays/IconShapeSquircleOverlay/AndroidManifest.xml27
-rw-r--r--packages/overlays/IconShapeSquircleOverlay/res/values/config.xml26
-rw-r--r--packages/overlays/IconShapeSquircleOverlay/res/values/strings.xml23
-rw-r--r--packages/overlays/IconShapeTeardropOverlay/Android.mk30
-rw-r--r--packages/overlays/IconShapeTeardropOverlay/AndroidManifest.xml27
-rw-r--r--packages/overlays/IconShapeTeardropOverlay/res/values/config.xml26
-rw-r--r--packages/overlays/IconShapeTeardropOverlay/res/values/strings.xml23
16 files changed, 323 insertions, 5 deletions
diff --git a/packages/overlays/IconShapeRoundedRectOverlay/Android.mk b/packages/overlays/IconShapeRoundedRectOverlay/Android.mk
new file mode 100644
index 000000000000..a734a6b46947
--- /dev/null
+++ b/packages/overlays/IconShapeRoundedRectOverlay/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright 2018, 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_RRO_THEME := IconShapeRoundedRect
+LOCAL_CERTIFICATE := platform
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconShapeRoundedRectOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeRoundedRectOverlay/AndroidManifest.xml b/packages/overlays/IconShapeRoundedRectOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..39c082b59604
--- /dev/null
+++ b/packages/overlays/IconShapeRoundedRectOverlay/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<!--
+/**
+ * Copyright (c) 2018, 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.theme.icon.roundedrect"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="android.theme.customization.adaptive_icon_shape"
+ android:priority="1"/>
+
+ <application android:label="@string/icon_shape_roundedrect_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconShapeRoundedRectOverlay/res/values/config.xml b/packages/overlays/IconShapeRoundedRectOverlay/res/values/config.xml
new file mode 100644
index 000000000000..f024615190ab
--- /dev/null
+++ b/packages/overlays/IconShapeRoundedRectOverlay/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Specifies the path that is used by AdaptiveIconDrawable class to crop launcher icons. -->
+ <string name="config_icon_mask" translatable="false">"M50,0L92,0C96.42,0 100,4.58 100 8L100,92C100, 96.42 96.42 100 92 100L8 100C4.58, 100 0 96.42 0 92L0 8 C 0 4.42 4.42 0 8 0L50 0Z"</string>
+ <!-- Flag indicating whether round icons should be parsed from the application manifest. -->
+ <bool name="config_useRoundIcon">false</bool>
+
+</resources>
+
diff --git a/packages/overlays/IconShapeRoundedRectOverlay/res/values/strings.xml b/packages/overlays/IconShapeRoundedRectOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..dc5c196c97aa
--- /dev/null
+++ b/packages/overlays/IconShapeRoundedRectOverlay/res/values/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2018, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Rounded corner rectangle overlay -->
+ <string name="icon_shape_roundedrect_overlay" translatable="false">RoundedRectangle Icons</string>
+
+</resources>
diff --git a/packages/overlays/AdaptiveIconChangeOverlay/Android.mk b/packages/overlays/IconShapeSquareOverlay/Android.mk
index 6e3b8cbbcf2f..217da9feb534 100644
--- a/packages/overlays/AdaptiveIconChangeOverlay/Android.mk
+++ b/packages/overlays/IconShapeSquareOverlay/Android.mk
@@ -17,14 +17,14 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_RRO_THEME := SquareIcon
+LOCAL_RRO_THEME := IconShapeSquare
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_PACKAGE_NAME := SquareIconOverlay
+LOCAL_PACKAGE_NAME := IconShapeSquareOverlay
LOCAL_SDK_VERSION := current
include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AdaptiveIconChangeOverlay/AndroidManifest.xml b/packages/overlays/IconShapeSquareOverlay/AndroidManifest.xml
index 33da51047bf0..235fdeb22648 100644
--- a/packages/overlays/AdaptiveIconChangeOverlay/AndroidManifest.xml
+++ b/packages/overlays/IconShapeSquareOverlay/AndroidManifest.xml
@@ -23,5 +23,5 @@
android:category="android.theme.customization.adaptive_icon_shape"
android:priority="1"/>
- <application android:label="@string/square_icon_overlay" android:hasCode="false"/>
+ <application android:label="@string/icon_shape_square_overlay" android:hasCode="false"/>
</manifest>
diff --git a/packages/overlays/AdaptiveIconChangeOverlay/res/values/config.xml b/packages/overlays/IconShapeSquareOverlay/res/values/config.xml
index 54623f5c9fb0..54623f5c9fb0 100644
--- a/packages/overlays/AdaptiveIconChangeOverlay/res/values/config.xml
+++ b/packages/overlays/IconShapeSquareOverlay/res/values/config.xml
diff --git a/packages/overlays/AdaptiveIconChangeOverlay/res/values/strings.xml b/packages/overlays/IconShapeSquareOverlay/res/values/strings.xml
index 64b7d0dc16b5..4fd39ff26bae 100644
--- a/packages/overlays/AdaptiveIconChangeOverlay/res/values/strings.xml
+++ b/packages/overlays/IconShapeSquareOverlay/res/values/strings.xml
@@ -17,7 +17,7 @@
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Square icon overlay [DO NOT TRANSLATE] -->
- <string name="square_icon_overlay">Square Icons</string>
+ <!-- Square icon overlay -->
+ <string name="icon_shape_square_overlay" translatable="false">Square Icons</string>
</resources>
diff --git a/packages/overlays/IconShapeSquircleOverlay/Android.mk b/packages/overlays/IconShapeSquircleOverlay/Android.mk
new file mode 100644
index 000000000000..fd3bfa06de83
--- /dev/null
+++ b/packages/overlays/IconShapeSquircleOverlay/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright 2018, 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_RRO_THEME := IconShapeSquircle
+LOCAL_CERTIFICATE := platform
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconShapeSquircleOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeSquircleOverlay/AndroidManifest.xml b/packages/overlays/IconShapeSquircleOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..ca618e4142b9
--- /dev/null
+++ b/packages/overlays/IconShapeSquircleOverlay/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<!--
+/**
+ * Copyright (c) 2018, 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.theme.icon.squircle"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="android.theme.customization.adaptive_icon_shape"
+ android:priority="1"/>
+
+ <application android:label="@string/icon_shape_squircle_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconShapeSquircleOverlay/res/values/config.xml b/packages/overlays/IconShapeSquircleOverlay/res/values/config.xml
new file mode 100644
index 000000000000..eaf7de3b153d
--- /dev/null
+++ b/packages/overlays/IconShapeSquircleOverlay/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Specifies the path that is used by AdaptiveIconDrawable class to crop launcher icons. -->
+ <string name="config_icon_mask" translatable="false">"M50,0 C10,0 0,10 0,50 0,90 10,100 50,100 90,100 100,90 100,50 100,10 90,0 50,0 Z"</string>
+ <!-- Flag indicating whether round icons should be parsed from the application manifest. -->
+ <bool name="config_useRoundIcon">false</bool>
+
+</resources>
+
diff --git a/packages/overlays/IconShapeSquircleOverlay/res/values/strings.xml b/packages/overlays/IconShapeSquircleOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..b7c001c68a30
--- /dev/null
+++ b/packages/overlays/IconShapeSquircleOverlay/res/values/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2018, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Squircle icon shape overlay -->
+ <string name="icon_shape_squircle_overlay" translatable="false">Square Icons</string>
+
+</resources>
diff --git a/packages/overlays/IconShapeTeardropOverlay/Android.mk b/packages/overlays/IconShapeTeardropOverlay/Android.mk
new file mode 100644
index 000000000000..ea43423f93ba
--- /dev/null
+++ b/packages/overlays/IconShapeTeardropOverlay/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright 2018, 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_RRO_THEME := IconShapeTeardrop
+LOCAL_CERTIFICATE := platform
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconShapeTeardropOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconShapeTeardropOverlay/AndroidManifest.xml b/packages/overlays/IconShapeTeardropOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..b7d5ecb820d9
--- /dev/null
+++ b/packages/overlays/IconShapeTeardropOverlay/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<!--
+/**
+ * Copyright (c) 2018, 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.theme.icon.teardrop"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android"
+ android:category="android.theme.customization.adaptive_icon_shape"
+ android:priority="1"/>
+
+ <application android:label="@string/icon_shape_teardrop_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconShapeTeardropOverlay/res/values/config.xml b/packages/overlays/IconShapeTeardropOverlay/res/values/config.xml
new file mode 100644
index 000000000000..43ad04d69c73
--- /dev/null
+++ b/packages/overlays/IconShapeTeardropOverlay/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Specifies the path that is used by AdaptiveIconDrawable class to crop launcher icons. -->
+ <string name="config_icon_mask" translatable="false">"M50,0A50,50,0,0 1 100,50 L100,85 A15,15,0,0 1 85,100 L50,100 A50,50,0,0 1 50,0z"</string>
+ <!-- Flag indicating whether round icons should be parsed from the application manifest. -->
+ <bool name="config_useRoundIcon">false</bool>
+
+</resources>
+
diff --git a/packages/overlays/IconShapeTeardropOverlay/res/values/strings.xml b/packages/overlays/IconShapeTeardropOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..d946ee8f97f2
--- /dev/null
+++ b/packages/overlays/IconShapeTeardropOverlay/res/values/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2018, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Teardrop icon overlay -->
+ <string name="icon_shape_teardrop_overlay" translatable="false">Teardrop Icons</string>
+
+</resources>