├── Android.mk ├── BoardConfigCommon.mk ├── README ├── cm.dependencies ├── doze ├── Android.mk ├── AndroidManifest.xml ├── proguard.flags ├── res │ ├── drawable │ │ └── ic_settings_gestures.xml │ ├── values │ │ └── styles.xml │ └── xml │ │ └── gesture_panel.xml └── src │ └── com │ └── cyanogenmod │ └── settings │ └── device │ ├── BootCompletedReceiver.java │ ├── SamsungDozeActivity.java │ ├── SamsungDozeService.java │ └── TouchscreenGestureSettings.java ├── overlay ├── frameworks │ └── base │ │ └── core │ │ └── res │ │ └── res │ │ ├── values-mcc310-mnc120 │ │ ├── config.xml │ │ └── strings.xml │ │ ├── values-mcc310-mnc260 │ │ └── config.xml │ │ ├── values-mcc311-mnc220 │ │ └── config.xml │ │ ├── values-mcc311-mnc225 │ │ └── config.xml │ │ ├── values-mcc311-mnc490 │ │ └── integers.xml │ │ ├── values-mcc311-mnc580 │ │ └── config.xml │ │ ├── values-mcc311-mnc870 │ │ └── integers.xml │ │ ├── values-mcc440-mnc07 │ │ └── config.xml │ │ ├── values │ │ ├── cm_arrays.xml │ │ ├── config.xml │ │ └── strings.xml │ │ ├── xml-mcc310-mnc00 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc002 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc003 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc004 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc005 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc006 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc012 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc090 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc120 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc480 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc481 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc483 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc486 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc489 │ │ └── eri.xml │ │ ├── xml-mcc310-mnc99 │ │ └── eri.xml │ │ ├── xml-mcc311-mnc230 │ │ └── eri.xml │ │ ├── xml-mcc311-mnc480 │ │ └── eri.xml │ │ ├── xml-mcc311-mnc482 │ │ └── eri.xml │ │ ├── xml-mcc311-mnc485 │ │ └── eri.xml │ │ └── xml-mcc311-mnc580 │ │ └── eri.xml └── packages │ ├── apps │ └── Contacts │ │ └── res │ │ ├── values-mcc310-mnc010 │ │ └── donottranslate_config.xml │ │ ├── values-mcc310-mnc120 │ │ └── donottranslate_config.xml │ │ ├── values-mcc311-mnc490 │ │ └── donottranslate_config.xml │ │ └── values-mcc311-mnc870 │ │ └── donottranslate_config.xml │ └── services │ └── Telephony │ └── res │ ├── values-mcc310-mnc120 │ └── system_select.xml │ └── values │ └── config.xml ├── qcom-common.mk └── recovery └── root └── sbin └── postrecoveryboot.sh /Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2012 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # WARNING: Everything listed here will be built on ALL platforms, 18 | # including x86, the emulator, and the SDK. Modules must be uniquely 19 | # named (liblights.tuna), and must build everywhere, or limit themselves 20 | # to only building on ARM if they include assembly. Individual makefiles 21 | # are responsible for having their own logic, for fine-grained control. 22 | 23 | LOCAL_PATH := $(call my-dir) 24 | 25 | ifeq ($(BOARD_VENDOR),samsung) 26 | ifeq ($(call is-board-platform-in-list,apq8084 msm8226 msm8660 msm8916 msm8960 msm8974),true) 27 | include $(call all-makefiles-under,$(LOCAL_PATH)) 28 | endif 29 | endif 30 | 31 | -------------------------------------------------------------------------------- /BoardConfigCommon.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2012 The CyanogenMod Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | BOARD_VENDOR := samsung 16 | 17 | # Bootloader 18 | TARGET_NO_BOOTLOADER := true 19 | 20 | # Architecture 21 | TARGET_ARCH := arm 22 | TARGET_CPU_ABI := armeabi-v7a 23 | TARGET_CPU_ABI2 := armeabi 24 | TARGET_ARCH_VARIANT := armv7-a-neon 25 | 26 | # CMHW 27 | BOARD_HARDWARE_CLASS += hardware/samsung/cmhw 28 | 29 | # Graphics 30 | TARGET_USES_C2D_COMPOSITION := true 31 | TARGET_USES_ION := true 32 | # Qualcomm support 33 | BOARD_USES_QCOM_HARDWARE := true 34 | 35 | # Recovery 36 | TARGET_RECOVERY_DEVICE_DIRS += device/samsung/qcom-common 37 | TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" 38 | BOARD_HAS_DOWNLOAD_MODE := true 39 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Copyright 2012 - The CyanogenMod Project 2 | 3 | Common configurations for Samsung devices on Qualcomm chipsets 4 | 5 | -------------------------------------------------------------------------------- /cm.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_hardware_samsung", 4 | "target_path": "hardware/samsung" 5 | }, 6 | { 7 | "repository": "android_packages_resources_devicesettings", 8 | "target_path": "packages/resources/devicesettings" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /doze/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE_TAGS := optional 5 | 6 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 7 | 8 | LOCAL_PACKAGE_NAME := SamsungDoze 9 | LOCAL_CERTIFICATE := platform 10 | LOCAL_PRIVILEGED_MODULE := true 11 | 12 | LOCAL_STATIC_JAVA_LIBRARIES := \ 13 | android-support-v14-preference \ 14 | android-support-v7-appcompat \ 15 | android-support-v7-preference \ 16 | android-support-v7-recyclerview \ 17 | org.cyanogenmod.platform.internal 18 | 19 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 20 | 21 | LOCAL_RESOURCE_DIR := \ 22 | $(LOCAL_PATH)/res \ 23 | $(LOCAL_PATH)/../../../../packages/resources/devicesettings/res \ 24 | frameworks/support/v14/preference/res \ 25 | frameworks/support/v7/appcompat/res \ 26 | frameworks/support/v7/preference/res \ 27 | frameworks/support/v7/recyclerview/res 28 | 29 | LOCAL_AAPT_FLAGS := --auto-add-overlay \ 30 | --extra-packages android.support.v14.preference:android.support.v7.appcompat:android.support.v7.preference:android.support.v7.recyclerview 31 | 32 | ifneq ($(INCREMENTAL_BUILDS),) 33 | LOCAL_PROGUARD_ENABLED := disabled 34 | LOCAL_JACK_ENABLED := incremental 35 | endif 36 | 37 | include frameworks/base/packages/SettingsLib/common.mk 38 | 39 | include $(BUILD_PACKAGE) 40 | 41 | include $(call all-makefiles-under,$(LOCAL_PATH)) 42 | -------------------------------------------------------------------------------- /doze/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 36 | 37 | 38 | 39 | 42 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /doze/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class com.cyanogenmod.settings.device.* { 2 | *; 3 | } 4 | 5 | -keepclasseswithmembers class * { 6 | public (android.content.Context, android.util.AttributeSet); 7 | } 8 | 9 | -keep class ** extends android.support.v14.preference.PreferenceFragment 10 | -------------------------------------------------------------------------------- /doze/res/drawable/ic_settings_gestures.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 23 | 32 | 33 | -------------------------------------------------------------------------------- /doze/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 21 | 22 | -------------------------------------------------------------------------------- /doze/res/xml/gesture_panel.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 22 | 23 | 28 | 29 | 35 | 36 | 42 | 43 | 44 | 47 | 48 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /doze/src/com/cyanogenmod/settings/device/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.cyanogenmod.settings.device; 18 | 19 | import android.content.BroadcastReceiver; 20 | import android.content.Context; 21 | import android.content.Intent; 22 | import android.util.Log; 23 | 24 | public class BootCompletedReceiver extends BroadcastReceiver { 25 | 26 | private static final boolean DEBUG = false; 27 | private static final String TAG = "SamsungDoze"; 28 | 29 | @Override 30 | public void onReceive(final Context context, Intent intent) { 31 | if (DEBUG) Log.d(TAG, "Starting service"); 32 | context.startService(new Intent(context, SamsungDozeService.class)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /doze/src/com/cyanogenmod/settings/device/SamsungDozeActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.cyanogenmod.settings.device; 17 | 18 | import android.app.Fragment; 19 | import android.app.FragmentTransaction; 20 | import android.os.Bundle; 21 | 22 | import com.android.settingslib.drawer.SettingsDrawerActivity; 23 | 24 | public class SamsungDozeActivity extends SettingsDrawerActivity { 25 | 26 | private static final String TAG = "samsung_doze"; 27 | 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | 31 | getFragmentManager().beginTransaction().replace(R.id.content_frame, 32 | new TouchscreenGestureSettings(), TAG).commit(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /doze/src/com/cyanogenmod/settings/device/SamsungDozeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.cyanogenmod.settings.device; 18 | 19 | import android.app.Service; 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.content.IntentFilter; 24 | import android.content.SharedPreferences; 25 | import android.hardware.Sensor; 26 | import android.hardware.SensorEvent; 27 | import android.hardware.SensorEventListener; 28 | import android.hardware.SensorManager; 29 | import android.os.IBinder; 30 | import android.os.PowerManager; 31 | import android.preference.PreferenceManager; 32 | import android.provider.Settings; 33 | import android.util.Log; 34 | 35 | import java.lang.System; 36 | import java.util.ArrayList; 37 | import java.util.concurrent.TimeUnit; 38 | import java.util.List; 39 | 40 | public class SamsungDozeService extends Service { 41 | private static final String TAG = "SamsungDozeService"; 42 | private static final boolean DEBUG = false; 43 | 44 | private static final String DOZE_INTENT = "com.android.systemui.doze.pulse"; 45 | 46 | private static final String GESTURE_HAND_WAVE_KEY = "gesture_hand_wave"; 47 | private static final String GESTURE_POCKET_KEY = "gesture_pocket"; 48 | private static final String PROXIMITY_WAKE_KEY = "proximity_wake_enable"; 49 | 50 | private static final int POCKET_DELTA_NS = 1000 * 1000 * 1000; 51 | 52 | private Context mContext; 53 | private SamsungProximitySensor mSensor; 54 | private PowerManager mPowerManager; 55 | 56 | private boolean mHandwaveGestureEnabled = false; 57 | private boolean mPocketGestureEnabled = false; 58 | private boolean mProximityWakeEnabled = false; 59 | 60 | class SamsungProximitySensor implements SensorEventListener { 61 | private SensorManager mSensorManager; 62 | private Sensor mSensor; 63 | 64 | private boolean mSawNear = false; 65 | private long mInPocketTime = 0; 66 | 67 | public SamsungProximitySensor(Context context) { 68 | mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); 69 | mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); 70 | } 71 | 72 | @Override 73 | public void onSensorChanged(SensorEvent event) { 74 | boolean isNear = event.values[0] < mSensor.getMaximumRange(); 75 | if (mSawNear && !isNear) { 76 | if (shouldPulse(event.timestamp)) { 77 | launchDozePulse(); 78 | } 79 | } else { 80 | mInPocketTime = event.timestamp; 81 | } 82 | mSawNear = isNear; 83 | } 84 | 85 | @Override 86 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 87 | /* Empty */ 88 | } 89 | 90 | private boolean shouldPulse(long timestamp) { 91 | long delta = timestamp - mInPocketTime; 92 | 93 | if (mHandwaveGestureEnabled && mPocketGestureEnabled) { 94 | return true; 95 | } else if (mProximityWakeEnabled && (delta < POCKET_DELTA_NS)) { 96 | mPowerManager.wakeUp(TimeUnit.NANOSECONDS.toMillis(System.nanoTime())); 97 | return false; 98 | } else if (mHandwaveGestureEnabled && !mPocketGestureEnabled) { 99 | return delta < POCKET_DELTA_NS; 100 | } else if (!mHandwaveGestureEnabled && mPocketGestureEnabled) { 101 | return delta >= POCKET_DELTA_NS; 102 | } 103 | return false; 104 | } 105 | 106 | public void testAndEnable() { 107 | if ((isDozeEnabled() && (mHandwaveGestureEnabled || mPocketGestureEnabled)) || 108 | mProximityWakeEnabled) { 109 | mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_NORMAL); 110 | } 111 | } 112 | 113 | public void disable() { 114 | mSensorManager.unregisterListener(this, mSensor); 115 | } 116 | } 117 | 118 | @Override 119 | public void onCreate() { 120 | if (DEBUG) Log.d(TAG, "SamsungDozeService Started"); 121 | mContext = this; 122 | mPowerManager = (PowerManager)getSystemService(Context.POWER_SERVICE); 123 | mSensor = new SamsungProximitySensor(mContext); 124 | SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(mContext); 125 | loadPreferences(sharedPrefs); 126 | sharedPrefs.registerOnSharedPreferenceChangeListener(mPrefListener); 127 | if (!isInteractive()) { 128 | mSensor.testAndEnable(); 129 | } 130 | } 131 | 132 | @Override 133 | public int onStartCommand(Intent intent, int flags, int startId) { 134 | if (DEBUG) Log.d(TAG, "Starting service"); 135 | IntentFilter screenStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON); 136 | screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF); 137 | mContext.registerReceiver(mScreenStateReceiver, screenStateFilter); 138 | return START_STICKY; 139 | } 140 | 141 | @Override 142 | public IBinder onBind(Intent intent) { 143 | return null; 144 | } 145 | 146 | private void launchDozePulse() { 147 | mContext.sendBroadcast(new Intent(DOZE_INTENT)); 148 | } 149 | 150 | private boolean isInteractive() { 151 | return mPowerManager.isInteractive(); 152 | } 153 | 154 | private boolean isDozeEnabled() { 155 | return Settings.Secure.getInt(mContext.getContentResolver(), 156 | Settings.Secure.DOZE_ENABLED, 1) != 0; 157 | } 158 | 159 | private void onDisplayOn() { 160 | if (DEBUG) Log.d(TAG, "Display on"); 161 | mSensor.disable(); 162 | } 163 | 164 | private void onDisplayOff() { 165 | if (DEBUG) Log.d(TAG, "Display off"); 166 | mSensor.testAndEnable(); 167 | } 168 | 169 | private void loadPreferences(SharedPreferences sharedPreferences) { 170 | mHandwaveGestureEnabled = sharedPreferences.getBoolean(GESTURE_HAND_WAVE_KEY, false); 171 | mPocketGestureEnabled = sharedPreferences.getBoolean(GESTURE_POCKET_KEY, false); 172 | mProximityWakeEnabled = sharedPreferences.getBoolean(PROXIMITY_WAKE_KEY, false); 173 | } 174 | 175 | private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() { 176 | @Override 177 | public void onReceive(Context context, Intent intent) { 178 | if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) { 179 | onDisplayOff(); 180 | } else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) { 181 | onDisplayOn(); 182 | } 183 | } 184 | }; 185 | 186 | private SharedPreferences.OnSharedPreferenceChangeListener mPrefListener = 187 | new SharedPreferences.OnSharedPreferenceChangeListener() { 188 | @Override 189 | public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { 190 | if (GESTURE_HAND_WAVE_KEY.equals(key)) { 191 | mHandwaveGestureEnabled = sharedPreferences.getBoolean(GESTURE_HAND_WAVE_KEY, false); 192 | } else if (GESTURE_POCKET_KEY.equals(key)) { 193 | mPocketGestureEnabled = sharedPreferences.getBoolean(GESTURE_POCKET_KEY, false); 194 | } else if (PROXIMITY_WAKE_KEY.equals(key)) { 195 | mProximityWakeEnabled = sharedPreferences.getBoolean(PROXIMITY_WAKE_KEY, false); 196 | } 197 | } 198 | }; 199 | } 200 | -------------------------------------------------------------------------------- /doze/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.cyanogenmod.settings.device; 18 | 19 | import android.os.Bundle; 20 | import android.support.v14.preference.PreferenceFragment; 21 | import android.support.v14.preference.SwitchPreference; 22 | import android.support.v7.preference.Preference; 23 | import android.provider.Settings; 24 | 25 | import org.cyanogenmod.internal.util.ScreenType; 26 | 27 | public class TouchscreenGestureSettings extends PreferenceFragment { 28 | 29 | private static final String KEY_HAND_WAVE = "gesture_hand_wave"; 30 | private static final String KEY_PROXIMITY_WAKE = "proximity_wake_enable"; 31 | 32 | private SwitchPreference mHandwavePreference; 33 | private SwitchPreference mProximityWakePreference; 34 | 35 | @Override 36 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 37 | addPreferencesFromResource(R.xml.gesture_panel); 38 | 39 | mHandwavePreference = 40 | (SwitchPreference) findPreference(KEY_HAND_WAVE); 41 | mHandwavePreference.setOnPreferenceChangeListener(mProximityListener); 42 | mProximityWakePreference = 43 | (SwitchPreference) findPreference(KEY_PROXIMITY_WAKE); 44 | mProximityWakePreference.setOnPreferenceChangeListener(mProximityListener); 45 | } 46 | 47 | @Override 48 | public void onResume() { 49 | super.onResume(); 50 | 51 | // If running on a phone, remove padding around the listview 52 | if (!ScreenType.isTablet(getContext())) { 53 | getListView().setPadding(0, 0, 0, 0); 54 | } 55 | } 56 | 57 | private Preference.OnPreferenceChangeListener mProximityListener = 58 | new Preference.OnPreferenceChangeListener() { 59 | @Override 60 | public boolean onPreferenceChange(Preference preference, Object newValue) { 61 | if ((boolean) newValue) { 62 | if (preference.getKey().equals(KEY_HAND_WAVE)) { 63 | mProximityWakePreference.setChecked(false); 64 | } else if (preference.getKey().equals(KEY_PROXIMITY_WAKE)) { 65 | mHandwavePreference.setChecked(false); 66 | } 67 | } 68 | return true; 69 | } 70 | }; 71 | } 72 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 26 | 27 | 28 | 31 | 32 | 1 33 | 4 34 | 7 35 | 9 36 | 37 | 38 | 39 | true 40 | 41 | 42 | true 43 | 44 | 46 | false 47 | 48 | 53 | true 54 | 55 | 60 | 6 61 | 62 | 63 | 4 64 | 65 | 66 | 51200 67 | 68 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc120/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | Digital Roaming 26 | Sprint 27 | Digital Roaming 28 | 29 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | 27 | 28 | 1 29 | 4 30 | 7 31 | 9 32 | 33 | 34 | 38 | 39 | T-Mobile Tethering,pcweb.tmobile.com,,,,,,,,,310,260,,DUN 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc220/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 26 | false 27 | 28 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc225/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 26 | false 27 | 28 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc490/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1422 4 | 5 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc580/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 26 | false 27 | 28 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc870/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1422 4 | 5 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc440-mnc07/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 7 25 | 26 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/cm_arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | @string/reboot_reboot 21 | @string/reboot_soft 22 | @string/reboot_recovery 23 | @string/reboot_download 24 | 25 | 26 | 28 | 29 | 30 | soft_reboot 31 | recovery 32 | download 33 | 34 | 35 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | false 24 | 25 | 27 | true 28 | 29 | 30 | true 31 | 32 | 33 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | Network Extender 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc00/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc002/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc003/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc004/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc005/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc006/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc012/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc090/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 24 | 25 | 27 | 28 | 30 | 31 | 33 | 34 | 40 | 41 | 47 | 48 | 54 | 55 | 61 | 62 | 68 | 69 | 75 | 76 | 82 | 83 | 89 | 90 | 96 | 97 | 103 | 104 | 110 | 111 | 117 | 118 | 124 | 125 | 131 | 132 | 138 | 139 | 145 | 146 | 152 | 153 | 159 | 160 | 166 | 167 | 173 | 174 | 180 | 181 | 187 | 188 | 194 | 195 | 201 | 202 | 208 | 209 | 215 | 216 | 222 | 223 | 229 | 230 | 236 | 237 | 243 | 244 | 250 | 251 | 257 | 258 | 264 | 265 | 271 | 272 | 278 | 279 | 285 | 286 | 292 | 293 | 299 | 300 | 306 | 307 | 313 | 314 | 320 | 321 | 327 | 328 | 334 | 335 | 341 | 342 | 348 | 349 | 355 | 356 | 362 | 363 | 369 | 370 | 376 | 377 | 383 | 384 | 390 | 391 | 397 | 398 | 404 | 405 | 411 | 412 | 418 | 419 | 425 | 426 | 432 | 433 | 439 | 440 | 446 | 447 | 453 | 454 | 460 | 461 | 467 | 468 | 474 | 475 | 481 | 482 | 488 | 489 | 495 | 496 | 502 | 503 | 509 | 510 | 516 | 517 | 523 | 524 | 530 | 531 | 537 | 538 | 544 | 545 | 551 | 552 | 558 | 559 | 565 | 566 | 572 | 573 | 579 | 580 | 586 | 587 | 593 | 594 | 600 | 601 | 607 | 608 | 614 | 615 | 621 | 622 | 628 | 629 | 635 | 636 | 642 | 643 | 649 | 650 | 656 | 657 | 663 | 664 | 670 | 671 | 677 | 678 | 684 | 685 | 691 | 692 | 698 | 699 | 705 | 706 | 712 | 713 | 719 | 720 | 726 | 727 | 733 | 734 | 740 | 741 | 747 | 748 | 754 | 755 | 761 | 762 | 768 | 769 | 775 | 776 | 782 | 783 | 789 | 790 | 796 | 797 | 803 | 804 | 810 | 811 | 817 | 818 | 824 | 825 | 831 | 832 | 838 | 839 | 845 | 846 | 852 | 853 | 859 | 860 | 866 | 867 | 873 | 874 | 880 | 881 | 887 | 888 | 894 | 895 | 901 | 902 | 908 | 909 | 915 | 916 | 922 | 923 | 929 | 930 | 936 | 937 | 943 | 944 | 950 | 951 | 957 | 958 | 964 | 965 | 971 | 972 | 978 | 979 | 985 | 986 | 992 | 993 | 999 | 1000 | 1006 | 1007 | 1013 | 1014 | 1020 | 1021 | 1027 | 1028 | 1034 | 1035 | 1041 | 1042 | 1048 | 1049 | 1055 | 1056 | 1062 | 1063 | 1069 | 1070 | 1076 | 1077 | 1083 | 1084 | 1090 | 1091 | 1097 | 1098 | 1104 | 1105 | 1111 | 1112 | 1118 | 1119 | 1125 | 1126 | 1132 | 1133 | 1139 | 1140 | 1146 | 1147 | 1153 | 1154 | 1160 | 1161 | 1167 | 1168 | 1174 | 1175 | 1181 | 1182 | 1188 | 1189 | 1195 | 1196 | 1202 | 1203 | 1209 | 1210 | 1216 | 1217 | 1223 | 1224 | 1230 | 1231 | 1237 | 1238 | 1244 | 1245 | 1251 | 1252 | 1258 | 1259 | 1265 | 1266 | 1272 | 1273 | 1279 | 1280 | 1286 | 1287 | 1288 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc120/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc480/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc481/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc483/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc486/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc489/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc310-mnc99/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc311-mnc230/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 24 | 25 | 27 | 28 | 30 | 31 | 33 | 34 | 40 | 41 | 47 | 48 | 54 | 55 | 61 | 62 | 68 | 69 | 75 | 76 | 82 | 83 | 89 | 90 | 96 | 97 | 103 | 104 | 110 | 111 | 117 | 118 | 124 | 125 | 131 | 132 | 138 | 139 | 145 | 146 | 152 | 153 | 159 | 160 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc311-mnc480/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc311-mnc482/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc311-mnc485/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml-mcc311-mnc580/eri.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 24 | 25 | 27 | 28 | 30 | 31 | 33 | 34 | 40 | 41 | 47 | 48 | 54 | 55 | 61 | 62 | 68 | 69 | 75 | 76 | 82 | 83 | 89 | 90 | 96 | 97 | 103 | 104 | 110 | 111 | 117 | 118 | 124 | 125 | 131 | 132 | 138 | 139 | 145 | 146 | 152 | 153 | 159 | 160 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /overlay/packages/apps/Contacts/res/values-mcc310-mnc010/donottranslate_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 25 | false 26 | 27 | -------------------------------------------------------------------------------- /overlay/packages/apps/Contacts/res/values-mcc310-mnc120/donottranslate_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 25 | false 26 | 27 | -------------------------------------------------------------------------------- /overlay/packages/apps/Contacts/res/values-mcc311-mnc490/donottranslate_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 25 | false 26 | 27 | -------------------------------------------------------------------------------- /overlay/packages/apps/Contacts/res/values-mcc311-mnc870/donottranslate_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 25 | false 26 | 27 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values-mcc310-mnc120/system_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Home only 6 | 7 | 8 | 9 | 10 | Auto: Domestic Roaming 11 | Auto: International Roaming 12 | Auto: Domestic & International 13 | Auto: No Roaming 14 | 15 | 16 | 17 | "0" 18 | "5" 19 | "6" 20 | "7" 21 | "8" 22 | 23 | 24 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 21 | true 22 | 23 | -------------------------------------------------------------------------------- /qcom-common.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2012 The CyanogenMod Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Overlay 16 | DEVICE_PACKAGE_OVERLAYS += \ 17 | device/samsung/qcom-common/overlay 18 | 19 | PRODUCT_PROPERTY_OVERRIDES += \ 20 | debug.sf.hw=1 \ 21 | debug.mdpcomp.logs=0 \ 22 | persist.hwc.mdpcomp.enable=true 23 | 24 | PRODUCT_PROPERTY_OVERRIDES += \ 25 | ro.telephony.call_ring.multiple=0 26 | -------------------------------------------------------------------------------- /recovery/root/sbin/postrecoveryboot.sh: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | # The partition to use is named "PARAM" and can be found by dumping the PIT. 4 | 5 | # 0: charge 6 | # 1: direct 7 | # 2: recovery_enter 8 | # 3: recovery_end 9 | # 4: download_end 10 | 11 | target=`getprop ro.board.platform` 12 | 13 | case "$target" in 14 | "msm8660") 15 | # hack because 8660 doesn't support partitions by-name 16 | echo -n -e '\x03\x00\x00\x00' > /dev/block/mmcblk0p12 17 | ;; 18 | "msm8916") 19 | echo -n -e '\x03\x00\x00\x00' > /dev/block/bootdevice/by-name/param 20 | ;; 21 | *) 22 | echo -n -e '\x03\x00\x00\x00' > /dev/block/platform/msm_sdcc.1/by-name/param 23 | ;; 24 | esac 25 | --------------------------------------------------------------------------------