Created
August 1, 2012 03:18
-
-
Save PyYoshi/3223342 to your computer and use it in GitHub Desktop.
Acer LiquidのCyanogenmod 10用のdiff。 repo用のdiff形式なので以下のURLよりスクリプトを取得の上適用させること。 android_device_acer_salsa.diffは普通のdiff形式 http://d.hatena.ne.jp/i_k_b/20110126/1296023304
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/device_salsa.mk b/device_salsa.mk | |
| index 050dde6..40e70f5 100755 | |
| --- a/device_salsa.mk | |
| +++ b/device_salsa.mk | |
| @@ -58,7 +58,7 @@ PRODUCT_PACKAGES += \ | |
| # proprietary side of the device | |
| $(call inherit-product-if-exists, vendor/acer/salsa/salsa-vendor.mk) | |
| -$(call inherit-product, frameworks/base/build/phone-hdpi-512-dalvik-heap.mk) | |
| +$(call inherit-product, frameworks/native/build/phone-hdpi-512-dalvik-heap.mk) | |
| # we have enough storage space to hold precise GC data | |
| PRODUCT_TAGS += dalvik.gc.type-precise | |
| @@ -79,17 +79,17 @@ DEVICE_PACKAGE_OVERLAYS := device/acer/salsa/overlay | |
| # Publish that we support the live wallpaper feature. | |
| PRODUCT_COPY_FILES += \ | |
| -frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \ | |
| - frameworks/base/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ | |
| - frameworks/base/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ | |
| - frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ | |
| - frameworks/base/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ | |
| - frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ | |
| - frameworks/base/data/etc/android.hardware.touchscreen.xml:system/etc/permissions/android.hardware.touchscreen.xml \ | |
| - frameworks/base/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ | |
| - frameworks/base/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ | |
| - frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ | |
| - frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml | |
| + frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \ | |
| + frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ | |
| + frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ | |
| + frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ | |
| + frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ | |
| + frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ | |
| + frameworks/native/data/etc/android.hardware.touchscreen.xml:system/etc/permissions/android.hardware.touchscreen.xml \ | |
| + frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ | |
| + frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ | |
| + frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ | |
| + frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml | |
| ## (3) Finally, the least specific parts, i.e. the non-GSM-specific aspects | |
| # Additional settings used in AOSP builds | |
| diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp | |
| index 68c000d..e359395 100644 | |
| --- a/libaudio/AudioHardware.cpp | |
| +++ b/libaudio/AudioHardware.cpp | |
| @@ -14,6 +14,13 @@ | |
| ** limitations under the License. | |
| */ | |
| +#define LOGE | |
| +#define LOGV | |
| +#define LOGD | |
| +#define LOGW | |
| +#define LOGI | |
| +#define LOGE_IF | |
| + | |
| #include <math.h> | |
| //#define LOG_NDEBUG 0 | |
| diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml | |
| index c98dc20..26912eb 100644 | |
| --- a/overlay/frameworks/base/core/res/res/values/config.xml | |
| +++ b/overlay/frameworks/base/core/res/res/values/config.xml | |
| @@ -84,12 +84,6 @@ | |
| <!-- Default blink frequency for notification LED is 9 seconds. --> | |
| <integer name="config_defaultNotificationLedOff">6000</integer> | |
| - <!-- Component name of the service providing network location support. --> | |
| - <string name="config_networkLocationProvider">com.google.android.location.NetworkLocationProvider</string> | |
| - | |
| - <!-- Component name of the service providing geocoder API support. --> | |
| - <string name="config_geocodeProvider">com.google.android.location.GeocodeProvider</string> | |
| - | |
| <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx], | |
| [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] --> | |
| <!-- the 5th element "resore-time" indicates the number of milliseconds to delay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| project build/ | |
| diff --git a/envsetup.sh b/envsetup.sh | |
| old mode 100644 | |
| new mode 100755 | |
| project frameworks/av/ | |
| diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp | |
| index 3457fab..5ec14e4 100644 | |
| --- a/media/libmediaplayerservice/StagefrightRecorder.cpp | |
| +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp | |
| @@ -1416,7 +1416,7 @@ status_t StagefrightRecorder::setupVideoEncoder( | |
| #ifdef QCOM_HARDWARE | |
| char value[PROPERTY_VALUE_MAX]; | |
| #endif | |
| - if (mIsMetaDataStoredInVideoBuffers) { | |
| + if (0 && mIsMetaDataStoredInVideoBuffers) { | |
| encoder_flags |= OMXCodec::kHardwareCodecsOnly; | |
| encoder_flags |= OMXCodec::kStoreMetaDataInVideoBuffers; | |
| #ifdef QCOM_HARDWARE | |
| project frameworks/base/ | |
| diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c | |
| index 4542228..2a597bb 100644 | |
| --- a/cmds/servicemanager/service_manager.c | |
| +++ b/cmds/servicemanager/service_manager.c | |
| @@ -27,6 +27,7 @@ static struct { | |
| unsigned uid; | |
| const char *name; | |
| } allowed[] = { | |
| + { AID_COMPASS, "yamaha.hardware.sensors" }, | |
| { AID_MEDIA, "media.audio_flinger" }, | |
| { AID_MEDIA, "media.player" }, | |
| { AID_MEDIA, "media.camera" }, | |
| diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java | |
| index 17395d0..d75481e 100644 | |
| --- a/services/java/com/android/server/PowerManagerService.java | |
| +++ b/services/java/com/android/server/PowerManagerService.java | |
| @@ -129,7 +129,7 @@ public class PowerManagerService extends IPowerManager.Stub | |
| private static final int LIGHT_SENSOR_OFFSET_SCALE = 8; | |
| // For debouncing the proximity sensor in milliseconds | |
| - private static final int PROXIMITY_SENSOR_DELAY = 1000; | |
| + private static final int PROXIMITY_SENSOR_DELAY = 100; | |
| // trigger proximity if distance is less than 5 cm | |
| private static final float PROXIMITY_THRESHOLD = 5.0f; | |
| project hardware/ril/ | |
| diff --git a/libril/ril.cpp b/libril/ril.cpp | |
| index f594b8d..a97ea9c 100644 | |
| --- a/libril/ril.cpp | |
| +++ b/libril/ril.cpp | |
| @@ -254,6 +254,8 @@ static UserCallbackInfo * internalRequestTimedCallback | |
| (RIL_TimedCallback callback, void *param, | |
| const struct timeval *relativeTime); | |
| +static void internalRemoveTimedCallback(void *callbackInfo); | |
| + | |
| /** Index == requestNumber */ | |
| static CommandInfo s_commands[] = { | |
| #include "ril_commands.h" | |
| @@ -3283,11 +3285,27 @@ internalRequestTimedCallback (RIL_TimedCallback callback, void *param, | |
| return p_info; | |
| } | |
| +static void | |
| +internalRemoveTimedCallback(void *callbackInfo) | |
| +{ | |
| + UserCallbackInfo *p_info; | |
| + p_info = (UserCallbackInfo *)callbackInfo; | |
| + LOGI("remove timer callback event"); | |
| + if(p_info) { | |
| + if (ril_timer_delete(&(p_info->event))) | |
| + free(p_info); | |
| + } | |
| +} | |
| -extern "C" void | |
| +extern "C" void * | |
| RIL_requestTimedCallback (RIL_TimedCallback callback, void *param, | |
| const struct timeval *relativeTime) { | |
| - internalRequestTimedCallback (callback, param, relativeTime); | |
| + return internalRequestTimedCallback (callback, param, relativeTime); | |
| +} | |
| + | |
| +extern "C" void | |
| +RIL_removeTimedCallback (void *callbackInfo) { | |
| + internalRemoveTimedCallback(callbackInfo); | |
| } | |
| const char * | |
| diff --git a/libril/ril_event.cpp b/libril/ril_event.cpp | |
| index 93511e9..31d0b51 100644 | |
| --- a/libril/ril_event.cpp | |
| +++ b/libril/ril_event.cpp | |
| @@ -122,15 +122,19 @@ static void addToList(struct ril_event * ev, struct ril_event * list) | |
| dump_event(ev); | |
| } | |
| -static void removeFromList(struct ril_event * ev) | |
| +static bool removeFromList(struct ril_event * ev) | |
| { | |
| dlog("~~~~ Removing event ~~~~"); | |
| + /* Make sure the event actually exists */ | |
| + if (!(ev->prev && ev->next)) | |
| + return false; | |
| dump_event(ev); | |
| ev->next->prev = ev->prev; | |
| ev->prev->next = ev->next; | |
| ev->next = NULL; | |
| ev->prev = NULL; | |
| + return true; | |
| } | |
| @@ -312,6 +316,17 @@ void ril_timer_add(struct ril_event * ev, struct timeval * tv) | |
| dlog("~~~~ -ril_timer_add ~~~~"); | |
| } | |
| +// Remove event from timer list | |
| +bool ril_timer_delete(struct ril_event *tev) | |
| +{ | |
| + bool ret = true; | |
| + dlog("~~~~timer event delete=%x",(unsigned int)tev); | |
| + MUTEX_ACQUIRE(); | |
| + ret = removeFromList(tev); | |
| + MUTEX_RELEASE(); | |
| + return ret; | |
| +} | |
| + | |
| // Remove event from watch or timer list | |
| void ril_event_del(struct ril_event * ev) | |
| { | |
| diff --git a/libril/ril_event.h b/libril/ril_event.h | |
| index 7ba231b..a0258a6 100644 | |
| --- a/libril/ril_event.h | |
| +++ b/libril/ril_event.h | |
| @@ -47,6 +47,9 @@ void ril_timer_add(struct ril_event * ev, struct timeval * tv); | |
| // Remove event from watch list | |
| void ril_event_del(struct ril_event * ev); | |
| +// Remove event from timer list | |
| +bool ril_timer_delete(struct ril_event * ev); | |
| + | |
| // Event loop | |
| void ril_event_loop(); | |
| project packages/apps/Phone/ | |
| diff --git a/src/com/android/phone/CallNotifier.java b/src/com/android/phone/CallNotifier.java | |
| index 242f131..2e95222 100755 | |
| --- a/src/com/android/phone/CallNotifier.java | |
| +++ b/src/com/android/phone/CallNotifier.java | |
| @@ -37,6 +37,7 @@ import android.net.Uri; | |
| import android.os.AsyncResult; | |
| import android.os.Handler; | |
| import android.os.Message; | |
| +import android.os.PowerManager; | |
| import android.os.RemoteException; | |
| import android.os.SystemProperties; | |
| import android.os.Vibrator; | |
| @@ -105,6 +106,8 @@ public class CallNotifier extends Handler | |
| // out...) | |
| private boolean mCallWaitingTimeOut = false; | |
| + private static PowerManager.WakeLock wakelockcall = null; | |
| + | |
| // values used to track the query state | |
| private static final int CALLERINFO_QUERY_READY = 0; | |
| private static final int CALLERINFO_QUERYING = -1; | |
| @@ -177,6 +180,8 @@ public class CallNotifier extends Handler | |
| // Cached AudioManager | |
| private AudioManager mAudioManager; | |
| + private PowerManager mPowerManager; | |
| + | |
| /** | |
| * Initialize the singleton CallNotifier instance. | |
| * This is only done once, at startup, from PhoneApp.onCreate(). | |
| @@ -202,6 +207,8 @@ public class CallNotifier extends Handler | |
| mAudioManager = (AudioManager) mApplication.getSystemService(Context.AUDIO_SERVICE); | |
| + mPowerManager = (PowerManager) mApplication.getSystemService(Context.POWER_SERVICE); | |
| + | |
| registerForNotifications(); | |
| // Instantiate the ToneGenerator for SignalInfo and CallWaiting | |
| @@ -745,8 +752,31 @@ public class CallNotifier extends Handler | |
| * - see onNewRingingConnection() for new incoming calls | |
| * - see onDisconnect() for calls being hung up or disconnected | |
| */ | |
| + | |
| + | |
| + //P-SENSOR FIX | |
| + private static PowerManager powermanager; | |
| + private static boolean callstarted = false; | |
| + | |
| private void onPhoneStateChanged(AsyncResult r) { | |
| Phone.State state = mCM.getState(); | |
| + if ((state == Phone.State.OFFHOOK)&&(!callstarted)){ | |
| + //powermanager = (PowerManager) mApplication.getSystemService(Context.POWER_SERVICE); | |
| + wakelockcall = mPowerManager.newWakeLock( | |
| + PowerManager.PARTIAL_WAKE_LOCK, | |
| + "bring phone call"); | |
| + wakelockcall.acquire(); | |
| + callstarted = true; | |
| + } | |
| + if ((state == Phone.State.IDLE)&&(callstarted)){ | |
| + try { | |
| + wakelockcall.release(); | |
| + } catch (Exception e) { | |
| + | |
| + } | |
| + callstarted = false; | |
| + } | |
| + | |
| if (VDBG) log("onPhoneStateChanged: state = " + state); | |
| // Turn status bar notifications on or off depending upon the state | |
| project vendor/cm/ | |
| diff --git a/config/common.mk b/config/common.mk | |
| index cb8709e..fb8e38e 100644 | |
| --- a/config/common.mk | |
| +++ b/config/common.mk | |
| @@ -55,7 +55,6 @@ PRODUCT_COPY_FILES += \ | |
| vendor/cm/prebuilt/common/bin/modelid_cfg.sh:system/bin/modelid_cfg.sh | |
| PRODUCT_COPY_FILES += \ | |
| - vendor/cm/proprietary/RomManager.apk:system/app/RomManager.apk \ | |
| vendor/cm/proprietary/Term.apk:system/app/Term.apk \ | |
| vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so \ | |
| vendor/cm/prebuilt/common/apps/Superuser.apk:system/app/Superuser.apk | |
| diff --git a/config/common_full_phone.mk b/config/common_full_phone.mk | |
| index 8d69ead..342b1c7 100644 | |
| --- a/config/common_full_phone.mk | |
| +++ b/config/common_full_phone.mk | |
| @@ -8,7 +8,7 @@ include frameworks/base/data/sounds/NewAudio.mk | |
| include frameworks/base/data/sounds/AudioPackageNewWave.mk | |
| # Bring in all video files | |
| -$(call inherit-product, frameworks/base/data/videos/VideoPackage2.mk) | |
| +#$(call inherit-product, frameworks/base/data/videos/VideoPackage2.mk) | |
| # Include CM audio files | |
| include vendor/cm/config/cm_audio.mk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment