zenfone6: Import stock motor service and Tile trigger motor

squash commits of Luca Stefani <luca.stefani.ge1@gmail.com> changes:

* Import stock motor service
* Add a tile to trigger camera rotation control
* Add props used by stock camera
* Don't enable undistortion
diff --git a/DeviceParts/AndroidManifest.xml b/DeviceParts/AndroidManifest.xml
index 7828f1b..f939be8 100644
--- a/DeviceParts/AndroidManifest.xml
+++ b/DeviceParts/AndroidManifest.xml
@@ -84,5 +84,14 @@
                     android:name="android.service.quicksettings.action.QS_TILE"/>
             </intent-filter>
         </service>
+         <service
+            android:name="org.omnirom.device.CameraTile"
+            android:icon="@drawable/ic_camera_tile"
+            android:label="@string/camera_label"
+            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
+            <intent-filter>
+                <action android:name="android.service.quicksettings.action.QS_TILE" />
+            </intent-filter>
+        </service>
     </application>
 </manifest>
diff --git a/DeviceParts/res/drawable/ic_camera_tile.xml b/DeviceParts/res/drawable/ic_camera_tile.xml
new file mode 100644
index 0000000..488f41b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_camera_tile.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="24dp"
+    android:width="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#000" android:pathData="M9,12C9,11.19 9.3,10.5 9.89,9.89C10.5,9.3 11.19,9 12,9C12.81,9 13.5,9.3 14.11,9.89C14.7,10.5 15,11.19 15,12C15,12.81 14.7,13.5 14.11,14.11C13.5,14.7 12.81,15 12,15C11.19,15 10.5,14.7 9.89,14.11C9.3,13.5 9,12.81 9,12M5.53,8.44L7.31,10.22L5.53,12L7.31,13.78L5.53,15.56L2,12L5.53,8.44M8.44,18.47L10.22,16.69L12,18.47L13.78,16.69L15.56,18.47L12,22L8.44,18.47M18.47,15.56L16.69,13.78L18.47,12L16.69,10.22L18.47,8.44L22,12L18.47,15.56M15.56,5.53L13.78,7.31L12,5.53L10.22,7.31L8.44,5.53L12,2L15.56,5.53Z" />
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/values/strings.xml b/DeviceParts/res/values/strings.xml
index 7d5917e..4b0a5ee 100644
--- a/DeviceParts/res/values/strings.xml
+++ b/DeviceParts/res/values/strings.xml
@@ -76,6 +76,7 @@
     <string name="torch_entry">Flashlight</string>
     <string name="disabled_entry">Disabled</string>
     <string name="camera_entry">Camera</string>
+    <string name="camera_label">Rotate camera</string>
     <string name="music_play_entry">Play / pause music</string>
     <string name="music_prev_entry">Prev track</string>
     <string name="music_next_entry">Next track</string>
diff --git a/DeviceParts/src/org/omnirom/device/CameraTile.java b/DeviceParts/src/org/omnirom/device/CameraTile.java
new file mode 100644
index 0000000..b1fe30f
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/CameraTile.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+package org.omnirom.device;
+
+import android.content.Intent;
+import android.graphics.drawable.Icon;
+import android.service.quicksettings.Tile;
+import android.service.quicksettings.TileService;
+
+public class CameraTile extends TileService {
+
+    @Override
+    public void onStartListening() {
+        super.onStartListening();
+
+        getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_camera_tile));
+        getQsTile().setState(Tile.STATE_ACTIVE);
+        getQsTile().updateTile();
+    }
+
+    @Override
+    public void onClick() {
+        super.onClick();
+
+        Intent intent = new Intent("com.asus.motorservice.action.WIDGET_BTN_CLICKED");
+        intent.setPackage("com.asus.motorservice");
+        sendBroadcast(intent);
+    }
+}
\ No newline at end of file