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
diff --git a/proprietary-files.txt b/proprietary-files.txt
index ee3602d..350957c 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -9,6 +9,13 @@
 lib64/libaptX_encoder.so|0cebad28afcf29f931bdc2d24fce2730dc882ecf
 lib64/libaptXHD_encoder.so|90f47f10af28b3ead143200cb4370b847c513127
 
+# Camera
+-priv-app/MotorService/MotorService.apk
+priv-app/MotorService/lib/arm64/libAsusLaserSensorHAL.so
+priv-app/MotorService/lib/arm64/libAsusMotorDriverHAL.so
+priv-app/MotorService/lib/arm64/libjni_laser.so
+priv-app/MotorService/lib/arm64/libjni_motor.so
+
 # CNE
 etc/permissions/cneapiclient.xml
 etc/permissions/com.quicinc.cne.xml
diff --git a/system.prop b/system.prop
index 40d888c..7786d61 100644
--- a/system.prop
+++ b/system.prop
@@ -1,3 +1,28 @@
+# Camera
+persist.camera.capture.hdrplus.dump=0
+ro.asus.camera.ai_scene_mode=0:1;1:1;2:1;3:1
+ro.asus.camera.cam0.eis.sup_list=4K@60,4K@30,FHD@60,FHD@30,HD@30,TV@30
+ro.asus.camera.cam0.exposure_time_range=312500,32000000000
+ro.asus.camera.cam0.preview_fps_range=8,45
+ro.asus.camera.cam0.stream_list=1P/2Y/1J
+ro.asus.camera.cam0.video_fps=HD@60,FHD@60,4K@60
+ro.asus.camera.cam1.eis.sup_list=4K@60,4K@30,FHD@60,FHD@30,HD@30,TV@30
+ro.asus.camera.cam1.exposure_time_range=312500,32000000000
+ro.asus.camera.cam1.preview_fps_range=8,45
+ro.asus.camera.cam1.stream_list=1P/2Y/1J
+ro.asus.camera.cam1.video_fps=HD@60,FHD@60,4K@60
+ro.asus.camera.cam2.eis.sup_list=4K@60,4K@30,FHD@60,FHD@30,HD@30,TV@30
+ro.asus.camera.cam2.exposure_time_range=100000,16000000000
+ro.asus.camera.cam2.video_fps=HD@60,FHD@60,4K@30
+ro.asus.camera.cam3.eis.sup_list=4K@60,4K@30,FHD@60,FHD@30,HD@30,TV@30
+ro.asus.camera.cam3.exposure_time_range=100000,16000000000
+ro.asus.camera.cam3.video_fps=HD@60,FHD@60,4K@30
+ro.asus.camera.dual_bokeh=0:0;1:0;2:0;3:0;4:1;5:1
+ro.asus.camera.fovc=0:1;1:1;2:0;3:0
+ro.asus.camera.lens_type=0:standard;1:standard;2:wide-angle;3:wide-angle;4:virtual;5:virtual
+ro.asus.camera.preview_beauty=4:1;5:1
+ro.asus.camera.use_frame_processor=0
+
 # CNE
 persist.vendor.cne.feature=1