Skip to content

Commit

Permalink
v9: Several fixes (battery reporting, FM radio FC, USB Host mode etc...)
Browse files Browse the repository at this point in the history
- Fixed battery reporting that was misbehaving on some devices after switching to 2.6.35 kernel.
- Enabled USB Host mode in kernel and added support for /mnt/usbdisk in vold and build.prop.
- Removed overlays for FM radio app that is no longer needed and also caused FC as they were not up-to date.
- Removed key backlight from lights.v9.so (does not exist on the v9)
- Removed duplicate system properties and moved all properties to system.prop
- Removed TARGET_USES_16BPPSURFACE_FOR_OPAQUE from BoardConfig.mk as it is obsolete.

Change-Id: I4bbd6632a5add9d42b8232c9e54602483bbf5080
  • Loading branch information
kalltkaffe committed Nov 30, 2011
1 parent 91ae3ff commit b9d6e13
Show file tree
Hide file tree
Showing 50 changed files with 30 additions and 216 deletions.
1 change: 0 additions & 1 deletion BoardConfig.mk
Expand Up @@ -54,7 +54,6 @@ WITH_JIT := true
ENABLE_JSC_JIT := true

TARGET_LIBAGL_USE_GRALLOC_COPYBITS := true
TARGET_USES_16BPPSURFACE_FOR_OPAQUE := true

JS_ENGINE := v8

Expand Down
43 changes: 0 additions & 43 deletions device_v9.mk
Expand Up @@ -112,52 +112,9 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
device/zte/v9/media_profiles.xml:system/etc/media_profiles.xml

PRODUCT_PROPERTY_OVERRIDES := \
keyguard.no_require_sim=true \
ro.com.android.dateformat=dd-MM-yyyy \
ro.ril.hsxpa=1 \
ro.ril.gprsclass=10 \
ro.media.dec.jpeg.memcap=10000000

PRODUCT_PROPERTY_OVERRIDES += \
rild.libpath=/system/lib/libril-qc-1.so \
rild.libargs=-d /dev/smd0 \
wifi.interface=wlan0 \
wifi.supplicant_scan_interval=15 \
ro.com.android.dataroaming=false

PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=160 \
ro.sf.hwrotation=270

# V9 uses medium-density artwork where available
PRODUCT_LOCALES += mdpi

# we have enough storage space to hold precise GC data
PRODUCT_TAGS += dalvik.gc.type-precise

# This should not be needed but on-screen keyboard uses the wrong density without it.
PRODUCT_PROPERTY_OVERRIDES += \
qemu.sf.lcd_density=160

PRODUCT_PROPERTY_OVERRIDES += \
keyguard.no_require_sim=true \
ro.com.android.dateformat=dd-MM-yyyy \
ro.ril.hsxpa=2 \
ro.ril.gprsclass=10 \
ro.build.baseband_version=P729BB01 \
ro.telephony.default_network=0 \
ro.telephony.call_ring.multiple=false

PRODUCT_PROPERTY_OVERRIDES += \
ro.com.google.locationfeatures=1 \
ro.setupwizard.enable_bypass=1 \
ro.media.dec.jpeg.memcap=20000000 \
dalvik.vm.lockprof.threshold=500 \
dalvik.vm.dexopt-flags=m=y \
dalvik.vm.heapsize=32m \
dalvik.vm.execution-mode=int:jit \
dalvik.vm.dexopt-data-only=1 \
ro.opengles.version=131072 \
ro.compcache.default=0

Binary file modified kernel
Binary file not shown.
18 changes: 0 additions & 18 deletions liblights/lights.c
Expand Up @@ -122,21 +122,6 @@ static int set_light_backlight (struct light_device_t *dev, struct light_state_t
return err;
}

static int set_light_buttons (struct light_device_t *dev, struct light_state_t const* state) {
size_t i = 0;
int err = 0;
int on = is_lit(state);
pthread_mutex_lock(&g_lock);

for (i = 0; i < sizeof(BUTTON_BACKLIGHT_FILE)/sizeof(BUTTON_BACKLIGHT_FILE[0]); i++) {
err = write_int (BUTTON_BACKLIGHT_FILE[i],on?1:0);
}

pthread_mutex_unlock(&g_lock);

return 0;
}

static void set_shared_light_locked (struct light_device_t *dev, struct light_state_t *state) {
int r, g, b;
int err = 0;
Expand Down Expand Up @@ -202,9 +187,6 @@ static int open_lights (const struct hw_module_t* module, char const* name,
if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) {
set_light = set_light_backlight;
}
else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) {
set_light = set_light_buttons;
}
else if (0 == strcmp(LIGHT_ID_BATTERY, name)) {
set_light = set_light_battery;
}
Expand Down
4 changes: 0 additions & 4 deletions liblights/lights.h
Expand Up @@ -4,8 +4,4 @@ char const*const GREEN_LED_FILE = "/sys/class/leds/green/brightness";
char const*const RED_LED_FILE_TRIGGER = "/sys/class/leds/red/blink";
char const*const GREEN_LED_FILE_TRIGGER = "/sys/class/leds/green/blink";

char const*const BUTTON_BACKLIGHT_FILE[] = {
"/sys/class/leds/button-backlight/brightness",
};

char const*const LCD_BACKLIGHT_FILE = "/sys/class/leds/lcd-backlight/brightness";
7 changes: 7 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Expand Up @@ -162,6 +162,13 @@
honeycomb modifications become available for phones -->
<bool name="cm_default_is_tablet">true</bool>

<!-- Devices with WVGA resolution and mdpi density need this
workaround to prevent the recent applications dialog from randomly
using HVGA dimensions. It's likely that other high res/low dpi
combinations will need this too. -->
<bool name="cm_default_recentapps_tablet_workaround">true</bool>


<!-- Specifies the amount of time to disable virtual keys after the screen is touched
in order to filter out accidental virtual key presses due to swiping gestures
or taps near the edge of the display. May be 0 to disable the feature.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed overlay/packages/apps/FM/res/drawable-mdpi/icon.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
147 changes: 0 additions & 147 deletions overlay/packages/apps/FM/res/layout-mdpi/fmradio.xml

This file was deleted.

24 changes: 22 additions & 2 deletions system.prop
Expand Up @@ -2,5 +2,25 @@
# system.prop for v9
#

#ro.additionalmounts=/mnt/usbdisk

ro.additionalmounts=/mnt/usbdisk
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.media.dec.jpeg.memcap=20000000
rild.libpath=/system/lib/libril-qc-1.so
rild.libargs=-d /dev/smd0
wifi.interface=wlan0
wifi.supplicant_scan_interval=15
ro.sf.lcd_density=160
qemu.sf.lcd_density=160
ro.sf.hwrotation=270
ro.build.baseband_version=P729BB01
ro.telephony.default_network=0
ro.telephony.call_ring.multiple=false
ro.com.google.locationfeatures=1
ro.setupwizard.enable_bypass=1
dalvik.vm.lockprof.threshold=500
dalvik.vm.heapsize=32m
dalvik.vm.execution-mode=int:jit
dalvik.vm.dexopt-data-only=1
ro.opengles.version=131072
ro.compcache.default=0
2 changes: 1 addition & 1 deletion vold.fstab
Expand Up @@ -13,6 +13,6 @@
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0

## USB storage device
#dev_mount usbdisk /mnt/usbdisk auto /devices/platform/msm_hsusb
dev_mount usbdisk /mnt/usbdisk auto /devices/platform/msm_hsusb


0 comments on commit b9d6e13

Please sign in to comment.