Stk: adaptive icon

Change-Id: I2370a03f5ad1c29194f70abedbe181b0b01d550a
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 18f3848..7e5946e 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -34,7 +34,7 @@
     <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
     <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/>
 
-    <application android:icon="@drawable/ic_launcher_sim_toolkit"
+    <application android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
         android:clearTaskOnLaunch="true"
         android:process="com.android.phone"
@@ -70,7 +70,7 @@
 
         <activity android:name="StkMenuActivity"
             android:theme="@style/StkTheme"
-            android:icon="@drawable/ic_launcher_sim_toolkit"
+            android:icon="@mipmap/ic_launcher"
             android:label="@string/app_name"
             android:configChanges="orientation|locale|screenSize|keyboardHidden|mnc|mcc"
             android:exported="false"
@@ -85,7 +85,7 @@
 
         <activity android:name="StkInputActivity"
             android:label="@string/app_name"
-            android:icon="@drawable/ic_launcher_sim_toolkit"
+            android:icon="@mipmap/ic_launcher"
             android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"
             android:configChanges="orientation|locale|screenSize|keyboardHidden"
             android:exported="false"
diff --git a/res/drawable-anydpi/ic_foreground.xml b/res/drawable-anydpi/ic_foreground.xml
new file mode 100644
index 0000000..b6de9be
--- /dev/null
+++ b/res/drawable-anydpi/ic_foreground.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="108dp"
+        android:height="108dp"
+        android:viewportWidth="136.18182"
+        android:viewportHeight="136.18182">
+    <group android:translateX="47.721382"
+            android:translateY="51.721382">
+        <path
+            android:pathData="M7.94,0L0,0L0,16.6L7.94,16.6L7.94,0ZM16.31,0L16.31,8.2L24.69,8.2L24.69,0L16.31,0ZM33.06,0L33.06,16.6L41.44,16.6L41.44,0L33.06,0ZM0,33.4L7.94,33.4L7.94,25L0,25L0,33.4ZM41.44,33.4L33.06,33.4L33.06,25L41.44,25L41.44,33.4ZM24.69,33.4L16.31,33.4L16.31,16.6L24.69,16.6L24.69,33.4Z"
+            android:fillType="evenOdd"
+            android:fillColor="#FF8205"/>
+    </group>
+</vector>
diff --git a/res/drawable-hdpi/ic_launcher_sim_toolkit.png b/res/drawable-hdpi/ic_launcher_sim_toolkit.png
deleted file mode 100644
index d6ebaaf..0000000
--- a/res/drawable-hdpi/ic_launcher_sim_toolkit.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_sim_toolkit.png b/res/drawable-mdpi/ic_launcher_sim_toolkit.png
deleted file mode 100644
index 9ff189f..0000000
--- a/res/drawable-mdpi/ic_launcher_sim_toolkit.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_sim_toolkit.png b/res/drawable-xhdpi/ic_launcher_sim_toolkit.png
deleted file mode 100644
index fcc57be..0000000
--- a/res/drawable-xhdpi/ic_launcher_sim_toolkit.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_launcher_sim_toolkit.png b/res/drawable-xxhdpi/ic_launcher_sim_toolkit.png
deleted file mode 100644
index 9aed66b..0000000
--- a/res/drawable-xxhdpi/ic_launcher_sim_toolkit.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_launcher_sim_toolkit.png b/res/drawable-xxxhdpi/ic_launcher_sim_toolkit.png
deleted file mode 100644
index b56c624..0000000
--- a/res/drawable-xxxhdpi/ic_launcher_sim_toolkit.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-anydpi/ic_launcher.xml b/res/mipmap-anydpi/ic_launcher.xml
new file mode 100644
index 0000000..92971f7
--- /dev/null
+++ b/res/mipmap-anydpi/ic_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@color/ic_background"/>
+    <foreground android:drawable="@drawable/ic_foreground"/>
+</adaptive-icon>
diff --git a/res/values/lineage_colors.xml b/res/values/lineage_colors.xml
new file mode 100644
index 0000000..d689360
--- /dev/null
+++ b/res/values/lineage_colors.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2018 The LineageOS 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>
+    <color name="ic_background">#E0E0E0</color>
+</resources>
diff --git a/src/com/android/stk/StkAppInstaller.java b/src/com/android/stk/StkAppInstaller.java
index 9439194..0db03fe 100644
--- a/src/com/android/stk/StkAppInstaller.java
+++ b/src/com/android/stk/StkAppInstaller.java
@@ -44,7 +44,7 @@
         if (pm != null) {
             ComponentName component = new ComponentName(context, StkMain.class);
             int userId = context.getUserId();
-            int icon = R.drawable.ic_launcher_sim_toolkit;
+            int icon = R.mipmap.ic_launcher;
             try {
                 try {
                     if (label != null) {
diff --git a/src/com/android/stk/StkLauncherActivity.java b/src/com/android/stk/StkLauncherActivity.java
index 907c6ee..ec3568d 100644
--- a/src/com/android/stk/StkLauncherActivity.java
+++ b/src/com/android/stk/StkLauncherActivity.java
@@ -73,7 +73,7 @@
         mTitleIconView = (ImageView) findViewById(R.id.title_icon);
         mTitleTextView.setText(R.string.app_name);
         mBitMap = BitmapFactory.decodeResource(getResources(),
-                R.drawable.ic_launcher_sim_toolkit);
+                R.mipmap.ic_launcher);
     }
 
     @Override