Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix init_msm.h stuff #4

Open
wants to merge 3 commits into
base: cm-12.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AndroidProducts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
#

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/full_surnia.mk
$(LOCAL_DIR)/cm.mk
15 changes: 9 additions & 6 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TARGET_CPU_SMP := true
TARGET_CPU_VARIANT := cortex-a7
#ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_USE_QCOM_BIONIC_OPTIMIZATION := true

CONFIG_HW_DISK_ENCRYPTION := false

#Kernel
BOARD_CUSTOM_BOOTIMG_MK := $(LOCAL_PATH)/mkbootimg.mk
Expand All @@ -51,7 +51,7 @@ BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_SEPARATED_DT := true
BOARD_RAMDISK_OFFSET := 0x01000000
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
TARGET_KERNEL_SOURCE := kernel/motorola/surnia
TARGET_KERNEL_SOURCE := kernel/motorola/msm8916
TARGET_KERNEL_CONFIG := msm8916_defconfig

BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100
Expand All @@ -60,6 +60,8 @@ BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100
# Audio
BOARD_USES_ALSA_AUDIO := true
TARGET_QCOM_AUDIO_VARIANT := caf
AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true
TARGET_USES_QCOM_MM_AUDIO := true

# ANT+
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
Expand All @@ -75,12 +77,15 @@ BLUETOOTH_HCI_USE_MCT := true
TARGET_USE_VENDOR_CAMERA_EXT := true
USE_DEVICE_SPECIFIC_CAMERA := true

# Asserts
TARGET_OTA_ASSERT_DEVICE := XT1514,XT1521,XT1524,XT1526,XT1527,XT1523,surnia_uds,surnia_umts,surnia,surnia_udstv


# CMHW
BOARD_HARDWARE_CLASS := $(LOCAL_PATH)/cmhw/src

# Crypto
TARGET_HW_DISK_ENCRYPTION := true
TARGET_HW_DISK_ENCRYPTION := false

# Display
BOARD_EGL_CFG := $(LOCAL_PATH)/egl.cfg
Expand Down Expand Up @@ -114,6 +119,7 @@ ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=0


# Lights
TARGET_PROVIDES_LIBLIGHT := true

# Media
TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
Expand Down Expand Up @@ -146,9 +152,6 @@ TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/rootdir/fstab.qcom
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true


# RIL

# SELinux

include device/qcom/sepolicy/sepolicy.mk
Expand Down
8 changes: 6 additions & 2 deletions cm.dependencies
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"repository": "android_kernel_motorola_surnia",
"target_path": "kernel/motorola/surnia"
"repository": "android_kernel_motorola_msm8916",
"target_path": "kernel/motorola/msm8916"
},
{
"repository": "android_hardware_qcom_display-caf-new",
Expand All @@ -22,6 +22,10 @@
{
"repository": "android_device_qcom_common",
"target_path": "device/qcom/common"
},
{
"repository": "android_device_motorola_qcom-common",
"target_path": "device/motorola/qcom-common"
}
]

37 changes: 15 additions & 22 deletions cm.mk
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
# Copyright (C) 2014 The CyanogenMod 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.

# Release name
PRODUCT_RELEASE_NAME := surnia

# Boot animation

# Resolution
TARGET_SCREEN_WIDTH := 540
TARGET_SCREEN_HEIGHT := 960

$(call inherit-product, device/motorola/surnia/full_surnia.mk)
# Phone Config
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Inherit some common CM stuff.
# Phone Config continued
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

# Inherit from device.mk
$(call inherit-product, device/motorola/surnia/device.mk)

# Vendor Files
$(call inherit-product-if-exists, vendor/motorola/surnia/surnia-vendor.mk)

## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := surnia
PRODUCT_NAME := cm_surnia
PRODUCT_DEVICE := surnia
PRODUCT_BRAND := motorola
PRODUCT_MODEL := surnia
PRODUCT_MODEL := XT1526
PRODUCT_MANUFACTURER := motorola

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
# OverRide
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0

