From 2538cbd4349b3b8da33f78837f9b0f1a11aef02d Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Sun, 18 Dec 2011 16:45:49 +0100 Subject: Add CM definitions --- BoardConfigCommon.mk | 6 ++++++ cm.mk | 13 +++++++++++++ device.mk | 1 + device_base.mk | 4 ++-- vendorsetup.sh | 2 +- 5 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 cm.mk diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 61d04a4..a7bdd3f 100755 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -77,3 +77,9 @@ WIFI_DRIVER_MODULE_NAME := "bcm4329" WIFI_DRIVER_MODULE_ARG := "iface_name=wlan0 firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/vendor/firmware/nvram_net.txt" USE_OPENGL_RENDERER := true + +# this 2 has being removed by google +# BOARD_HAS_NO_SELECT_BUTTON := true +# BOARD_CUSTOM_GRAPHICS := ../../../device/samsung/crespo/graphics.c + +BOARD_USE_SKIA_LCDTEXT := true diff --git a/cm.mk b/cm.mk new file mode 100644 index 0000000..1f0f2a6 --- /dev/null +++ b/cm.mk @@ -0,0 +1,13 @@ +$(call inherit-product, device/samsung/crespo/full_crespo.mk) + +PRODUCT_RELEASE_NAME := NS +# Inherit some common CM stuff. +$(call inherit-product, vendor/cm/config/common_full_phone.mk) + +# Inherit some common CM stuff. +$(call inherit-product, vendor/cm/config/gsm.mk) + +PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=soju BUILD_ID=IML74K BUILD_FINGERPRINT=google/soju/crespo:4.0.3/IML74K/239410:user/release-keys PRIVATE_BUILD_DESC="soju-user 4.0.3 IML74K 239410 release-keys" BUILD_NUMBER=239410 +PRODUCT_NAME := cm_crespo +PRODUCT_DEVICE := crespo + diff --git a/device.mk b/device.mk index b028f3c..cd96a85 100644 --- a/device.mk +++ b/device.mk @@ -51,3 +51,4 @@ $(call inherit-product, device/samsung/crespo/device_base.mk) # commonly available $(call inherit-product-if-exists, vendor/samsung/crespo/device-vendor.mk) +$(call inherit-product-if-exists, vendor/samsung/crespo/device-vendor-blobs.mk) diff --git a/device_base.mk b/device_base.mk index 4d0f2d5..79b213b 100644 --- a/device_base.mk +++ b/device_base.mk @@ -39,7 +39,7 @@ # These is the hardware-specific overlay, which points to the location # of hardware-specific resource overrides, typically the frameworks and # application settings that are stored in resourced. -DEVICE_PACKAGE_OVERLAYS := device/samsung/crespo/overlay +DEVICE_PACKAGE_OVERLAYS += device/samsung/crespo/overlay # These are the hardware-specific configuration files PRODUCT_COPY_FILES := \ @@ -137,7 +137,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ lights.s5pc110 \ hwcomposer.s5pc110 \ - sensors.herring + sensors.herring # Camera PRODUCT_PACKAGES += \ diff --git a/vendorsetup.sh b/vendorsetup.sh index f5faebf..ae47da5 100755 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -20,4 +20,4 @@ # In particular, you can add lunch options with the add_lunch_combo # function: add_lunch_combo generic-eng -add_lunch_combo full_crespo-userdebug +add_lunch_combo cm_crespo-userdebug -- cgit v1.1 From 0036ecd8d2b7bc48758147293387e534d985c1e5 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Sun, 18 Dec 2011 16:46:37 +0100 Subject: Update bin kernel Added LED Notificatio --- bcm4329.ko | Bin 276884 -> 276908 bytes kernel | Bin 3350564 -> 3455868 bytes liblight/lights.c | 28 +++++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 3 deletions(-) mode change 100644 => 100755 kernel diff --git a/bcm4329.ko b/bcm4329.ko index 782310f..b9ce1c2 100644 Binary files a/bcm4329.ko and b/bcm4329.ko differ diff --git a/kernel b/kernel old mode 100644 new mode 100755 index e9baa5a..ccb571e Binary files a/kernel and b/kernel differ diff --git a/liblight/lights.c b/liblight/lights.c index ee6416a..470c217 100755 --- a/liblight/lights.c +++ b/liblight/lights.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2008 The Android Open Source Project + * Copyright (C) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +15,7 @@ * limitations under the License. */ +// #define LOG_NDEBUG 0 #define LOG_TAG "lights" #include #include @@ -29,13 +31,12 @@ static pthread_once_t g_init = PTHREAD_ONCE_INIT; static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; char const *const LCD_FILE = "/sys/class/backlight/s5p_bl/brightness"; +char const *const LED_FILE = "/sys/class/misc/notification/led"; static int write_int(char const *path, int value) { int fd; - static int already_warned; - - already_warned = 0; + static int already_warned = 0; LOGV("write_int: path %s, value %d", path, value); fd = open(path, O_RDWR); @@ -63,6 +64,25 @@ static int rgb_to_brightness(struct light_state_t const *state) + (150*((color>>8) & 0x00ff)) + (29*(color & 0x00ff))) >> 8; } +static int set_light_notifications(struct light_device_t* dev, + struct light_state_t const* state) +{ + int brightness = rgb_to_brightness(state); + int v = 0; + int ret = 0; + + pthread_mutex_lock(&g_lock); + if (brightness+state->color == 0 || brightness > 100) { + if (state->color & 0x00ffffff) + v = 1; + } else + v = 0; + LOGI("color %u fm %u status %u is lit %u brightness", state->color, state->flashMode, v, (state->color & 0x00ffffff), brightness); + ret = write_int(LED_FILE, v); + pthread_mutex_unlock(&g_lock); + return ret; +} + static int set_light_backlight(struct light_device_t *dev, struct light_state_t const *state) { @@ -95,6 +115,8 @@ 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_NOTIFICATIONS, name)) + set_light = set_light_notifications; else return -EINVAL; -- cgit v1.1 From 3c931273f01d2dfd98cf971d3fe0202692f0b0e7 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 20 Dec 2011 11:22:44 +0100 Subject: Updated Kernel for voodoo control sound and color Change-Id: Ic3ec5fb6d67f7f3dfa2235e329ea854ff94e7b9d --- bcm4329.ko | Bin 276908 -> 276908 bytes kernel | Bin 3455868 -> 3464284 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/bcm4329.ko b/bcm4329.ko index b9ce1c2..3645ce7 100644 Binary files a/bcm4329.ko and b/bcm4329.ko differ diff --git a/kernel b/kernel index ccb571e..a1cc329 100755 Binary files a/kernel and b/kernel differ -- cgit v1.1 From 6b97762ec160cb6a787f04005f49947a0ddf8162 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 20 Dec 2011 11:22:56 +0100 Subject: Add musicFX app Change-Id: I40497d9b8b8990f6ee8950380e468a86916867cc --- device_base.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device_base.mk b/device_base.mk index 79b213b..97acc7e 100644 --- a/device_base.mk +++ b/device_base.mk @@ -160,6 +160,11 @@ PRODUCT_PACKAGES += \ libstagefrighthw \ com.android.future.usb.accessory +# Extra apps +PRODUCT_PACKAGES += \ + MusicFX + + # Input device calibration files PRODUCT_COPY_FILES += \ device/samsung/crespo/mxt224_ts_input.idc:system/usr/idc/mxt224_ts_input.idc -- cgit v1.1 From fcb68d4612fdd8a69a95718cf3794d6831719fc0 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 20 Dec 2011 18:59:49 +0100 Subject: Removed MusicFX since we already have DSP manager Also removed vendorsetup since is already on vendor cm Change-Id: I567fe0f8ecf8d4bc25167e6339006eda40c66e93 --- device_base.mk | 5 ----- vendorsetup.sh | 23 ----------------------- 2 files changed, 28 deletions(-) delete mode 100755 vendorsetup.sh diff --git a/device_base.mk b/device_base.mk index 97acc7e..79b213b 100644 --- a/device_base.mk +++ b/device_base.mk @@ -160,11 +160,6 @@ PRODUCT_PACKAGES += \ libstagefrighthw \ com.android.future.usb.accessory -# Extra apps -PRODUCT_PACKAGES += \ - MusicFX - - # Input device calibration files PRODUCT_COPY_FILES += \ device/samsung/crespo/mxt224_ts_input.idc:system/usr/idc/mxt224_ts_input.idc diff --git a/vendorsetup.sh b/vendorsetup.sh deleted file mode 100755 index ae47da5..0000000 --- a/vendorsetup.sh +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (C) 2008 The Android Open Source 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. -# - -# This file is executed by build/envsetup.sh, and can use anything -# defined in envsetup.sh. -# -# In particular, you can add lunch options with the add_lunch_combo -# function: add_lunch_combo generic-eng - -add_lunch_combo cm_crespo-userdebug -- cgit v1.1 From 7659938515fa237a4b65c0e1adc992e5c54a485c Mon Sep 17 00:00:00 2001 From: Gerad Munsch Date: Thu, 29 Dec 2011 21:46:43 -0500 Subject: Override PRODUCT_* information Change-Id: I6f0cbe69ba9715fde8313b93ab5c09e8c1de9366 --- cm.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cm.mk b/cm.mk index 1f0f2a6..5d2f9a4 100644 --- a/cm.mk +++ b/cm.mk @@ -10,4 +10,6 @@ $(call inherit-product, vendor/cm/config/gsm.mk) PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=soju BUILD_ID=IML74K BUILD_FINGERPRINT=google/soju/crespo:4.0.3/IML74K/239410:user/release-keys PRIVATE_BUILD_DESC="soju-user 4.0.3 IML74K 239410 release-keys" BUILD_NUMBER=239410 PRODUCT_NAME := cm_crespo PRODUCT_DEVICE := crespo - +PRODUCT_BRAND := Google +PRODUCT_MODEL := Nexus S +PRODUCT_MANUFACTURER := Samsung -- cgit v1.1 From 3f825f8916bece79d29c3b2816a755f656b42876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Silva?= Date: Sat, 7 Jan 2012 00:03:53 -0300 Subject: Fix recovery. Added BOARD_HAS_NO_SELECT_BUTTON and BOARD_CUSTOM_GRAPHICS back needed by recovery. Change-Id: Ic098186b5611d75e8c4fef09ecf4582b2c6c5d52 --- BoardConfigCommon.mk | 5 +- graphics.c | 314 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 316 insertions(+), 3 deletions(-) create mode 100644 graphics.c diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index a7bdd3f..dd18658 100755 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -78,8 +78,7 @@ WIFI_DRIVER_MODULE_ARG := "iface_name=wlan0 firmware_path=/vendor/firmware USE_OPENGL_RENDERER := true -# this 2 has being removed by google -# BOARD_HAS_NO_SELECT_BUTTON := true -# BOARD_CUSTOM_GRAPHICS := ../../../device/samsung/crespo/graphics.c +BOARD_HAS_NO_SELECT_BUTTON := true +BOARD_CUSTOM_GRAPHICS := ../../../device/samsung/crespo/graphics.c BOARD_USE_SKIA_LCDTEXT := true diff --git a/graphics.c b/graphics.c new file mode 100644 index 0000000..4127c40 --- /dev/null +++ b/graphics.c @@ -0,0 +1,314 @@ +/* + * Copyright (C) 2007 The Android Open Source 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. + */ + +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include "font_10x18.h" +#include "minui.h" + +typedef struct { + GGLSurface texture; + unsigned cwidth; + unsigned cheight; + unsigned ascent; +} GRFont; + +static GRFont *gr_font = 0; +static GGLContext *gr_context = 0; +static GGLSurface gr_font_texture; +static GGLSurface gr_framebuffer[2]; +static GGLSurface gr_mem_surface; +static unsigned gr_active_fb = 0; + +static int gr_fb_fd = -1; +static int gr_vt_fd = -1; + +static struct fb_var_screeninfo vi; + +static int get_framebuffer(GGLSurface *fb) +{ + int fd; + struct fb_fix_screeninfo fi; + void *bits; + + fd = open("/dev/graphics/fb0", O_RDWR); + if (fd < 0) { + perror("cannot open fb0"); + return -1; + } + + if (ioctl(fd, FBIOGET_FSCREENINFO, &fi) < 0) { + perror("failed to get fb0 info"); + close(fd); + return -1; + } + + if (ioctl(fd, FBIOGET_VSCREENINFO, &vi) < 0) { + perror("failed to get fb0 info"); + close(fd); + return -1; + } + + bits = mmap(0, fi.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (bits == MAP_FAILED) { + perror("failed to mmap framebuffer"); + close(fd); + return -1; + } + + fb->version = sizeof(*fb); + fb->width = vi.xres; + fb->height = vi.yres; + fb->stride = vi.xres; + fb->data = bits; + fb->format = GGL_PIXEL_FORMAT_RGB_565; + memset(fb->data, 0, vi.yres * vi.xres * 2); + + fb++; + + fb->version = sizeof(*fb); + fb->width = vi.xres; + fb->height = vi.yres; + fb->stride = vi.xres; + fb->data = (void*) (((unsigned) bits) + vi.yres * vi.xres * 2); + fb->format = GGL_PIXEL_FORMAT_RGB_565; + memset(fb->data, 0, vi.yres * vi.xres * 2); + + return fd; +} + +static void get_memory_surface(GGLSurface* ms) { + ms->version = sizeof(*ms); + ms->width = vi.xres; + ms->height = vi.yres; + ms->stride = vi.xres; + ms->data = malloc(vi.xres * vi.yres * 2); + ms->format = GGL_PIXEL_FORMAT_RGB_565; +} + +static void set_active_framebuffer(unsigned n) +{ + if (n > 1) return; + vi.yres_virtual = vi.yres * 2; + vi.yoffset = n * vi.yres; + vi.bits_per_pixel = 16; + if (ioctl(gr_fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) { + perror("active fb swap failed"); + } +} + +void gr_flip(void) +{ + GGLContext *gl = gr_context; + + /* swap front and back buffers */ + gr_active_fb = (gr_active_fb + 1) & 1; + + /* copy data from the in-memory surface to the buffer we're about + * to make active. */ + memcpy(gr_framebuffer[gr_active_fb].data, gr_mem_surface.data, + vi.xres * vi.yres * 2); + + /* inform the display driver */ + set_active_framebuffer(gr_active_fb); +} + +void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a) +{ + GGLContext *gl = gr_context; + GGLint color[4]; + color[0] = ((r << 8) | r) + 1; + color[1] = ((g << 8) | g) + 1; + color[2] = ((b << 8) | b) + 1; + color[3] = ((a << 8) | a) + 1; + gl->color4xv(gl, color); +} + +int gr_measure(const char *s) +{ + return gr_font->cwidth * strlen(s); +} + +int gr_text(int x, int y, const char *s) +{ + GGLContext *gl = gr_context; + GRFont *font = gr_font; + unsigned off; + + y -= font->ascent; + + gl->bindTexture(gl, &font->texture); + gl->texEnvi(gl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE); + gl->texGeni(gl, GGL_S, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE); + gl->texGeni(gl, GGL_T, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE); + gl->enable(gl, GGL_TEXTURE_2D); + + while((off = *s++)) { + off -= 32; + if (off < 96) { + gl->texCoord2i(gl, (off * font->cwidth) - x, 0 - y); + gl->recti(gl, x, y, x + font->cwidth, y + font->cheight); + } + x += font->cwidth; + } + + return x; +} + +void gr_fill(int x, int y, int w, int h) +{ + GGLContext *gl = gr_context; + gl->disable(gl, GGL_TEXTURE_2D); + gl->recti(gl, x, y, w, h); +} + +void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy) { + if (gr_context == NULL) { + return; + } + GGLContext *gl = gr_context; + + gl->bindTexture(gl, (GGLSurface*) source); + gl->texEnvi(gl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE); + gl->texGeni(gl, GGL_S, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE); + gl->texGeni(gl, GGL_T, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE); + gl->enable(gl, GGL_TEXTURE_2D); + gl->texCoord2i(gl, sx - dx, sy - dy); + gl->recti(gl, dx, dy, dx + w, dy + h); +} + +unsigned int gr_get_width(gr_surface surface) { + if (surface == NULL) { + return 0; + } + return ((GGLSurface*) surface)->width; +} + +unsigned int gr_get_height(gr_surface surface) { + if (surface == NULL) { + return 0; + } + return ((GGLSurface*) surface)->height; +} + +static void gr_init_font(void) +{ + GGLSurface *ftex; + unsigned char *bits, *rle; + unsigned char *in, data; + + gr_font = calloc(sizeof(*gr_font), 1); + ftex = &gr_font->texture; + + bits = malloc(font.width * font.height); + + ftex->version = sizeof(*ftex); + ftex->width = font.width; + ftex->height = font.height; + ftex->stride = font.width; + ftex->data = (void*) bits; + ftex->format = GGL_PIXEL_FORMAT_A_8; + + in = font.rundata; + while((data = *in++)) { + memset(bits, (data & 0x80) ? 255 : 0, data & 0x7f); + bits += (data & 0x7f); + } + + gr_font->cwidth = font.cwidth; + gr_font->cheight = font.cheight; + gr_font->ascent = font.cheight - 2; +} + +int gr_init(void) +{ + gglInit(&gr_context); + GGLContext *gl = gr_context; + + gr_init_font(); + gr_vt_fd = open("/dev/tty0", O_RDWR | O_SYNC); + if (gr_vt_fd < 0) { + // This is non-fatal; post-Cupcake kernels don't have tty0. + perror("can't open /dev/tty0"); + } else if (ioctl(gr_vt_fd, KDSETMODE, (void*) KD_GRAPHICS)) { + // However, if we do open tty0, we expect the ioctl to work. + perror("failed KDSETMODE to KD_GRAPHICS on tty0"); + gr_exit(); + return -1; + } + + gr_fb_fd = get_framebuffer(gr_framebuffer); + if (gr_fb_fd < 0) { + gr_exit(); + return -1; + } + + get_memory_surface(&gr_mem_surface); + + fprintf(stderr, "framebuffer: fd %d (%d x %d)\n", + gr_fb_fd, gr_framebuffer[0].width, gr_framebuffer[0].height); + + /* start with 0 as front (displayed) and 1 as back (drawing) */ + gr_active_fb = 0; + set_active_framebuffer(0); + gl->colorBuffer(gl, &gr_mem_surface); + + gl->activeTexture(gl, 0); + gl->enable(gl, GGL_BLEND); + gl->blendFunc(gl, GGL_SRC_ALPHA, GGL_ONE_MINUS_SRC_ALPHA); + + return 0; +} + +void gr_exit(void) +{ + close(gr_fb_fd); + gr_fb_fd = -1; + + free(gr_mem_surface.data); + + ioctl(gr_vt_fd, KDSETMODE, (void*) KD_TEXT); + close(gr_vt_fd); + gr_vt_fd = -1; +} + +int gr_fb_width(void) +{ + return gr_framebuffer[0].width; +} + +int gr_fb_height(void) +{ + return gr_framebuffer[0].height; +} + +gr_pixel *gr_fb_data(void) +{ + return (unsigned short *) gr_mem_surface.data; +} -- cgit v1.1 From 8bd8d9965bc415c858159b8a8f3f9a5ea5bc075f Mon Sep 17 00:00:00 2001 From: Robert Burns Date: Mon, 9 Jan 2012 17:45:34 +0100 Subject: Readded CrespoParts with more options Change-Id: I7a388e5ebc33ba2fb7b5f009c843fae12693c9dd --- CrespoParts/Android.mk | 15 ++ CrespoParts/AndroidManifest.xml | 32 ++++ CrespoParts/res/drawable/color_tuning_preview.xml | 9 + .../res/drawable/ic_launcher_cmdevicesettings.png | Bin 0 -> 8207 bytes .../res/layout/preference_dialog_color_tuning.xml | 92 +++++++++ .../res/layout/preference_dialog_gamma_tuning.xml | 92 +++++++++ CrespoParts/res/layout/top.xml | 5 + CrespoParts/res/values-da/strings.xml | 49 +++++ CrespoParts/res/values-es/arrays.xml | 22 +++ CrespoParts/res/values-es/strings.xml | 49 +++++ CrespoParts/res/values-fr/strings.xml | 50 +++++ CrespoParts/res/values-it/arrays.xml | 28 +++ CrespoParts/res/values-it/strings.xml | 54 ++++++ CrespoParts/res/values-ja/arrays.xml | 54 ++++++ CrespoParts/res/values-ja/strings.xml | 55 ++++++ CrespoParts/res/values-ko/strings.xml | 49 +++++ CrespoParts/res/values-nl/strings.xml | 49 +++++ CrespoParts/res/values-pt-rPT/arrays.xml | 27 +++ CrespoParts/res/values-pt-rPT/strings.xml | 52 +++++ CrespoParts/res/values-ru/arrays.xml | 28 +++ CrespoParts/res/values-ru/strings.xml | 54 ++++++ CrespoParts/res/values-tr/strings.xml | 50 +++++ CrespoParts/res/values-zh-rCN/arrays.xml | 34 ++++ CrespoParts/res/values-zh-rCN/strings.xml | 54 ++++++ CrespoParts/res/values-zh-rTW/arrays.xml | 34 ++++ CrespoParts/res/values-zh-rTW/strings.xml | 54 ++++++ CrespoParts/res/values/arrays.xml | 54 ++++++ CrespoParts/res/values/strings.xml | 62 ++++++ CrespoParts/res/xml/display_preferences.xml | 15 ++ CrespoParts/res/xml/general_preferences.xml | 32 ++++ CrespoParts/res/xml/main.xml | 58 ++++++ CrespoParts/res/xml/sound_preferences.xml | 68 +++++++ CrespoParts/res/xml/touch_preferences.xml | 21 ++ CrespoParts/res/xml/wm8994_settings.xml | 72 +++++++ .../settings/device/ColorTuningPreference.java | 206 ++++++++++++++++++++ .../settings/device/DeviceSettings.java | 164 ++++++++++++++++ .../settings/device/DisplayFragmentActivity.java | 50 +++++ .../settings/device/GammaTuningPreference.java | 211 +++++++++++++++++++++ .../settings/device/GeneralFragmentActivity.java | 96 ++++++++++ .../src/com/cyanogenmod/settings/device/Hspa.java | 57 ++++++ .../settings/device/SoundFragmentActivity.java | 98 ++++++++++ .../com/cyanogenmod/settings/device/Startup.java | 20 ++ .../settings/device/TouchFragmentActivity.java | 53 ++++++ .../settings/device/TouchKeyBacklightTimeout.java | 36 ++++ .../settings/device/TouchKeyBlinkTimeout.java | 36 ++++ .../src/com/cyanogenmod/settings/device/Utils.java | 149 +++++++++++++++ 46 files changed, 2649 insertions(+) create mode 100644 CrespoParts/Android.mk create mode 100644 CrespoParts/AndroidManifest.xml create mode 100644 CrespoParts/res/drawable/color_tuning_preview.xml create mode 100755 CrespoParts/res/drawable/ic_launcher_cmdevicesettings.png create mode 100644 CrespoParts/res/layout/preference_dialog_color_tuning.xml create mode 100644 CrespoParts/res/layout/preference_dialog_gamma_tuning.xml create mode 100755 CrespoParts/res/layout/top.xml create mode 100644 CrespoParts/res/values-da/strings.xml create mode 100644 CrespoParts/res/values-es/arrays.xml create mode 100644 CrespoParts/res/values-es/strings.xml create mode 100644 CrespoParts/res/values-fr/strings.xml create mode 100644 CrespoParts/res/values-it/arrays.xml create mode 100644 CrespoParts/res/values-it/strings.xml create mode 100644 CrespoParts/res/values-ja/arrays.xml create mode 100644 CrespoParts/res/values-ja/strings.xml create mode 100644 CrespoParts/res/values-ko/strings.xml create mode 100644 CrespoParts/res/values-nl/strings.xml create mode 100644 CrespoParts/res/values-pt-rPT/arrays.xml create mode 100644 CrespoParts/res/values-pt-rPT/strings.xml create mode 100644 CrespoParts/res/values-ru/arrays.xml create mode 100644 CrespoParts/res/values-ru/strings.xml create mode 100644 CrespoParts/res/values-tr/strings.xml create mode 100644 CrespoParts/res/values-zh-rCN/arrays.xml create mode 100644 CrespoParts/res/values-zh-rCN/strings.xml create mode 100644 CrespoParts/res/values-zh-rTW/arrays.xml create mode 100644 CrespoParts/res/values-zh-rTW/strings.xml create mode 100644 CrespoParts/res/values/arrays.xml create mode 100644 CrespoParts/res/values/strings.xml create mode 100755 CrespoParts/res/xml/display_preferences.xml create mode 100644 CrespoParts/res/xml/general_preferences.xml create mode 100644 CrespoParts/res/xml/main.xml create mode 100755 CrespoParts/res/xml/sound_preferences.xml create mode 100755 CrespoParts/res/xml/touch_preferences.xml create mode 100644 CrespoParts/res/xml/wm8994_settings.xml create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java create mode 100755 CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/Hspa.java create mode 100755 CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/Startup.java create mode 100755 CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java create mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/Utils.java diff --git a/CrespoParts/Android.mk b/CrespoParts/Android.mk new file mode 100644 index 0000000..ef015ef --- /dev/null +++ b/CrespoParts/Android.mk @@ -0,0 +1,15 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := optional + +LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13 + +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_PACKAGE_NAME := CrespoParts +LOCAL_CERTIFICATE := platform + +include $(BUILD_PACKAGE) + +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/CrespoParts/AndroidManifest.xml b/CrespoParts/AndroidManifest.xml new file mode 100644 index 0000000..b736787 --- /dev/null +++ b/CrespoParts/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CrespoParts/res/drawable/color_tuning_preview.xml b/CrespoParts/res/drawable/color_tuning_preview.xml new file mode 100644 index 0000000..2d83c10 --- /dev/null +++ b/CrespoParts/res/drawable/color_tuning_preview.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/CrespoParts/res/drawable/ic_launcher_cmdevicesettings.png b/CrespoParts/res/drawable/ic_launcher_cmdevicesettings.png new file mode 100755 index 0000000..66de9c3 Binary files /dev/null and b/CrespoParts/res/drawable/ic_launcher_cmdevicesettings.png differ diff --git a/CrespoParts/res/layout/preference_dialog_color_tuning.xml b/CrespoParts/res/layout/preference_dialog_color_tuning.xml new file mode 100644 index 0000000..6154982 --- /dev/null +++ b/CrespoParts/res/layout/preference_dialog_color_tuning.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CrespoParts/res/layout/preference_dialog_gamma_tuning.xml b/CrespoParts/res/layout/preference_dialog_gamma_tuning.xml new file mode 100644 index 0000000..3ece54b --- /dev/null +++ b/CrespoParts/res/layout/preference_dialog_gamma_tuning.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CrespoParts/res/layout/top.xml b/CrespoParts/res/layout/top.xml new file mode 100755 index 0000000..744b568 --- /dev/null +++ b/CrespoParts/res/layout/top.xml @@ -0,0 +1,5 @@ + + diff --git a/CrespoParts/res/values-da/strings.xml b/CrespoParts/res/values-da/strings.xml new file mode 100644 index 0000000..116377b --- /dev/null +++ b/CrespoParts/res/values-da/strings.xml @@ -0,0 +1,49 @@ + + + Nexus S Indstillinger + + WM8994 Indstillinger ( voodoo ) + Farve Justering + Juster skærm farve + Rød + Grøn + Blå + + + Lyd + + Intern Højtaler Indstillinger + Signal Bearbejdning + Høretelefons Forstærker + Codec Optimering + Digital/Analog Konverterings Indstillinger + Analog Linie Konfiguration + Microfon Indstillinger + + Lyd Instillinger + Lyd Indstillinger + Avanceret kontrol af WM8994 lyd bearbejdnings hardware + Aktiver WM8994 Kontrol + Aktiver avanceret kontrol af WM8994 bearbejdnings hardware + Juster højtaler til musik + Rekonfigurer hardware EQ for mere bas og balanceret lyd + Mono downmix + Downmix stereo lyd til mono (for stereo outputs, så som høretelefoner) + Stereo ekspansion + "Udvid" stereo lyd via digital signal bearbejdning + D/AC direkte + Tilgå digital/analog konverter direkte, udenom channel mixer. Giver renere lyd (sænker signal-to-noise forholdet) + Hi-fi afspilning + Digital-til-analog konverter 128x oversampling -- renere lyd når der afspilles musik + Hi-fi optagelse + Analog-to-digital konverter 128x oversampling -- øger kvaliteten af optagelser + Tuned lyd frekvens + Brug tuned WM8994 lyd frekvens kilde -- øger kvaliteten af lyd + + Touch Knapper + Baggrundslys Timeout + Indstil forsinkelsen for hvornår touch knappernes lys skal slukkes + Blink Timeout + Indstil forsinkelsen for hvornår touch knappernes blink lys automatisk skal slukkes efter en notifikation + + diff --git a/CrespoParts/res/values-es/arrays.xml b/CrespoParts/res/values-es/arrays.xml new file mode 100644 index 0000000..8f0d39d --- /dev/null +++ b/CrespoParts/res/values-es/arrays.xml @@ -0,0 +1,22 @@ + + + 2 segundos + Por defecto (5 segundos) + 10 segundos + 15 segundos + 20 segundos + 30 segundos + Nunca + + + + 1 minuto + 2 minutos + Por defecto (5 minutos) + 10 minutos + 15 minutos + 30 minutos + Nunca + + + diff --git a/CrespoParts/res/values-es/strings.xml b/CrespoParts/res/values-es/strings.xml new file mode 100644 index 0000000..0ba86fd --- /dev/null +++ b/CrespoParts/res/values-es/strings.xml @@ -0,0 +1,49 @@ + + + Parámetros Nexus S + + Parámetros WM8994 ( voodoo ) + Modificar Color + Calibrar color pantalla + Rojo + Verde + Azul + + + Sonido + + Configurar altavoz interno + Procesado de señal + Configurar manoslibres + Optimización codec + Parámetros Digital/Analogico + Parámetros camino analógico + Parámetros del micro + + Parámetros del sonido + Parámetros del sonido + Control avanzado del procesador de sonido del WM8994 + Habilitar control WM8994 + Habilitar el control de procesador de sonido del WM8994 + Ajustar altavoz para música + Reconfigurar el EQ para tener más bajos y sonido balanceado + Mezclador a mono + Degrada estereo para salir en mono (para salidas estereo, como los cascos) + Expansión estereo + "Expande" sonido estereo via procesado digital de señal + D/AC directo + Acceso directo al convertidor digital/analogico, inhibiendo el mezclador de canales. Produce mayor señal limpia + Reproducción Hi-fi + Convertidor Digital-a-analogico 128x sobre muestreada -- sonido más claro al reproducir música + Grabación Hi-fi + Convertidor Digital-a-analogico 128x sobre muestreada -- sonido más claro al grabar + Reloj audio mejorado + Usar el reloj del sonido del WM8994 -- mejora la calidad del sonido + + Teclas + Tiempo de luz teclado + Adjusta el tiempo al que se desactiva la luz de las teclas con la pantalla encendida + Tiempo de parpadeo + Adjusta el tiempo al que deja de parpadear el teclado después de que llegue una notificación + + diff --git a/CrespoParts/res/values-fr/strings.xml b/CrespoParts/res/values-fr/strings.xml new file mode 100644 index 0000000..cd8df9d --- /dev/null +++ b/CrespoParts/res/values-fr/strings.xml @@ -0,0 +1,50 @@ + + + Paramètres Nexus S + + Paramètres WM8994 ( voodoo ) + Réglages Couleurs + Calibrage des couleurs de l\'écran + Rouge + Vert + Bleu + + + Son + + Configuration Haut-Parleur Interne + Traitement du Signal + Amplificateur Ecouteurs + Optimisation du Codec + Configuration du Convertisseur Analogique Numérique + Configuration du Chemin Analogique + Configuration du Micro + + Paramètres du Son + Paamètres du Son + Contrôle Avancé du Matériel de Traitement du Son WM8994 + Activer le Contrôle WM8994 + Activer les Contrôles Avancés du Matériel de Traitement du Son WM8994 + Régler le Haut-Parleur pour la Musique + Reconfigurer le matériel EQ pour un son plus grave et équilibré + Mélangeur Mono + Mixer le signal stéréo en mono (vers une sortie stéréo, comme des écouteurs) + Expansion Stéréo + "Expand" le signal stéréo via le processeur de traitement du signal numérique + D/AC direct + Accéder au convertisseur numérique analogique directement, en court-circuitant le mélangeur de canaux. Produit un son plus propre (signal sur bruit meilleur) + Reproduction HiFi + Suréchantillonnage 128x du convertisseur analogique numérique -- son plus propre pour la reproduction de musique + Enregistrement HiFi + Suréchantillonnage 128x du convertisseur analogique numérique -- améliore la qualité des enregistrements + Horloge audio précise + Utiliser une source horloge audio précise -- améliore la qualité du son + + Touches tactiles + Délai rétroéclairage + Régler le délai avant l\'extinction du rétroéclairage des touches tactiles + Délai clignotement + Régler le délai avant l\'arrêt du clignotement du rétroéclairage des touches tactiles après une notification + + + diff --git a/CrespoParts/res/values-it/arrays.xml b/CrespoParts/res/values-it/arrays.xml new file mode 100644 index 0000000..f377f3e --- /dev/null +++ b/CrespoParts/res/values-it/arrays.xml @@ -0,0 +1,28 @@ + + + 2 secondi + Default (5 secondi) + 10 secondi + 15 secondi + 20 secondi + 30 secondi + Mai + + + + 1 minuto + 2 minuti + Default (5 minuti) + 10 minuti + 15 minuti + 30 minuti + Mai + + + + Solo UMTS + Solo HSDPA + HSDPA + HSUPA + + + diff --git a/CrespoParts/res/values-it/strings.xml b/CrespoParts/res/values-it/strings.xml new file mode 100644 index 0000000..1e856a9 --- /dev/null +++ b/CrespoParts/res/values-it/strings.xml @@ -0,0 +1,54 @@ + + + Impostazioni Nexus S + + Impostazioni WM8994 ( voodoo ) + Regolazione Moltiplicatori Colore + Calibrazione moltiplicatori colori + Regolazione Colore Gamma + Calibrazione correzione colore gamma + Rosso + Verde + Blu + + + Audio + + Configurazione Speaker Interno + Elaborazione Segnale + Amplificatore Cuffie + Ottimizzazione Codec + Impostazioni del Convertitore Digitale/Analogico + Configurazione del Percorso Analogico + Impostazioni Microfono + + Impostazioni Audio + Impostazioni Audio + Controllo avanzato del processore audio hardware WM8994 + Abilita il Controllo di WM8994 + Abilita i controlli avanzati per il processore audio hardware WM8994 + Regola l\'altoparlante per la musica + Riconfigura l\'equalizzatore hardware per ottenere maggiori bassi ed un suono bilanciato + Mono downmix + Downmix stereo sound to mono (per le uscite stereo, come le cuffie) + Espansione stereo + "Espandi" suono stereo attraverso l\'elaborazione digitale del segnale + D/AC diretto + Accedi al convertitore digitale/analogico direttamente, aggirando il canale del mixer. Produce audio più pulito (rapporto segnale-rumore minore) + Riproduzione hi-fi + Convertitore digitale-analogico con sovracampionamento a 128x -- suoni più puliti quando riproduci musica + Registrazione hi-fi + Convertitore analogico-digitale con sovracampionamento a 128x -- incrementa la qualità delle registrazioni + Regola il clock audio + Usa il clock regolato della sorgente audio WM8994 -- migliora la qualità del suono + + Softkey + Backlight Timeout + Aggiusta il ritardo prima dello spegnimento automatico delle Softkey + Blink Timeout + Aggiusta il ritardo prima dello spegnimento automatico delle Softkey dopo una notifica + + Radio + HSPA + Abilita HSDPA/HSUPA + diff --git a/CrespoParts/res/values-ja/arrays.xml b/CrespoParts/res/values-ja/arrays.xml new file mode 100644 index 0000000..7b6f3e3 --- /dev/null +++ b/CrespoParts/res/values-ja/arrays.xml @@ -0,0 +1,54 @@ + + + 2 秒 + デフォルト (5 秒) + 10 秒 + 15 秒 + 20 秒 + 30 秒 + させない + + + + 2 + 5 + 10 + 15 + 20 + 30 + 0 + + + + 1 分 + 2 分 + デフォルト (5 分) + 10 分 + 15 分 + 30 分 + させない + + + + 1 + 2 + 5 + 10 + 15 + 30 + 0 + + + + UMTS のみ + HSDPA のみ + HSDPA と HSUPA + + + + 21 + 22 + 23 + + + diff --git a/CrespoParts/res/values-ja/strings.xml b/CrespoParts/res/values-ja/strings.xml new file mode 100644 index 0000000..9123ca9 --- /dev/null +++ b/CrespoParts/res/values-ja/strings.xml @@ -0,0 +1,55 @@ + + + Nexus S 設定 + + WM8994 設定 ( voodoo ) + 色の調整 + 画面色の調整 + ガンマの調整 + ガンマ補正の調整 + + + + + + サウンド + + スピーカー設定 + 信号処理 + ヘッドフォンアンプ + Codec最適化 + デジタル/アナログコンバータ設定 + アナログパス設定 + マイク設定 + + サウンド設定 + サウンド設定 + WM8994サウンドプロセッサの高度な制御 + WM8994サウンドプロセッサの制御を有効にする + WM8994サウンドプロセッサの高度な制御を有効にする + 音楽再生用のスピーカー調整 + より豊かな低音とバランスの取れた音質にするためハードウェアEQを再設定する + モノダウンミックス + ステレオサウンドをモノラルサウンドへダウンミックスする(ヘッドホンなどのステレオ出力用) + ステレオ拡張モード + DSPを使用することによりステレオサウンドを拡張する + D/AC ダイレクト + チャンネルのミキサーをバイパスし、直接デジタル/アナログコンバーターにアクセスする。よりクリアな音質を生成(S/N比) + Hi-fi再生 + デジタル - アナログ コンバーター 128x オーバーサンプリング -- よりクリアな音で音楽を再生する + Hi-fi録音 + アナログ - デジタル コンバーター 128x オーバーサンプリング -- 録音品質を向上させる + チューニング済みのaudio clock + チューニング済みのWM8994オーディオクロックソースを使用 -- 音質を向上させる + + タッチキー + バックライトのタイムアウト + タッチキーのバックライトが自動的にオフになるまでの遅延を調整する + 点滅のタイムアウト + タッチキーの点滅のバックライトが通知した後、自動的に消えるまでの遅延時間を調整する + + ラジオ + HSPA + HSDPA/HSUPAを有効にする + + diff --git a/CrespoParts/res/values-ko/strings.xml b/CrespoParts/res/values-ko/strings.xml new file mode 100644 index 0000000..cba12cc --- /dev/null +++ b/CrespoParts/res/values-ko/strings.xml @@ -0,0 +1,49 @@ + + + 넥서스 S 설정 + + WM8994 설정 ( 부두 ) + 색상 조율 + 화면 색상 보정 + 빨강 + 녹색 + 파랑 + + + 소리 + + 내장 스피커 구성 + 신호 처리 + 헤드폰 증폭기 + 코덱 최적화 + 디지털/아날로그 변환기 설정 + 아날로그 경로 구성 + 마이크로폰 설정 + + 소리 설정 + 소리 설정 + WM8994 소리 프로세서 하드웨어 고급 제어 + WM8994 제어 허가 + WM8994 소리 프로세서 하드웨어 고급 제어 허가 + 음악을 위한 스피커 조정 + 더 낮고 균형 잡힌 소리를 위해 하드웨어 이퀄라이저 변경 + 모노 다운믹스 + 스테레오 소리를 모노로 다운믹스 (헤드폰 같은 장치에서 스테레오로 출력하기 위함) + 스테레오 확장 + 디지털 신호 처리를 통해 스테레오 소리 "확장" + 디지털/아날로그 변환기 방향 + 채널 혼합을 거치지 않고 직접 디지털/아날로그 변환기 연결. 깔끔한 음향을 만듦 (신호대잡음비) + 고감도 재생 + 디지털/아날로그 변환기 128x 과 샘플링 -- 깔끔한 소리로 음악 재생 + 고감도 녹음 + 아날로그/디지털 변환기 128x 과 샘플링 -- 녹음 품질 증가 + 조율된 음향 회로 + 조율된 WM8994 음향 회로 소스 사용 -- 소리 품질 향상 + + 터치키 + 조명 지속시간 + 터치키 조명이 자동으로 꺼지기 전 지속시간 조정 + 깜빡임 지속시간 + 알림 뒤 깜빡임 조명이 자동으로 꺼지기 전 지속시간 조정 + + diff --git a/CrespoParts/res/values-nl/strings.xml b/CrespoParts/res/values-nl/strings.xml new file mode 100644 index 0000000..14cc02c --- /dev/null +++ b/CrespoParts/res/values-nl/strings.xml @@ -0,0 +1,49 @@ + + + Nexus S-instellingen + + WM8994-instellingen ( voodoo ) + Kleuraanpassing + Kalibreer schermkleur + Rood + Groen + Blauw + + + Geluid + + Interne luidspreker aanpassen + Signal Processing + Koptelefoon Amplifier + Codec Optimalisatie + Digitaal/Analoog Converter-instellingen + Analog Path aanpassen + Microfoon-instellingen + + Geluidsinstellingen + Geluidsinstellingen + Geavanceerde controle van de WM8994-geluidsprocessor hardware + Schakel WM8994-control in + Schakel geavanceerde controle van de WM8994-geluidsprocessor hardware in + Tune speaker for music + Reconfigures the hardware EQ voor een betere bass en gebalanceerd geluid + Mono downmix + Downmix stereo sound to mono (for stereo outputs, such as headphones) + Stereo-uitbreiding + "Expand" stereo sound via digital signal processing + D/AC direct + Stuur de digitaal/analoog-converter rechtstreeks aan, bypassing the channel mixer. Zorgt voor helderder geluid (lower signal-to-noise ratio) + Hi-fi playback + Digitaal-to-analoog-converter 128x oversampling -- cleaner sound when playing music + Hi-fi recording + Analoog-to-digitaal-converter 128x oversampling -- increases quality of recordings + Tuned audio clock + Use tuned WM8994 audio clock source -- verbetert de geluidskwaliteit + + Touch Keys + Backlight Timeout + Pas de vertraging aan voor het touch key-backlight uitgaat + Blink Timeout + Pas de vertraging aan voor het knipperend touch key-backlight uitgaat na een notificatie + + diff --git a/CrespoParts/res/values-pt-rPT/arrays.xml b/CrespoParts/res/values-pt-rPT/arrays.xml new file mode 100644 index 0000000..790c219 --- /dev/null +++ b/CrespoParts/res/values-pt-rPT/arrays.xml @@ -0,0 +1,27 @@ + + + 2 segundo + Pré-definido (5 segundos) + 10 segundos + 15 segundos + 20 segundos + 30 segundos + Nunca + + + + 1 minuto + 2 minuto + Pré-definido (5 minutos) + 10 minutos + 15 minutos + 30 minutos + Nunca + + + + Apenas UMTS + Apenas HSDPA + HSDPA + HSUPA + + diff --git a/CrespoParts/res/values-pt-rPT/strings.xml b/CrespoParts/res/values-pt-rPT/strings.xml new file mode 100644 index 0000000..3b32960 --- /dev/null +++ b/CrespoParts/res/values-pt-rPT/strings.xml @@ -0,0 +1,52 @@ + + + Definições Nexus S + + Definições WM8994 ( voodoo ) + Ajuste de Cor + Calibrar cor do ecrã + Vermelho + Verde + Azul + + + Som + + Configuração do Altifalante Interno + Processamento de Sinal + Amplificador de auscutador + Optimização de Codec + Definições de conversão Digital/Analógico + Definições de roteamento Analógico + Definições de Microfone + + Definições de Som + Definições de Som + Controlo avançado do processador de som WM8994 + Activar controlo WM8994 + Activar controlo avançado para o processador de som WM8994 + Ajustar altifalante para música + Reconfigurar equalizador de hardware para obter mais Bass/Boost + Downmix Mono + Transforma estéreo sound em mono (para outputs estéreo, tais como headphones) + Expansão estéreo + "Expande" som estéreo através de processamento digital + D/AC directamente + Acede ao conversor digital/analógco directamente, evitando o misturador de canal. Produz áudio mais limpo (rácio de signal-noise mais baixo) + Som Hi-fi + Conversor Digital-para-analógico com 128x de oversampling -- som mais limpo ao tocar música + Gravação Hi-fi + Conversor Analógico-para-digital com 128x de oversampling -- aumenta a qualidade das gravações + Ligar ao relógio de áudio + Usar o processador WM8994 como relógio para áudio -- aumenta a qualidade do som + + Botões Capacitivos + Temporizador Luz de Fundo + Ajusta o tempo que as teclas capacitivas demoram a desligar a sua luz de fundo + Temporizador de Intermitência + Ajusta o tempo que as teclas demoram a desligar a retroiluminação intermitente após notificação. + + Radio + HSPA + Activar HSDPA/HSUPA + diff --git a/CrespoParts/res/values-ru/arrays.xml b/CrespoParts/res/values-ru/arrays.xml new file mode 100644 index 0000000..aa58f8b --- /dev/null +++ b/CrespoParts/res/values-ru/arrays.xml @@ -0,0 +1,28 @@ + + + 2 секунды + По умолчанию (5 секунд) + 10 секунд + 15 секунд + 20 секунд + 30 секунд + Никогда + + + + 1 минута + 2 минуты + По умолчанию (5 минут) + 10 минут + 15 минут + 30 минут + Никогда + + + + Только UMTS + Только HSDPA + HSDPA + HSUPA + + + diff --git a/CrespoParts/res/values-ru/strings.xml b/CrespoParts/res/values-ru/strings.xml new file mode 100644 index 0000000..5b1adf2 --- /dev/null +++ b/CrespoParts/res/values-ru/strings.xml @@ -0,0 +1,54 @@ + + + Настройки Nexus S + + Настройки WM8994 ( voodoo ) + Настройка умножителей цвета + Калибровка умножителей цветов экрана + Настройка цветовой гаммы + Калибровка гамма-коррекции цвета + Красный + Зелёный + Синий + + + Звук + + Настройка внутренних динамиков + Обработка сигналов + Усиление наушников + Оптимизация кодека + Настройка цифрового/аналогового конвертера + Настройки аналогового пути + Настройки микрофона + + Настройки звука + Настройки звука + Расширенное управление звуковым процессором WM8994 + Включить управление WM8994 + Включить расширенное управление звуковым процессором WM8994 + Настройка динамиков для воспроизведения музыки + Перенастройка аппаратного эквалайзера для получения более низчких частот и сбалансированного звука + Конвертация в моно + Конвертировать стереозвук в моно (для стереовыводы, например для наушников) + Расширение стерео + Расширить стереозвук через обработку цифровых сигналов + Прямой D/AC + Доступ к цифровому/аналоговому преобразователю напрямую, минуя канальный микшер. Способствует чистому звуку (более низкое соотношение сигнал-шум) + Hi-fi воспроизведение + 128-передискретизация цифрово-аналогового преобразователя - чистый звук при воспроизведении музыки + Hi-fi запись + 128-передискретизация аналого-цифрового преобразователя - повышает качество записи + Настройка аудио-частот + Использовать настроенные аудио-частоты WM8994 - улучшает качество звука + + Сенсорные кнопки + Таймаут подсветки + Как долго работает подсветка сенсорных кнопок + Таймаут мигания + Как долго будут мигать сенсорные кнопки после уведомления + + Радиомодуль + HSPA + Включить HSDPA/HSUPA + diff --git a/CrespoParts/res/values-tr/strings.xml b/CrespoParts/res/values-tr/strings.xml new file mode 100644 index 0000000..469f5fd --- /dev/null +++ b/CrespoParts/res/values-tr/strings.xml @@ -0,0 +1,50 @@ + + + + Nexus S ayarları + + WM8994 ayarları ( voodoo ) + Renk ayarı + Ekran rengi kalibrasyonu + Kırmızı + Yeşil + Mavi + + + Ses + + Dahili hoparlör konfigürasyonu + Sinyal işleme + Kulaklık amplifikatörü + Codec optimizasyonu + Dijital / Analog Dönüştürücü ayarları + Analog yol konfigürasyonu + Mikrofon ayarları + + Ses ayarları + Ses ayarları + WM8994 Ses işlemcisi donanımı gelişmiş kontrolü + WM8994 Kontrolünü etkinleştir + WM8994 ses işlemcisi donanımı için gelişmiş denetimlerini etkinleştirme + Müzik için hoparlör ayarı + Daha fazla bas ve dengeli bir ses elde etmek için EQ donanımını yeniden yapılandırır + Mono indirgeme + Stereo sesi monoya indirgeme (stereo çıkış, kulaklık gibi) + Stereo geliştirme + Dijital sinyal işleme üzerinden stereo ses "Gelistirme" + D / AC direkt + Kanal mikser atlayarak, doğrudan, analog / dijital dönüştürücü erişim. Temiz ses (düşük sinyal-gürültü oranı) üretir. + Hi-fi oynatma + Dijital-analog çevirici 128x örnekleme - Müzik çalarken daha temiz ses + Hi-fi kaydı + Analog-dijital dönüştürücü 128x örnekleme -- kayıtların kalitesini artırır + Ayarlı ses saati + WM8994 ses saati kaynağı ayarlı kullan - ses kalitesini artırır + + Dokunmatik tuşlar + Arka ışık zaman aşımı + Dokunmatik tuşa ışığı otomatik kapanmadan önceki gecikmeyi ayarlayın + Yanıp sönme zaman aşımı + Bir bildirim sonrası dokunmatik tuşun yanıp söner arka ışığın otomatik kapanmadan önceki gecikmeyi ayarlayın. + + diff --git a/CrespoParts/res/values-zh-rCN/arrays.xml b/CrespoParts/res/values-zh-rCN/arrays.xml new file mode 100644 index 0000000..ff3e52a --- /dev/null +++ b/CrespoParts/res/values-zh-rCN/arrays.xml @@ -0,0 +1,34 @@ + + + 2秒 + 默认(5秒) + 10秒 + 15秒 + 20秒 + 30秒 + 永不 + + + + + + 1分钟 + 2分钟 + 默认(5分钟) + 10分钟 + 15分钟 + 30分钟 + 永不 + + + + + + 仅 UMTS + 仅 HSDPA + HSDPA+HSUPA + + + + + diff --git a/CrespoParts/res/values-zh-rCN/strings.xml b/CrespoParts/res/values-zh-rCN/strings.xml new file mode 100644 index 0000000..78b1a56 --- /dev/null +++ b/CrespoParts/res/values-zh-rCN/strings.xml @@ -0,0 +1,54 @@ + + + Nexus S 设置 + + WM8994 设置(Voodoo) + 颜色增值 + 调整屏幕颜色增值 + 伽玛颜色校正 + 调整伽玛颜色校正 + + 绿 + + + + 音效 + + 內置喇叭设置 + 信号处理 + 耳机扩音 + 信号编解码器优化 + 数模转换器设置 + 模拟路径设置 + 麦克风设置 + + 音效设置 + 音效设置 + WM8994 音效处理器硬件高级控制 + 开启 WM8994 控制 + 开启 WM8994 音效处理器硬件的高级控制 + 为音乐调整喇叭 + 重新设置硬件均衡器来获取更加低音及均衡的音效 + 单声道混合 + 将立体声道混合成单声道(用于立体声道输出,例如耳机) + 立体声道扩展 + 通过信号处理来”扩展“立体声道 + 直接数模转换 + 绕过频道混音器,直接访问数模转换器,来产生更清晰的音频(较低的信噪比) + Hi-Fi 播放 + 数模转换器128倍过密采样,使播放音乐时的音质更加清晰 + Hi-Fi 录音 + 数模转换器128倍过密采样,提高录音品质 + 调整音频时钟 + 使用调整过的 WM8994 音频时钟源,改善音效品质 + + 触控键 + 背光延时 + 调整触控键背光自动关闭前的延迟时间 + 闪烁延时 + 调整触控键闪烁通知自动关闭前的延迟时间 + + 无线电 + HSPA + 启用 HSDPA/HSUPA + diff --git a/CrespoParts/res/values-zh-rTW/arrays.xml b/CrespoParts/res/values-zh-rTW/arrays.xml new file mode 100644 index 0000000..e4b3886 --- /dev/null +++ b/CrespoParts/res/values-zh-rTW/arrays.xml @@ -0,0 +1,34 @@ + + + 2秒 + 預設(5秒) + 10秒 + 15秒 + 20秒 + 30秒 + 永不 + + + + + + 1分鐘 + 2分鐘 + 預設(5分鐘) + 10分鐘 + 15分鐘 + 30分鐘 + 永不 + + + + + + 僅 UMTS + 僅 HSDPA + HSDPA+HSUPA + + + + + diff --git a/CrespoParts/res/values-zh-rTW/strings.xml b/CrespoParts/res/values-zh-rTW/strings.xml new file mode 100644 index 0000000..0f475de --- /dev/null +++ b/CrespoParts/res/values-zh-rTW/strings.xml @@ -0,0 +1,54 @@ + + + Nexus S 設定 + + WM8994 設定(Voodoo) + 色彩增值 + 調整螢幕色彩增值 + 伽馬色彩校正 + 調整伽馬色彩校正 + + + + + + 音效 + + 內置喇叭設定 + 訊號處理 + 耳機擴音 + 編碼優化 + 數碼/類比轉換器設定 + 類比路徑設定 + 麥克風設定 + + 音效設定 + 音效設定 + WM8994 音效處理器硬體進階控制 + 啟用 WM8994 控制 + 啟用 WM8994 音效處理器硬體的進階控制 + 為音樂調整喇叭 + 重新設置硬體等化器以穫取更加低音及均衡的音效 + 單聲道混合 + 將雙聲道混合成單聲道(用於雙聲道輸出,例如耳機) + 雙聲道擴展 + 透過數碼訊號處理,將雙聲道音效“擴展” + 直接轉換數碼/類比 + 繞過頻道混音器,直接存取數碼/類比轉換器,以產生更清晰音訊(較低的訊噪比) + Hi-Fi 播放 + 數碼至類比的128倍過採樣轉換,使播放音樂時的音質更清晰 + Hi-Fi 錄音 + 類比至數碼的128倍過採樣轉換,提升錄音品質 + 調整音訊時脈 + 使用調整了 WM8994 音訊時脈的原始碼,提升音效品質 + + 觸控鍵 + 背光逾時 + 調整觸控鍵背光自動關閉前的延遲時間 + 閃爍逾時 + 調整觸控鍵閃爍通知自動關閉前的延遲時間 + + 行動網路 + HSPA + 啟用 HSDPA/HSUPA + diff --git a/CrespoParts/res/values/arrays.xml b/CrespoParts/res/values/arrays.xml new file mode 100644 index 0000000..874c983 --- /dev/null +++ b/CrespoParts/res/values/arrays.xml @@ -0,0 +1,54 @@ + + + 2 seconds + Default (5 seconds) + 10 seconds + 15 seconds + 20 seconds + 30 seconds + Never + + + + 2 + 5 + 10 + 15 + 20 + 30 + 0 + + + + 1 minute + 2 minutes + Default (5 minutes) + 10 minutes + 15 minutes + 30 minutes + Never + + + + 1 + 2 + 5 + 10 + 15 + 30 + 0 + + + + UMTS Only + HSDPA Only + HSDPA + HSUPA + + + + 21 + 22 + 23 + + + diff --git a/CrespoParts/res/values/strings.xml b/CrespoParts/res/values/strings.xml new file mode 100644 index 0000000..4355907 --- /dev/null +++ b/CrespoParts/res/values/strings.xml @@ -0,0 +1,62 @@ + + + Nexus S Settings + + + GENERAL + DISPLAY + SOUND + + Battery + Deep Idle + Enables deep idle, intended to provide better battery life. (Experimental at this time!) + WM8994 Settings ( voodoo ) + Color Multipliers Tuning + Calibrate multipliers screen color + Color Gamma Tuning + Calibrate gamma color correction + Red + Green + Blue + + + Sound + + Internal Speaker Configuration + Signal Processing + Headphone Amplifier + Codec Optimization + Digital/Analog Converter Settings + Analog Path Configuration + Microphone Settings + + Sound Settings + Sound Settings + Advanced control of the WM8994 sound processor hardware + Enable WM8994 Control + Enable advanced controls for the WM8994 sound processor hardware + Tune speaker for music + Reconfigures the hardware EQ to get more bass and balanced sound + Mono downmix + Downmix stereo sound to mono (for stereo outputs, such as headphones) + Stereo expansion + "Expand" stereo sound via digital signal processing + D/AC direct + Access digital/analog converter directly, bypassing the channel mixer. Produces cleaner audio (lower signal-to-noise ratio) + Hi-fi playback + Digital-to-analog converter 128x oversampling -- cleaner sound when playing music + Hi-fi recording + Analog-to-digital converter 128x oversampling -- increases quality of recordings + Tuned audio clock + Use tuned WM8994 audio clock source -- improves quality of sound + + Touch Keys + Backlight Timeout + Adjust the delay before the touch key backlight automatically turns off + Blink Timeout + Adjust the delay before the touch key blink backlight automatically turns off after a notification + + Radio + HSPA + Enable HSDPA/HSUPA + diff --git a/CrespoParts/res/xml/display_preferences.xml b/CrespoParts/res/xml/display_preferences.xml new file mode 100755 index 0000000..9772b20 --- /dev/null +++ b/CrespoParts/res/xml/display_preferences.xml @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/CrespoParts/res/xml/general_preferences.xml b/CrespoParts/res/xml/general_preferences.xml new file mode 100644 index 0000000..44c0b9c --- /dev/null +++ b/CrespoParts/res/xml/general_preferences.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + diff --git a/CrespoParts/res/xml/main.xml b/CrespoParts/res/xml/main.xml new file mode 100644 index 0000000..224cffd --- /dev/null +++ b/CrespoParts/res/xml/main.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CrespoParts/res/xml/sound_preferences.xml b/CrespoParts/res/xml/sound_preferences.xml new file mode 100755 index 0000000..f1007c6 --- /dev/null +++ b/CrespoParts/res/xml/sound_preferences.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CrespoParts/res/xml/touch_preferences.xml b/CrespoParts/res/xml/touch_preferences.xml new file mode 100755 index 0000000..21f2e16 --- /dev/null +++ b/CrespoParts/res/xml/touch_preferences.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/CrespoParts/res/xml/wm8994_settings.xml b/CrespoParts/res/xml/wm8994_settings.xml new file mode 100644 index 0000000..984fd61 --- /dev/null +++ b/CrespoParts/res/xml/wm8994_settings.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java new file mode 100644 index 0000000..26d766e --- /dev/null +++ b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java @@ -0,0 +1,206 @@ +/* + * Copyright (C) 2011 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.Context; +import android.content.SharedPreferences; +import android.content.SharedPreferences.Editor; +import android.preference.DialogPreference; +import android.preference.PreferenceManager; +import android.util.AttributeSet; +import android.view.View; +import android.widget.SeekBar; +import android.widget.TextView; + +/** + * Special preference type that allows configuration of both the ring volume and + * notification volume. + */ +public class ColorTuningPreference extends DialogPreference { + + private static final String TAG = "COLOR..."; + + enum Colors { + RED, GREEN, BLUE + }; + + private static final int[] SEEKBAR_ID = new int[] { + R.id.color_red_seekbar, R.id.color_green_seekbar, R.id.color_blue_seekbar + }; + + private static final int[] VALUE_DISPLAY_ID = new int[] { + R.id.color_red_value, R.id.color_green_value, R.id.color_blue_value + }; + + private static final String[] FILE_PATH = new String[] { + "/sys/class/misc/voodoo_color/red_multiplier", + "/sys/class/misc/voodoo_color/green_multiplier", + "/sys/class/misc/voodoo_color/blue_multiplier" + }; + + private ColorSeekBar mSeekBars[] = new ColorSeekBar[3]; + + // Align MAX_VALUE with Voodoo Control settings + private static final int MAX_VALUE = Integer.MAX_VALUE - 2; + + // Track instances to know when to restore original color + // (when the orientation changes, a new dialog is created before the old one + // is destroyed) + private static int sInstances = 0; + + public ColorTuningPreference(Context context, AttributeSet attrs) { + super(context, attrs); + + setDialogLayoutResource(R.layout.preference_dialog_color_tuning); + } + + @Override + protected void onBindDialogView(View view) { + super.onBindDialogView(view); + + sInstances++; + + for (int i = 0; i < SEEKBAR_ID.length; i++) { + SeekBar seekBar = (SeekBar) view.findViewById(SEEKBAR_ID[i]); + TextView valueDisplay = (TextView) view.findViewById(VALUE_DISPLAY_ID[i]); + mSeekBars[i] = new ColorSeekBar(seekBar, valueDisplay, FILE_PATH[i]); + } + } + + @Override + protected void onDialogClosed(boolean positiveResult) { + super.onDialogClosed(positiveResult); + + sInstances--; + + if (positiveResult) { + for (ColorSeekBar csb : mSeekBars) { + csb.save(); + } + } else if (sInstances == 0) { + for (ColorSeekBar csb : mSeekBars) { + csb.reset(); + } + } + } + + /** + * Restore screen color tuning from SharedPreferences. (Write to kernel.) + * + * @param context The context to read the SharedPreferences from + */ + public static void restore(Context context) { + if (!isSupported()) { + return; + } + + SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); + for (String filePath : FILE_PATH) { + int iValue; + String sDefaultValue = Utils.readOneLine(filePath); + try { + iValue = sharedPrefs.getInt(filePath, Integer.parseInt(sDefaultValue)); + } catch (NumberFormatException e) { + iValue = MAX_VALUE; + } + Utils.writeColor(filePath, iValue); + } + } + + /** + * Check whether the running kernel supports color tuning or not. + * + * @return Whether color tuning is supported or not + */ + public static boolean isSupported() { + boolean supported = true; + for (String filePath : FILE_PATH) { + if (!Utils.fileExists(filePath)) { + supported = false; + } + } + + return supported; + } + + class ColorSeekBar implements SeekBar.OnSeekBarChangeListener { + + private String mFilePath; + + private int mOriginal; + + private SeekBar mSeekBar; + + private TextView mValueDisplay; + + public ColorSeekBar(SeekBar seekBar, TextView valueDisplay, String filePath) { + int iValue; + + mSeekBar = seekBar; + mValueDisplay = valueDisplay; + mFilePath = filePath; + + SharedPreferences sharedPreferences = getSharedPreferences(); + + // Read original value + if (Utils.fileExists(mFilePath)) { + String sDefaultValue = Utils.readOneLine(mFilePath); + iValue = (int) (Long.valueOf(sDefaultValue) / 2); + } else { + iValue = sharedPreferences.getInt(mFilePath, MAX_VALUE); + } + mOriginal = iValue; + + mSeekBar.setMax(MAX_VALUE); + reset(); + mSeekBar.setOnSeekBarChangeListener(this); + } + + public void reset() { + mSeekBar.setProgress(mOriginal); + updateValue(mOriginal); + } + + public void save() { + Editor editor = getEditor(); + editor.putInt(mFilePath, mSeekBar.getProgress()); + editor.commit(); + } + + @Override + public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { + Utils.writeColor(mFilePath, progress); + updateValue(progress); + } + + @Override + public void onStartTrackingTouch(SeekBar seekBar) { + // Do nothing + } + + @Override + public void onStopTrackingTouch(SeekBar seekBar) { + // Do nothing + } + + private void updateValue(int progress) { + mValueDisplay.setText(String.format("%.10f", (double) progress / MAX_VALUE)); + } + + } + +} diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java new file mode 100644 index 0000000..9fde229 --- /dev/null +++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java @@ -0,0 +1,164 @@ +/* + * Copyright (C) 2011 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.app.ActionBar; +import android.app.ActionBar.Tab; +import android.app.ActionBar.TabListener; +import android.app.Activity; +import android.app.Fragment; +import android.app.FragmentManager; +import android.app.FragmentTransaction; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.ServiceConnection; +import android.os.Bundle; +import android.os.IBinder; +import android.support.v13.app.FragmentPagerAdapter; +import android.support.v4.app.FragmentActivity; +import android.support.v4.view.ViewPager; + +import com.cyanogenmod.settings.device.R; + +import java.util.ArrayList; + +public class DeviceSettings extends Activity { + + public static final String SHARED_PREFERENCES_BASENAME = "com.cyanogenmod.settings.device"; + public static final String ACTION_UPDATE_PREFERENCES = "com.cyanogenmod.settings.device.UPDATE"; + public static final String KEY_COLOR_TUNING = "color_tuning"; + public static final String KEY_GAMMA_TUNING = "gamma_tuning"; + public static final String KEY_BACKLIGHT_TIMEOUT = "backlight_timeout"; + public static final String KEY_BLINK_TIMEOUT = "blink_timeout"; + public static final String KEY_DEEPIDLE = "deepidle"; + public static final String KEY_CATEGORY_RADIO = "category_radio"; + public static final String KEY_HSPA = "hspa"; + + ViewPager mViewPager; + TabsAdapter mTabsAdapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + mViewPager = new ViewPager(this); + mViewPager.setId(R.id.viewPager); + setContentView(mViewPager); + + final ActionBar bar = getActionBar(); + bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); + bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE); + bar.setTitle(R.string.app_name); + + mTabsAdapter = new TabsAdapter(this, mViewPager); + mTabsAdapter.addTab(bar.newTab().setText(R.string.general_title), + GeneralFragmentActivity.class, null); + mTabsAdapter.addTab(bar.newTab().setText(R.string.display_title), + DisplayFragmentActivity.class, null); + mTabsAdapter.addTab(bar.newTab().setText(R.string.sound_title), + SoundFragmentActivity.class, null); + + if (savedInstanceState != null) { + bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); + } + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putInt("tab", getActionBar().getSelectedNavigationIndex()); + } + + public static class TabsAdapter extends FragmentPagerAdapter + implements ActionBar.TabListener, ViewPager.OnPageChangeListener { + private final Context mContext; + private final ActionBar mActionBar; + private final ViewPager mViewPager; + private final ArrayList mTabs = new ArrayList(); + + static final class TabInfo { + private final Class clss; + private final Bundle args; + + TabInfo(Class _class, Bundle _args) { + clss = _class; + args = _args; + } + } + + public TabsAdapter(Activity activity, ViewPager pager) { + super(activity.getFragmentManager()); + mContext = activity; + mActionBar = activity.getActionBar(); + mViewPager = pager; + mViewPager.setAdapter(this); + mViewPager.setOnPageChangeListener(this); + } + + public void addTab(ActionBar.Tab tab, Class clss, Bundle args) { + TabInfo info = new TabInfo(clss, args); + tab.setTag(info); + tab.setTabListener(this); + mTabs.add(info); + mActionBar.addTab(tab); + notifyDataSetChanged(); + } + + @Override + public int getCount() { + return mTabs.size(); + } + + @Override + public Fragment getItem(int position) { + TabInfo info = mTabs.get(position); + return Fragment.instantiate(mContext, info.clss.getName(), info.args); + } + + @Override + public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { + } + + @Override + public void onPageSelected(int position) { + mActionBar.setSelectedNavigationItem(position); + } + + @Override + public void onPageScrollStateChanged(int state) { + } + + @Override + public void onTabSelected(Tab tab, FragmentTransaction ft) { + Object tag = tab.getTag(); + for (int i=0; i Date: Mon, 9 Jan 2012 17:46:22 +0100 Subject: Modified Libcamera to allow Touch to focus Change-Id: I7f1cdc2ce64d60da97cb7d829f51bb4bb1b07c89 --- libcamera/Android.mk | 4 ++- libcamera/SecCamera.cpp | 3 -- libcamera/SecCameraHWInterface.cpp | 29 +++++++++++++++ libcamera/SecCameraUtils.cpp | 72 ++++++++++++++++++++++++++++++++++++++ libcamera/SecCameraUtils.h | 44 +++++++++++++++++++++++ 5 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 libcamera/SecCameraUtils.cpp create mode 100644 libcamera/SecCameraUtils.h diff --git a/libcamera/Android.mk b/libcamera/Android.mk index 1ade091..4e9ac05 100644 --- a/libcamera/Android.mk +++ b/libcamera/Android.mk @@ -11,7 +11,9 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include LOCAL_C_INCLUDES += $(LOCAL_PATH)/../libs3cjpeg LOCAL_SRC_FILES:= \ - SecCamera.cpp SecCameraHWInterface.cpp + SecCamera.cpp \ + SecCameraHWInterface.cpp \ + SecCameraUtils.cpp \ LOCAL_SHARED_LIBRARIES:= libutils libcutils libbinder liblog libcamera_client libhardware LOCAL_SHARED_LIBRARIES+= libs3cjpeg diff --git a/libcamera/SecCamera.cpp b/libcamera/SecCamera.cpp index 9c2d023..2b09168 100755 --- a/libcamera/SecCamera.cpp +++ b/libcamera/SecCamera.cpp @@ -2477,9 +2477,6 @@ int SecCamera::setObjectPosition(int x, int y) { LOGV("%s(setObjectPosition(x=%d, y=%d))", __func__, x, y); - if (m_preview_width ==640) - x = x - 80; - if (fimc_v4l2_s_ctrl(m_cam_fd, V4L2_CID_CAMERA_OBJECT_POSITION_X, x) < 0) { LOGE("ERR(%s):Fail on V4L2_CID_CAMERA_OBJECT_POSITION_X", __func__); return -1; diff --git a/libcamera/SecCameraHWInterface.cpp b/libcamera/SecCameraHWInterface.cpp index ca82669..87c2b96 100755 --- a/libcamera/SecCameraHWInterface.cpp +++ b/libcamera/SecCameraHWInterface.cpp @@ -21,6 +21,8 @@ #include #include "SecCameraHWInterface.h" +#include "SecCameraUtils.h" + #include #include #include @@ -282,6 +284,10 @@ void CameraHardwareSec::initDefaultParameters(int cameraId) p.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, "15000,30000"); p.set(CameraParameters::KEY_FOCAL_LENGTH, "3.43"); + + // touch focus + p.set(CameraParameters::KEY_MAX_NUM_FOCUS_AREAS, "1"); + p.set(CameraParameters::KEY_FOCUS_AREAS, "(0,0,0,0,0)"); } else { p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE, "(7500,30000)"); p.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, "7500,30000"); @@ -1950,6 +1956,29 @@ status_t CameraHardwareSec::setParameters(const CameraParameters& params) mParameters.set(CameraParameters::KEY_SCENE_MODE, new_scene_mode_str); } } + + // touch to focus + const char *new_focus_area = params.get(CameraParameters::KEY_FOCUS_AREAS); + if (new_focus_area != NULL) { + LOGI("focus area: %s", new_focus_area); + SecCameraArea area(new_focus_area); + + if (!area.isDummy()) { + int width, height, frame_size; + mSecCamera->getPreviewSize(&width, &height, &frame_size); + + int x = area.getX(width); + int y = area.getY(height); + + LOGI("area=%s, x=%i, y=%i", area.toString8().string(), x, y); + if (mSecCamera->setObjectPosition(x, y) < 0) { + LOGE("ERR(%s):Fail on mSecCamera->setObjectPosition(%s)", __func__, new_focus_area); + ret = UNKNOWN_ERROR; + } + } + + int val = area.isDummy() ? 0 : 1; + } } else { if (!isSupportedParameter(new_focus_mode_str, mParameters.get(CameraParameters::KEY_SUPPORTED_FOCUS_MODES))) { diff --git a/libcamera/SecCameraUtils.cpp b/libcamera/SecCameraUtils.cpp new file mode 100644 index 0000000..c8dc8ee --- /dev/null +++ b/libcamera/SecCameraUtils.cpp @@ -0,0 +1,72 @@ +/* +** +** Copyright 2011, Havlena Petr +** Copyright 2011, 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. +*/ + +#include "SecCameraUtils.h" +#include + +namespace android { + +SecCameraArea::SecCameraArea(int left, int top, int right, int bottom, int weight) : + m_left(left), + m_top(top), + m_right(right), + m_bottom(bottom), + m_weight(weight) +{ +} + +SecCameraArea::SecCameraArea(const char* str) { + char* end; + + if (str != NULL && str[0] == '(') { + m_left = (int)strtol(str+1, &end, 10); + if (*end != ',') goto error; + m_top = (int)strtol(end+1, &end, 10); + if (*end != ',') goto error; + m_right = (int)strtol(end+1, &end, 10); + if (*end != ',') goto error; + m_bottom = (int)strtol(end+1, &end, 10); + if (*end != ',') goto error; + m_weight = (int)strtol(end+1, &end, 10); + if (*end != ')') goto error; + } + + return; + +error: + m_left = m_top = m_right = m_bottom = m_weight = 0; +} + +int SecCameraArea::getX(int width) { + return (((m_left + m_right) / 2) + 1000) * width / 2000; +} + +int SecCameraArea::getY(int height) { + return (((m_top + m_bottom) / 2) + 1000) * height / 2000; +} + +bool SecCameraArea::isDummy() { + return m_left == 0 && m_top == 0 && m_right == 0 && m_bottom == 0; +} + +String8 SecCameraArea::toString8() { + return String8::format("(%d,%d,%d,%d,%d)", + m_left, m_top, m_right, m_bottom, m_weight); +} + +} \ No newline at end of file diff --git a/libcamera/SecCameraUtils.h b/libcamera/SecCameraUtils.h new file mode 100644 index 0000000..ea7896f --- /dev/null +++ b/libcamera/SecCameraUtils.h @@ -0,0 +1,44 @@ +/* +** +** Copyright 2011, Havlena Petr +** Copyright 2011, 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. +*/ + +#ifndef ANDROID_HARDWARE_CAMERA_SEC_UTILS_H +#define ANDROID_HARDWARE_CAMERA_SEC_UTILS_H + +#include + +namespace android { + +struct SecCameraArea { + int m_left; + int m_top; + int m_right; + int m_bottom; + int m_weight; + + SecCameraArea(int left = 0, int top = 0, int right = 0, int bottom = 0, int weight = 0); + SecCameraArea(const char* str); + + int getX(int width); + int getY(int height); + bool isDummy(); + String8 toString8(); +}; + +}; // namespace android + +#endif // ANDROID_HARDWARE_CAMERA_SEC_UTILS_H \ No newline at end of file -- cgit v1.1 From be1e6742480b041fe7ec4a7986b94da1d2d5b7f3 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Mon, 9 Jan 2012 17:47:05 +0100 Subject: Kernel binary updated with deepidle Deepidle and other patches extracted from Ezekeel kernel Change-Id: I9738c6a927c2f2f6e38b9bfbf75beb0b6dfc68a2 --- bcm4329.ko | Bin 276908 -> 310351 bytes kernel | Bin 3464284 -> 2849832 bytes .../frameworks/base/core/res/res/values/config.xml | 2 ++ 3 files changed, 2 insertions(+) diff --git a/bcm4329.ko b/bcm4329.ko index 3645ce7..46dc60f 100644 Binary files a/bcm4329.ko and b/bcm4329.ko differ diff --git a/kernel b/kernel index a1cc329..85023a7 100755 Binary files a/kernel and b/kernel differ diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index ab0780b..d3c0721 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -210,4 +210,6 @@ false + false + -- cgit v1.1 From e576ba439c809074577a764dbe43f37bbe1036a4 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Mon, 9 Jan 2012 17:47:24 +0100 Subject: Readded CrespoParts to compilation Change-Id: I4f8da176e98e11ff38c35f411d64357766dd7b37 --- device_base.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device_base.mk b/device_base.mk index 79b213b..ee737b5 100644 --- a/device_base.mk +++ b/device_base.mk @@ -164,6 +164,10 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ device/samsung/crespo/mxt224_ts_input.idc:system/usr/idc/mxt224_ts_input.idc +# Device app +PRODUCT_PACKAGES += \ + CrespoParts + # for bugmailer PRODUCT_PACKAGES += send_bug PRODUCT_COPY_FILES += \ -- cgit v1.1 From fa66d547e25c7fe53c3da82bf68c65b75023c1bd Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 27 Sep 2011 16:31:03 +0200 Subject: Remove software egl Since some apps are not correct running it on crespo, like this goes faster and better. In example: Quadrant: Planet demo groe from 26fps to 56fps, and removes this extrange bad effect on rendering the little plannet. OpeGL3d Renders more fps and better quality In general most 3D games are faster with this removed Change-Id: I7fccbccb96e1ccafe9cf3266cc7c8f0fb641cd48 --- egl.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/egl.cfg b/egl.cfg index 45af426..3e1a8c6 100644 --- a/egl.cfg +++ b/egl.cfg @@ -1,2 +1 @@ -0 0 android 0 1 POWERVR_SGX540_120 -- cgit v1.1 From 472352ed57a466d1616ceb595863413731505873 Mon Sep 17 00:00:00 2001 From: Robert Burns Date: Wed, 11 Jan 2012 09:49:50 -0500 Subject: CrespoParts cleanup - Provided ability to disable backlight notifications(BLN) - String cleanup - Removed obsolete files Change-Id: I36c6ae0749bb9e2f43e67356fba243ac8e3aa301 --- CrespoParts/res/values/strings.xml | 4 +- CrespoParts/res/xml/general_preferences.xml | 37 ++++++----- CrespoParts/res/xml/main.xml | 58 ----------------- CrespoParts/res/xml/wm8994_settings.xml | 72 ---------------------- .../settings/device/DeviceSettings.java | 1 + .../settings/device/GeneralFragmentActivity.java | 31 +++++++--- 6 files changed, 49 insertions(+), 154 deletions(-) delete mode 100644 CrespoParts/res/xml/main.xml delete mode 100644 CrespoParts/res/xml/wm8994_settings.xml diff --git a/CrespoParts/res/values/strings.xml b/CrespoParts/res/values/strings.xml index 4355907..a1d2386 100644 --- a/CrespoParts/res/values/strings.xml +++ b/CrespoParts/res/values/strings.xml @@ -7,7 +7,7 @@ DISPLAY SOUND - Battery + CPU Deep Idle Enables deep idle, intended to provide better battery life. (Experimental at this time!) WM8994 Settings ( voodoo ) @@ -51,6 +51,8 @@ Use tuned WM8994 audio clock source -- improves quality of sound Touch Keys + Backlight Notifications + The touch key backlights will turn on when there is a notification. Backlight Timeout Adjust the delay before the touch key backlight automatically turns off Blink Timeout diff --git a/CrespoParts/res/xml/general_preferences.xml b/CrespoParts/res/xml/general_preferences.xml index 44c0b9c..173d7eb 100644 --- a/CrespoParts/res/xml/general_preferences.xml +++ b/CrespoParts/res/xml/general_preferences.xml @@ -2,8 +2,8 @@ - + - - + + + diff --git a/CrespoParts/res/xml/main.xml b/CrespoParts/res/xml/main.xml deleted file mode 100644 index 224cffd..0000000 --- a/CrespoParts/res/xml/main.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CrespoParts/res/xml/wm8994_settings.xml b/CrespoParts/res/xml/wm8994_settings.xml deleted file mode 100644 index 984fd61..0000000 --- a/CrespoParts/res/xml/wm8994_settings.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java index 9fde229..00a6bb8 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java @@ -46,6 +46,7 @@ public class DeviceSettings extends Activity { public static final String KEY_BACKLIGHT_TIMEOUT = "backlight_timeout"; public static final String KEY_BLINK_TIMEOUT = "blink_timeout"; public static final String KEY_DEEPIDLE = "deepidle"; + public static final String KEY_NOTIFICATION = "touchkey_notification"; public static final String KEY_CATEGORY_RADIO = "category_radio"; public static final String KEY_HSPA = "hspa"; diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java index 1f08425..007eb2a 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java @@ -32,11 +32,13 @@ import com.cyanogenmod.settings.device.R; public class GeneralFragmentActivity extends PreferenceFragment { - private static final String DEEPIDLE_FILE = "/sys/class/misc/deepidle/enabled"; + private static final String CPU_DEEPIDLE_FILE = "/sys/class/misc/deepidle/enabled"; + private static final String TOUCHKEY_NOTIFICATION_FILE = "/sys/class/misc/notification/enabled"; private static final String PREF_ENABLED = "1"; private static final String TAG = "CrespoParts_General"; private CheckBoxPreference mDeepIdle; + private CheckBoxPreference mNotification; private ListPreference mBacklightTimeout; private ListPreference mBlinkTimeout; @@ -48,13 +50,20 @@ public class GeneralFragmentActivity extends PreferenceFragment { PreferenceScreen prefSet = getPreferenceScreen(); mDeepIdle = (CheckBoxPreference) findPreference(DeviceSettings.KEY_DEEPIDLE); + mNotification = (CheckBoxPreference) findPreference(DeviceSettings.KEY_NOTIFICATION); - if (isSupported(DEEPIDLE_FILE)) { - mDeepIdle.setChecked(PREF_ENABLED.equals(Utils.readOneLine(DEEPIDLE_FILE))); + if (isSupported(CPU_DEEPIDLE_FILE)) { + mDeepIdle.setChecked(PREF_ENABLED.equals(Utils.readOneLine(CPU_DEEPIDLE_FILE))); } else { mDeepIdle.setEnabled(false); } + if (isSupported(TOUCHKEY_NOTIFICATION_FILE)) { + mNotification.setChecked(PREF_ENABLED.equals(Utils.readOneLine(TOUCHKEY_NOTIFICATION_FILE))); + } else { + mNotification.setEnabled(false); + } + mBacklightTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BACKLIGHT_TIMEOUT); mBacklightTimeout.setEnabled(TouchKeyBacklightTimeout.isSupported()); mBacklightTimeout.setOnPreferenceChangeListener(new TouchKeyBacklightTimeout()); @@ -76,7 +85,11 @@ public class GeneralFragmentActivity extends PreferenceFragment { if (key.equals(DeviceSettings.KEY_DEEPIDLE)) { final CheckBoxPreference chkPref = (CheckBoxPreference) preference; boxValue = chkPref.isChecked() ? "1" : "0"; - Utils.writeValue(DEEPIDLE_FILE, boxValue); + Utils.writeValue(CPU_DEEPIDLE_FILE, boxValue); + } else if (key.equals(DeviceSettings.KEY_NOTIFICATION)) { + final CheckBoxPreference chkPref = (CheckBoxPreference) preference; + boxValue = chkPref.isChecked() ? "1" : "0"; + Utils.writeValue(TOUCHKEY_NOTIFICATION_FILE, boxValue); } return true; @@ -88,9 +101,13 @@ public class GeneralFragmentActivity extends PreferenceFragment { public static void restore(Context context) { SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); - if (isSupported(DEEPIDLE_FILE)) { - String sDefaultValue = Utils.readOneLine(DEEPIDLE_FILE); - Utils.writeValue(DEEPIDLE_FILE, sharedPrefs.getBoolean(DeviceSettings.KEY_DEEPIDLE, PREF_ENABLED.equals(sDefaultValue))); + if (isSupported(CPU_DEEPIDLE_FILE)) { + String sDefaultValue = Utils.readOneLine(CPU_DEEPIDLE_FILE); + Utils.writeValue(CPU_DEEPIDLE_FILE, sharedPrefs.getBoolean(DeviceSettings.KEY_DEEPIDLE, PREF_ENABLED.equals(sDefaultValue))); + } + if (isSupported(TOUCHKEY_NOTIFICATION_FILE)) { + String sDefaultValue = Utils.readOneLine(TOUCHKEY_NOTIFICATION_FILE); + Utils.writeValue(TOUCHKEY_NOTIFICATION_FILE, sharedPrefs.getBoolean(DeviceSettings.KEY_NOTIFICATION, PREF_ENABLED.equals(sDefaultValue))); } } } -- cgit v1.1 From 1702e13347bef848b9b3a70b50c9e6019148f250 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Thu, 12 Jan 2012 21:21:06 +0100 Subject: Remove Sound settings from crespoparts Since we are moving them to DSPManager Change-Id: Ib40d45be59a7b5f17f49f50dc29ffdefe3abde69 --- CrespoParts/res/values/strings.xml | 31 ------- CrespoParts/res/xml/sound_preferences.xml | 68 --------------- .../settings/device/DeviceSettings.java | 2 - .../settings/device/SoundFragmentActivity.java | 98 ---------------------- .../com/cyanogenmod/settings/device/Startup.java | 1 - 5 files changed, 200 deletions(-) delete mode 100755 CrespoParts/res/xml/sound_preferences.xml delete mode 100755 CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java diff --git a/CrespoParts/res/values/strings.xml b/CrespoParts/res/values/strings.xml index a1d2386..74793bc 100644 --- a/CrespoParts/res/values/strings.xml +++ b/CrespoParts/res/values/strings.xml @@ -19,37 +19,6 @@ Green Blue - - Sound - - Internal Speaker Configuration - Signal Processing - Headphone Amplifier - Codec Optimization - Digital/Analog Converter Settings - Analog Path Configuration - Microphone Settings - - Sound Settings - Sound Settings - Advanced control of the WM8994 sound processor hardware - Enable WM8994 Control - Enable advanced controls for the WM8994 sound processor hardware - Tune speaker for music - Reconfigures the hardware EQ to get more bass and balanced sound - Mono downmix - Downmix stereo sound to mono (for stereo outputs, such as headphones) - Stereo expansion - "Expand" stereo sound via digital signal processing - D/AC direct - Access digital/analog converter directly, bypassing the channel mixer. Produces cleaner audio (lower signal-to-noise ratio) - Hi-fi playback - Digital-to-analog converter 128x oversampling -- cleaner sound when playing music - Hi-fi recording - Analog-to-digital converter 128x oversampling -- increases quality of recordings - Tuned audio clock - Use tuned WM8994 audio clock source -- improves quality of sound - Touch Keys Backlight Notifications The touch key backlights will turn on when there is a notification. diff --git a/CrespoParts/res/xml/sound_preferences.xml b/CrespoParts/res/xml/sound_preferences.xml deleted file mode 100755 index f1007c6..0000000 --- a/CrespoParts/res/xml/sound_preferences.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java index 00a6bb8..19e76e4 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java @@ -71,8 +71,6 @@ public class DeviceSettings extends Activity { GeneralFragmentActivity.class, null); mTabsAdapter.addTab(bar.newTab().setText(R.string.display_title), DisplayFragmentActivity.class, null); - mTabsAdapter.addTab(bar.newTab().setText(R.string.sound_title), - SoundFragmentActivity.class, null); if (savedInstanceState != null) { bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java deleted file mode 100755 index 77b76e6..0000000 --- a/CrespoParts/src/com/cyanogenmod/settings/device/SoundFragmentActivity.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2011 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.Context; -import android.content.SharedPreferences; -import android.os.Bundle; -import android.preference.CheckBoxPreference; -import android.preference.Preference; -import android.preference.PreferenceActivity; -import android.preference.PreferenceFragment; -import android.preference.PreferenceManager; -import android.preference.PreferenceScreen; -import android.util.Log; - -import com.cyanogenmod.settings.device.R; - -public class SoundFragmentActivity extends PreferenceFragment { - - public static final String aOptionControl[][] = { - {"/sys/class/misc/voodoo_sound_control/enable","pref_wm8994_control_enable"}, - {"/sys/class/misc/voodoo_sound/speaker_tuning","pref_wm8994_speaker_tuning"}, - {"/sys/class/misc/voodoo_sound/mono_downmix","pref_wm8994_mono_downmix"}, - {"/sys/class/misc/voodoo_sound/stereo_expansion","pref_wm8994_stereo_expansion"}, - {"/sys/class/misc/voodoo_sound/dac_direct","pref_wm8994_dac_direct"}, - {"/sys/class/misc/voodoo_sound/dac_osr128","pref_wm8994_dac_osr128"}, - {"/sys/class/misc/voodoo_sound/adc_osr128","pref_wm8994_adc_osr128"}, - {"/sys/class/misc/voodoo_sound/fll_tuning","pref_wm8994_fll_tuning"} - }; - private static final Integer iTotalOptions = aOptionControl.length; - private CheckBoxPreference cbpStatus[] = new CheckBoxPreference[iTotalOptions]; - - // Misc - private static final String PREF_ENABLED = "1"; - private static final String TAG = "CrespoParts_WM8994ControlSound"; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - addPreferencesFromResource(R.xml.sound_preferences); - - PreferenceScreen prefSet = getPreferenceScreen(); - - Integer iPosition; - for(iPosition=0;iPosition Date: Thu, 12 Jan 2012 21:22:06 +0100 Subject: Update Color sysfs for tl2796 Change-Id: I4bc2472669615eb9e2ed08251857391601eb7cb1 --- .../src/com/cyanogenmod/settings/device/ColorTuningPreference.java | 6 +++--- .../src/com/cyanogenmod/settings/device/GammaTuningPreference.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java index 26d766e..4c9cd41 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java @@ -47,9 +47,9 @@ public class ColorTuningPreference extends DialogPreference { }; private static final String[] FILE_PATH = new String[] { - "/sys/class/misc/voodoo_color/red_multiplier", - "/sys/class/misc/voodoo_color/green_multiplier", - "/sys/class/misc/voodoo_color/blue_multiplier" + "/sys/class/misc/tl2796_color/red_multiplier", + "/sys/class/misc/tl2796_color/green_multiplier", + "/sys/class/misc/tl2796_color/blue_multiplier" }; private ColorSeekBar mSeekBars[] = new ColorSeekBar[3]; diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java index aa092ae..12fb781 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java @@ -47,9 +47,9 @@ public class GammaTuningPreference extends DialogPreference { }; private static final String[] FILE_PATH = new String[] { - "/sys/class/misc/voodoo_color/red_v1_offset", - "/sys/class/misc/voodoo_color/green_v1_offset", - "/sys/class/misc/voodoo_color/blue_v1_offset" + "/sys/class/misc/tl2796_color/red_v1_offset", + "/sys/class/misc/tl2796_color/green_v1_offset", + "/sys/class/misc/tl2796_color/blue_v1_offset" }; private GammaSeekBar mSeekBars[] = new GammaSeekBar[3]; -- cgit v1.1 From 89adcf481afe692968f876c48f06a2b5ce452774 Mon Sep 17 00:00:00 2001 From: John Hsing Date: Sun, 15 Jan 2012 22:22:52 +0800 Subject: CrespoParts: update Simplified Chinese translations Change-Id: Ib2ac8ef63e5bf2fcaa67e3fc236008e3f385241c --- CrespoParts/res/values-zh-rCN/strings.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/CrespoParts/res/values-zh-rCN/strings.xml b/CrespoParts/res/values-zh-rCN/strings.xml index 78b1a56..f48b68c 100644 --- a/CrespoParts/res/values-zh-rCN/strings.xml +++ b/CrespoParts/res/values-zh-rCN/strings.xml @@ -2,6 +2,14 @@ Nexus S 设置 + 常规 + 显示 + 音效 + + + 深度休眠 + 启用深度休眠, 以便延长电池寿命. (当前属于实验性质!) + WM8994 设置(Voodoo) 颜色增值 调整屏幕颜色增值 @@ -43,8 +51,10 @@ 使用调整过的 WM8994 音频时钟源,改善音效品质 触控键 - 背光延时 - 调整触控键背光自动关闭前的延迟时间 + 背光灯提醒 + 当有通知时触控键背光灯点亮. + 背光灯延时 + 调整触控键背光灯自动关闭前的延迟时间 闪烁延时 调整触控键闪烁通知自动关闭前的延迟时间 -- cgit v1.1 From 4ed86b1ff8611a5c1dac02ca3fbeb37c46c139a2 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 17 Jan 2012 17:59:55 +0100 Subject: Update color sysfs naming Change-Id: I7d0fbc651cb791b3060a123033adc9d31f6d3755 --- .../com/cyanogenmod/settings/device/ColorTuningPreference.java | 6 +++--- .../com/cyanogenmod/settings/device/GammaTuningPreference.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java index 4c9cd41..6db5bb0 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java @@ -47,9 +47,9 @@ public class ColorTuningPreference extends DialogPreference { }; private static final String[] FILE_PATH = new String[] { - "/sys/class/misc/tl2796_color/red_multiplier", - "/sys/class/misc/tl2796_color/green_multiplier", - "/sys/class/misc/tl2796_color/blue_multiplier" + "/sys/class/misc/samoled_color/red_multiplier", + "/sys/class/misc/samoled_color/green_multiplier", + "/sys/class/misc/samoled_color/blue_multiplier" }; private ColorSeekBar mSeekBars[] = new ColorSeekBar[3]; diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java index 12fb781..bfbc62e 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/GammaTuningPreference.java @@ -47,16 +47,16 @@ public class GammaTuningPreference extends DialogPreference { }; private static final String[] FILE_PATH = new String[] { - "/sys/class/misc/tl2796_color/red_v1_offset", - "/sys/class/misc/tl2796_color/green_v1_offset", - "/sys/class/misc/tl2796_color/blue_v1_offset" + "/sys/class/misc/samoled_color/red_v1_offset", + "/sys/class/misc/samoled_color/green_v1_offset", + "/sys/class/misc/samoled_color/blue_v1_offset" }; private GammaSeekBar mSeekBars[] = new GammaSeekBar[3]; private static final int MAX_VALUE = 80; - private static final int OFFSET_VALUE = 60; + private static final int OFFSET_VALUE = 0; // Track instances to know when to restore original color // (when the orientation changes, a new dialog is created before the old one -- cgit v1.1 From d6096452739d8f05161980fe8c92af397da3e22c Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Wed, 18 Jan 2012 10:49:06 +0100 Subject: Update Kernel bin file Upgrade to 3.0.17 Removed color flickering at on/off Stability updates... Change-Id: Iae4a6ec85dd234223d44b65055cb33c360568d4f --- bcm4329.ko | Bin 310351 -> 262985 bytes kernel | Bin 2849832 -> 2570832 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/bcm4329.ko b/bcm4329.ko index 46dc60f..7aeb297 100644 Binary files a/bcm4329.ko and b/bcm4329.ko differ diff --git a/kernel b/kernel index 85023a7..285a687 100755 Binary files a/kernel and b/kernel differ -- cgit v1.1 From b01652abab80ae28878a804e43725df35b59b840 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Thu, 26 Jan 2012 08:36:17 +0100 Subject: Update hspa overlay for data distinguishable Change-Id: Iae1cbfea39929168467e20f27e16eccec3d4cc94 --- .../base/packages/SystemUI/res/values/config.xml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 overlay/frameworks/base/packages/SystemUI/res/values/config.xml diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml new file mode 100644 index 0000000..555da6b --- /dev/null +++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml @@ -0,0 +1,29 @@ + + + + + + + + true + + + -- cgit v1.1 From a998a9c5023adb8b467300c686991f640ed9eb6c Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Thu, 26 Jan 2012 08:37:06 +0100 Subject: Update mms config overlay Some user are having issues with mms, that will solve it Change-Id: Id4a8a272fcc8b43ed641b51b7bb2b8a51dcf00ce --- overlay/packages/apps/Mms/res/xml/mms_config.xml | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 overlay/packages/apps/Mms/res/xml/mms_config.xml diff --git a/overlay/packages/apps/Mms/res/xml/mms_config.xml b/overlay/packages/apps/Mms/res/xml/mms_config.xml new file mode 100644 index 0000000..cc04ebc --- /dev/null +++ b/overlay/packages/apps/Mms/res/xml/mms_config.xml @@ -0,0 +1,39 @@ + + + + + + + + + 1920 + + + 2560 + + + http://wap.samsungmobile.com/uaprof/nexuss.xml + + + + nexuss + + -- cgit v1.1 From 031eb6ffa4e0cb36d634bf91d068cf286b6aebe0 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Thu, 26 Jan 2012 08:37:42 +0100 Subject: Update bin kernel for kms Change-Id: I655aada4630e652a72186a02b1397b16d22faa08 --- bcm4329.ko | Bin 262985 -> 262985 bytes kernel | Bin 2570832 -> 2576444 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/bcm4329.ko b/bcm4329.ko index 7aeb297..111101e 100644 Binary files a/bcm4329.ko and b/bcm4329.ko differ diff --git a/kernel b/kernel index 285a687..76cf3be 100755 Binary files a/kernel and b/kernel differ -- cgit v1.1 From 5ce83b24ebf900336b563eba735ae635df3c7da0 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Thu, 26 Jan 2012 19:10:56 +0100 Subject: Update crespoparts gammatunning This was checking if colorfiles insteed of gammafiles Change-Id: Ic34f0882235df2b8c307e625944c3a6c517839d3 --- .../src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java index f4b1c78..b2ae578 100755 --- a/CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/DisplayFragmentActivity.java @@ -44,7 +44,7 @@ public class DisplayFragmentActivity extends PreferenceFragment { mColorTuning.setEnabled(ColorTuningPreference.isSupported()); mGammaTuning = (GammaTuningPreference) findPreference(DeviceSettings.KEY_GAMMA_TUNING); - mGammaTuning.setEnabled(ColorTuningPreference.isSupported()); + mGammaTuning.setEnabled(GammaTuningPreference.isSupported()); } } -- cgit v1.1 From d775c8a7aeaf4e5cf0bedd82ccf58d96e6c510dd Mon Sep 17 00:00:00 2001 From: Robert Burns Date: Fri, 27 Jan 2012 16:00:28 -0500 Subject: Ability to enable KSM Change-Id: Ie49435eaf6d7ec8b48be80359f62dd3a9ffeb5b2 --- init.herring.rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.herring.rc b/init.herring.rc index f96b476..7e15bac 100755 --- a/init.herring.rc +++ b/init.herring.rc @@ -19,6 +19,14 @@ on boot # phone setprop ro.telephony.call_ring.multiple 0 +# allow system to modify ksm control files + chown root system /sys/kernel/mm/ksm/pages_to_scan + chmod 0664 /sys/kernel/mm/ksm/pages_to_scan + chown root system /sys/kernel/mm/ksm/sleep_millisecs + chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs + chown root system /sys/kernel/mm/ksm/run + chmod 0664 /sys/kernel/mm/ksm/run + # change permission for uart_switch chown radio radio /sys/class/sec/uart_switch/UART_SEL/value chmod 660 /sys/class/sec/uart_switch/UART_SEL/value -- cgit v1.1 From 95c8a5aefffbd0b3baf3c0007b2ca4c798654dac Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Sat, 28 Jan 2012 09:04:49 +0100 Subject: Tunne default ksm values for crespo Change-Id: I229f46d11ef12215e40cdec67b017d72c8adf4d4 --- init.herring.rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.herring.rc b/init.herring.rc index 7e15bac..789bf54 100755 --- a/init.herring.rc +++ b/init.herring.rc @@ -26,6 +26,8 @@ on boot chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs chown root system /sys/kernel/mm/ksm/run chmod 0664 /sys/kernel/mm/ksm/run + write /sys/kernel/mm/ksm/sleep_millisecs 1500 + write /sys/kernel/mm/ksm/pages_to_scan 256 # change permission for uart_switch chown radio radio /sys/class/sec/uart_switch/UART_SEL/value -- cgit v1.1 From 4af94bed4cc70d94807a708828dc41a7ece8ac92 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Sun, 29 Jan 2012 07:33:18 +0100 Subject: Removed ksm permissions Now that goes to general init.rc Change-Id: Ia8f65c5c4f47cd732770aa44415b7346ca3683f6 --- init.herring.rc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/init.herring.rc b/init.herring.rc index 789bf54..f96b476 100755 --- a/init.herring.rc +++ b/init.herring.rc @@ -19,16 +19,6 @@ on boot # phone setprop ro.telephony.call_ring.multiple 0 -# allow system to modify ksm control files - chown root system /sys/kernel/mm/ksm/pages_to_scan - chmod 0664 /sys/kernel/mm/ksm/pages_to_scan - chown root system /sys/kernel/mm/ksm/sleep_millisecs - chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs - chown root system /sys/kernel/mm/ksm/run - chmod 0664 /sys/kernel/mm/ksm/run - write /sys/kernel/mm/ksm/sleep_millisecs 1500 - write /sys/kernel/mm/ksm/pages_to_scan 256 - # change permission for uart_switch chown radio radio /sys/class/sec/uart_switch/UART_SEL/value chmod 660 /sys/class/sec/uart_switch/UART_SEL/value -- cgit v1.1 From 8b1c76b5604d38faf5652600eef443d18a0785b0 Mon Sep 17 00:00:00 2001 From: Will Keaney Date: Mon, 30 Jan 2012 17:46:00 +0100 Subject: Change filtering to match libcamera and properly exclude non-targeted devices. Change-Id: Iaf7f1e5a60eee1d53dff7ebc3ddb52c4a3a25ab0 --- libs3cjpeg/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs3cjpeg/Android.mk b/libs3cjpeg/Android.mk index af1f88e..086e7aa 100644 --- a/libs3cjpeg/Android.mk +++ b/libs3cjpeg/Android.mk @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ifeq ($(filter-out s5pc110,$(TARGET_BOARD_PLATFORM)),) +ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) -- cgit v1.1 From 641ad6a9e0fb7f58e911e84748e746a8e93c5098 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 7 Feb 2012 20:35:50 -0500 Subject: Update kernel to gc2b5fb4 --- bcm4329.ko | Bin 262985 -> 262985 bytes kernel | Bin 2576444 -> 2576440 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/bcm4329.ko b/bcm4329.ko index 111101e..1b882fc 100644 Binary files a/bcm4329.ko and b/bcm4329.ko differ diff --git a/kernel b/kernel index 76cf3be..0db7c4f 100755 Binary files a/kernel and b/kernel differ -- cgit v1.1 From 981b14fd4afc0b9151bb5c781aa8b4d93ad95fb6 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 7 Feb 2012 21:34:44 -0500 Subject: Fix restoring color multipliers --- .../settings/device/ColorTuningPreference.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java index 6db5bb0..085cae7 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/ColorTuningPreference.java @@ -25,6 +25,7 @@ import android.util.AttributeSet; import android.view.View; import android.widget.SeekBar; import android.widget.TextView; +import android.util.Log; /** * Special preference type that allows configuration of both the ring volume and @@ -104,20 +105,28 @@ public class ColorTuningPreference extends DialogPreference { * @param context The context to read the SharedPreferences from */ public static void restore(Context context) { + int iValue, iValue2; if (!isSupported()) { return; } SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); for (String filePath : FILE_PATH) { - int iValue; String sDefaultValue = Utils.readOneLine(filePath); + Log.d(TAG,"INIT: " + sDefaultValue); + try { + iValue2 = Integer.parseInt(sDefaultValue); + } catch (NumberFormatException e) { + iValue2 = MAX_VALUE; + } try { - iValue = sharedPrefs.getInt(filePath, Integer.parseInt(sDefaultValue)); + iValue = sharedPrefs.getInt(filePath, iValue2); + Log.d(TAG, "restore: iValue: " + iValue + " File: " + filePath); } catch (NumberFormatException e) { - iValue = MAX_VALUE; + iValue = iValue2; + Log.e(TAG, "restore ERROR: iValue: " + iValue + " File: " + filePath); } - Utils.writeColor(filePath, iValue); + Utils.writeColor(filePath, (int) iValue); } } -- cgit v1.1 From e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 7 Feb 2012 21:52:40 -0500 Subject: Remove obsolete BLN preferences --- CrespoParts/res/values/strings.xml | 4 -- CrespoParts/res/xml/general_preferences.xml | 16 ------- CrespoParts/res/xml/touch_preferences.xml | 21 --------- .../settings/device/DeviceSettings.java | 2 - .../settings/device/GeneralFragmentActivity.java | 11 ----- .../com/cyanogenmod/settings/device/Startup.java | 1 - .../settings/device/TouchFragmentActivity.java | 53 ---------------------- .../settings/device/TouchKeyBacklightTimeout.java | 36 --------------- .../settings/device/TouchKeyBlinkTimeout.java | 36 --------------- 9 files changed, 180 deletions(-) delete mode 100755 CrespoParts/res/xml/touch_preferences.xml delete mode 100755 CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java delete mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java delete mode 100644 CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java diff --git a/CrespoParts/res/values/strings.xml b/CrespoParts/res/values/strings.xml index 74793bc..42f2dbc 100644 --- a/CrespoParts/res/values/strings.xml +++ b/CrespoParts/res/values/strings.xml @@ -22,10 +22,6 @@ Touch Keys Backlight Notifications The touch key backlights will turn on when there is a notification. - Backlight Timeout - Adjust the delay before the touch key backlight automatically turns off - Blink Timeout - Adjust the delay before the touch key blink backlight automatically turns off after a notification Radio HSPA diff --git a/CrespoParts/res/xml/general_preferences.xml b/CrespoParts/res/xml/general_preferences.xml index 173d7eb..82c8956 100644 --- a/CrespoParts/res/xml/general_preferences.xml +++ b/CrespoParts/res/xml/general_preferences.xml @@ -16,22 +16,6 @@ - - diff --git a/CrespoParts/res/xml/touch_preferences.xml b/CrespoParts/res/xml/touch_preferences.xml deleted file mode 100755 index 21f2e16..0000000 --- a/CrespoParts/res/xml/touch_preferences.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java index 19e76e4..39c9595 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java @@ -43,8 +43,6 @@ public class DeviceSettings extends Activity { public static final String ACTION_UPDATE_PREFERENCES = "com.cyanogenmod.settings.device.UPDATE"; public static final String KEY_COLOR_TUNING = "color_tuning"; public static final String KEY_GAMMA_TUNING = "gamma_tuning"; - public static final String KEY_BACKLIGHT_TIMEOUT = "backlight_timeout"; - public static final String KEY_BLINK_TIMEOUT = "blink_timeout"; public static final String KEY_DEEPIDLE = "deepidle"; public static final String KEY_NOTIFICATION = "touchkey_notification"; public static final String KEY_CATEGORY_RADIO = "category_radio"; diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java index 007eb2a..f101de1 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java @@ -39,8 +39,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { private CheckBoxPreference mDeepIdle; private CheckBoxPreference mNotification; - private ListPreference mBacklightTimeout; - private ListPreference mBlinkTimeout; @Override public void onCreate(Bundle savedInstanceState) { @@ -64,14 +62,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { mNotification.setEnabled(false); } - mBacklightTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BACKLIGHT_TIMEOUT); - mBacklightTimeout.setEnabled(TouchKeyBacklightTimeout.isSupported()); - mBacklightTimeout.setOnPreferenceChangeListener(new TouchKeyBacklightTimeout()); - - mBlinkTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BLINK_TIMEOUT); - mBlinkTimeout.setEnabled(TouchKeyBlinkTimeout.isSupported()); - mBlinkTimeout.setOnPreferenceChangeListener(new TouchKeyBlinkTimeout()); - } @Override @@ -81,7 +71,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { String key = preference.getKey(); Log.w(TAG, "key: " + key); - if (key.equals(DeviceSettings.KEY_DEEPIDLE)) { final CheckBoxPreference chkPref = (CheckBoxPreference) preference; boxValue = chkPref.isChecked() ? "1" : "0"; diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java index 9019d65..0728953 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java @@ -11,7 +11,6 @@ public class Startup extends BroadcastReceiver { GeneralFragmentActivity.restore(context); ColorTuningPreference.restore(context); GammaTuningPreference.restore(context); - TouchKeyBacklightTimeout.restore(context); if (Hspa.isSupported()) { Hspa.restore(context); } diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java deleted file mode 100755 index 928e2de..0000000 --- a/CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2011 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.Context; -import android.content.SharedPreferences; -import android.os.Bundle; -import android.preference.CheckBoxPreference; -import android.preference.ListPreference; -import android.preference.Preference; -import android.preference.PreferenceActivity; -import android.preference.PreferenceFragment; -import android.preference.PreferenceManager; -import android.preference.PreferenceScreen; -import android.util.Log; - -import com.cyanogenmod.settings.device.R; - -public class TouchFragmentActivity extends PreferenceFragment { - - private ListPreference mBacklightTimeout; - private ListPreference mBlinkTimeout; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - addPreferencesFromResource(R.xml.touch_preferences); - - mBacklightTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BACKLIGHT_TIMEOUT); - mBacklightTimeout.setEnabled(TouchKeyBacklightTimeout.isSupported()); - mBacklightTimeout.setOnPreferenceChangeListener(new TouchKeyBacklightTimeout()); - - mBlinkTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BLINK_TIMEOUT); - mBlinkTimeout.setEnabled(TouchKeyBacklightTimeout.isSupported()); - mBlinkTimeout.setOnPreferenceChangeListener(new TouchKeyBlinkTimeout()); - } - -} diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java b/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java deleted file mode 100644 index e1f06c7..0000000 --- a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.content.Context; -import android.content.SharedPreferences; -import android.preference.Preference; -import android.preference.Preference.OnPreferenceChangeListener; -import android.preference.PreferenceManager; - -public class TouchKeyBacklightTimeout implements OnPreferenceChangeListener { - - private static final String FILE = "/sys/class/misc/notification/bl_timeout"; - - public static boolean isSupported() { - return Utils.fileExists(FILE); - } - - /** - * Restore backlight timeout setting from SharedPreferences. (Write to kernel.) - * @param context The context to read the SharedPreferences from - */ - public static void restore(Context context) { - if (!isSupported()) { - return; - } - - SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); - Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_BACKLIGHT_TIMEOUT, "5")); - } - - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - Utils.writeValue(FILE, (String) newValue); - return true; - } - -} \ No newline at end of file diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java b/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java deleted file mode 100644 index ae75af9..0000000 --- a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.content.Context; -import android.content.SharedPreferences; -import android.preference.Preference; -import android.preference.Preference.OnPreferenceChangeListener; -import android.preference.PreferenceManager; - -public class TouchKeyBlinkTimeout implements OnPreferenceChangeListener { - - private static final String FILE = "/sys/class/misc/notification/blinktimeout"; - - public static boolean isSupported() { - return Utils.fileExists(FILE); - } - - /** - * Restore backlight timeout setting from SharedPreferences. (Write to kernel.) - * @param context The context to read the SharedPreferences from - */ - public static void restore(Context context) { - if (!isSupported()) { - return; - } - - SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); - Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_BLINK_TIMEOUT, "5")); - } - - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - Utils.writeValue(FILE, (String) newValue); - return true; - } - -} \ No newline at end of file -- cgit v1.1 From 1609e9486a5e67c6a7812867c18cb0bc8b77ed17 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Tue, 7 Feb 2012 22:11:40 -0500 Subject: Addition of lulzactive preferences to CrespoParts --- .../layout/preference_dialog_lulzactive_tuning.xml | 159 +++++++++++ CrespoParts/res/values/strings.xml | 11 + CrespoParts/res/xml/general_preferences.xml | 4 + .../settings/device/DeviceSettings.java | 1 + .../settings/device/GeneralFragmentActivity.java | 4 + .../device/LulzactiveTuningPreference.java | 312 +++++++++++++++++++++ .../com/cyanogenmod/settings/device/Startup.java | 1 + init.herring.rc | 14 +- 8 files changed, 505 insertions(+), 1 deletion(-) create mode 100755 CrespoParts/res/layout/preference_dialog_lulzactive_tuning.xml create mode 100755 CrespoParts/src/com/cyanogenmod/settings/device/LulzactiveTuningPreference.java diff --git a/CrespoParts/res/layout/preference_dialog_lulzactive_tuning.xml b/CrespoParts/res/layout/preference_dialog_lulzactive_tuning.xml new file mode 100755 index 0000000..c32d7c5 --- /dev/null +++ b/CrespoParts/res/layout/preference_dialog_lulzactive_tuning.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +