Skip to content

Commit

Permalink
dior: CM bringup
Browse files Browse the repository at this point in the history
  • Loading branch information
KaguraRinko committed Feb 28, 2020
1 parent d626496 commit b2f9d5c
Show file tree
Hide file tree
Showing 23 changed files with 41 additions and 30 deletions.
6 changes: 3 additions & 3 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ MAX_EGL_CACHE_KEY_SIZE := 12*1024
# of the device.
MAX_EGL_CACHE_SIZE := 2048*1024

# MKHW
# CMHW
BOARD_USES_MOKEE_HARDWARE := true
BOARD_HARDWARE_CLASS := \
hardware/mokee/mkhw \
$(LOCAL_PATH)/mkhw
hardware/cyanogen/cmhw \
$(LOCAL_PATH)/cmhw

# No old RPC for prop
TARGET_NO_RPC := true
Expand Down
2 changes: 1 addition & 1 deletion MKActions/Android.mk → CMActions/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := MKActions
LOCAL_PACKAGE_NAME := CMActions
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true

Expand Down
10 changes: 5 additions & 5 deletions MKActions/AndroidManifest.xml → CMActions/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mokee.mkactions"
package="com.cyanogenmod.cmactions"
android:sharedUserId="android.uid.system">

<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
Expand All @@ -13,21 +13,21 @@
android:label="@string/device_settings_app_name"
android:persistent="true">

<receiver android:name="com.mokee.mkactions.BootCompletedReceiver">
<receiver android:name="com.cyanogenmod.cmactions.BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>

<service android:name="com.mokee.mkactions.MKActionsService"
android:permission="MKActionsService">
<service android:name="com.cyanogenmod.cmactions.CMActionsService"
android:permission="CMActionsService">
</service>

<activity
android:name=".GesturePreferenceActivity"
android:label="@string/screen_gestures_panel_title"
android:theme="@style/MKActions">
android:theme="@style/CMActions">
<intent-filter>
<action android:name="com.android.settings.action.EXTRA_SETTINGS" />
</intent-filter>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.mokee.mkactions;
package com.cyanogenmod.cmactions;

import android.content.BroadcastReceiver;
import android.content.Context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.mokee.mkactions;
package com.cyanogenmod.cmactions;

import android.app.Service;
import android.content.BroadcastReceiver;
Expand All @@ -36,8 +36,8 @@
import java.util.ArrayList;
import java.util.List;

public class MKActionsService extends Service {
private static final String TAG = "MKActionsService";
public class CMActionsService extends Service {
private static final String TAG = "CMActionsService";
private static final boolean DEBUG = false;

private static final String GESTURE_HAND_WAVE_KEY = "gesture_hand_wave";
Expand Down Expand Up @@ -109,11 +109,11 @@ public void disable() {

@Override
public void onCreate() {
if (DEBUG) Log.d(TAG, "MKActionsService Started");
if (DEBUG) Log.d(TAG, "CMActionsService Started");
mContext = this;
mPowerManager = (PowerManager)getSystemService(Context.POWER_SERVICE);
mSensor = new DiorProximitySensor(mContext);
mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MKActionsWakeLock");
mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "CMActionsWakeLock");
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(mContext);
loadPreferences(sharedPrefs);
sharedPrefs.registerOnSharedPreferenceChangeListener(mPrefListener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.mokee.mkactions;
package com.cyanogenmod.cmactions;

import android.os.Bundle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.mokee.mkactions;
package com.cyanogenmod.cmactions;

import android.os.Bundle;
import android.support.v14.preference.PreferenceFragment;
Expand Down
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

cd ~/cm-14.1
. build/envsetup.sh
lunch cm_dior-userdebug
export LC_ALL=C
mka bacon | tee log.log

File renamed without changes.
12 changes: 8 additions & 4 deletions mokee.mk → cm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,21 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
$(call inherit-product, device/xiaomi/dior/device.mk)
$(call inherit-product-if-exists, vendor/xiaomi/dior/dior-vendor.mk)

# Inherit some common MK stuff (full)
$(call inherit-product, vendor/mk/config/common_full_phone.mk)
# Inherit some common CyanogenMod stuff (full)
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

# Product configuration
PRODUCT_NAME := mk_dior
PRODUCT_NAME := cm_dior
PRODUCT_DEVICE := dior
PRODUCT_BRAND := Xiaomi
PRODUCT_MANUFACTURER := Xiaomi
PRODUCT_MODEL := HM NOTE 1LTE

PRODUCT_GMS_CLIENTID_BASE := android-xiaomi

# Build fingerprint
BUILD_FINGERPRINT="Xiaomi/dior/dior:4.4.4/KTU84P/V9.2.4.0.KHICNEK:user/release-keys"

PRODUCT_BUILD_PROP_OVERRIDES += \
PRODUCT_NAME=dior
PRIVATE_BUILD_DESC="dior-user 4.4.4 KTU84P V9.2.4.0.KHICNEK release-keys"

Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.mokee.hardware;
package org.cyanogenmod.hardware;

import org.mokee.internal.util.FileUtils;
import org.cyanogenmod.internal.util.FileUtils;

/*
* Disable capacitive keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.mokee.hardware;
package org.cyanogenmod.hardware;

import org.mokee.internal.util.FileUtils;
import org.cyanogenmod.internal.util.FileUtils;

public class VibratorHW {

Expand Down
3 changes: 1 addition & 2 deletions init/init_dior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,5 @@ void vendor_load_properties()

property_override("ro.product.device", "dior");
property_override("ro.build.product", "dior");
property_override("ro.build.description", "dior-user 4.4.4 KTU84P V8.0.1.0.KHIMIDG release-keys");
property_override("ro.build.fingerprint", "Xiaomi/dior/dior:4.4.4/KTU84P/V8.0.1.0.KHIMIDG:user/release-keys");
}

2 changes: 1 addition & 1 deletion sepolicy/file.te
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#============= mkhw ==============
#============= cmhw ==============
type display_sysfs, sysfs_type, file_type;
type vibeamp_sysfs, sysfs_type, file_type;
2 changes: 1 addition & 1 deletion sepolicy/system_app.te
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#============= mkhw ==============
#============= cmhw ==============
allow system_app vibeamp_sysfs:file rw_file_perms;
allow system_app display_sysfs:file rw_file_perms;
2 changes: 1 addition & 1 deletion sepolicy/system_server.te
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#============= mkhw ==============
#============= cmhw ==============
allow system_server display_sysfs:file rw_file_perms;
allow system_server vibeamp_sysfs:file rw_file_perms;

0 comments on commit b2f9d5c

Please sign in to comment.