8 changes: 8 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ PRODUCT_PACKAGES += \
# OMX
PRODUCT_PACKAGES += \
libdashplayer \
libOmxAacEnc \
libOmxAmrEnc \
libOmxCore \
libOmxEvrcEnc \
libOmxQcelp13Enc \
libOmxVdec \
libOmxVdecHevc \
libOmxVenc \
Expand Down Expand Up @@ -179,6 +183,10 @@ PRODUCT_PACKAGES += \
wpa_supplicant.conf \
dhcpcd.conf

# Doze
PRODUCT_PACKAGES += \
MotoDoze

PRODUCT_PACKAGES += \
WCNSS_qcom_wlan_factory_nv.bin

Expand Down
16 changes: 16 additions & 0 deletions doze/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

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

LOCAL_PACKAGE_NAME := MotoDoze
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)

include $(call all-makefiles-under,$(LOCAL_PATH))
46 changes: 46 additions & 0 deletions doze/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cyanogenmod.settings.device"
android:versionCode="1"
android:versionName="1.0"
android:sharedUserId="android.uid.system">

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="21"/>

<application
android:label="MotoDoze"
android:persistent="true">

<receiver android:name="com.cyanogenmod.settings.device.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.cyanogenmod.settings.device.MotoDozeService"
android:permission="MotoDozeService">
</service>

<activity
android:name=".TouchscreenGestureSettings"
android:label="@string/screen_gestures_panel_title"
android:theme="@android:style/Theme.Material.Settings">
<intent-filter>
<action android:name="com.cyanogenmod.action.LAUNCH_TOUCHSCREEN_GESTURE_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.title"
android:resource="@string/screen_gestures_panel_title"/>
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/screen_gestures_panel_summary"/>
</activity>

</application>
</manifest>
3 changes: 3 additions & 0 deletions doze/proguard.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-keep class com.cyanogenmod.settings.device.* {
*;
}
30 changes: 30 additions & 0 deletions doze/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The CyanogenMod 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">

<!-- Gesture shortcuts -->
<string name="screen_gestures_panel_title">Gestures</string>
<string name="screen_gestures_panel_summary">Use gestures to perform actions</string>

<string name="ambient_display_title">Ambient display</string>

<string name="ambient_display_enable_title">Ambient display</string>
<string name="ambient_display_enable_summary">Wake screen when you receive notifications</string>

<string name="hand_wave_gesture_title">Hand wave</string>
<string name="hand_wave_gesture_summary">Pulse notifications on hand wave</string>

<string name="pocket_gesture_title">Pocket</string>
<string name="pocket_gesture_summary">Pulse notifications on removal from pocket</string>
</resources>
39 changes: 39 additions & 0 deletions doze/res/xml/gesture_panel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The CyanogenMod 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.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<PreferenceCategory
android:key="ambient_display_key"
android:title="@string/ambient_display_title" >

<SwitchPreference
android:key="ambient_display_enable"
android:defaultValue="true"
android:title="@string/ambient_display_enable_title"
android:summary="@string/ambient_display_enable_summary" />

<SwitchPreference
android:key="gesture_hand_wave"
android:defaultValue="false"
android:title="@string/hand_wave_gesture_title"
android:summary="@string/hand_wave_gesture_summary" />

<SwitchPreference
android:key="gesture_pocket"
android:defaultValue="false"
android:title="@string/pocket_gesture_title"
android:summary="@string/pocket_gesture_summary" />
</PreferenceCategory>

</PreferenceScreen>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2015 The CyanogenMod 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 com.cyanogenmod.settings.device;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BootCompletedReceiver extends BroadcastReceiver {

private static final boolean DEBUG = false;
private static final String TAG = "MotoDoze";

@Override
public void onReceive(final Context context, Intent intent) {
if (DEBUG) Log.d(TAG, "Starting service");
context.startService(new Intent(context, MotoDozeService.class));
}

}
Loading