Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 9th, 2011  |  syntax: None  |  size: 29.10 KB  |  views: 110  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. project build/
  3. diff --git a/target/product/languages_full.mk b/target/product/languages_full.mk
  4. index 56ca493..57694c7 100644
  5. --- a/target/product/languages_full.mk
  6. +++ b/target/product/languages_full.mk
  7. @@ -20,64 +20,4 @@
  8.  # the system misbehaves when a density is the first locale.
  9.  
  10.  # Those are all the locales that have translations.
  11. -PRODUCT_LOCALES := en_US \
  12. - ar_EG \
  13. - ar_IL \
  14. - ur_PK \
  15. - fa_IR \
  16. - bg_BG \
  17. - ca_ES \
  18. - cs_CZ \
  19. - da_DK \
  20. - de_AT \
  21. - de_CH \
  22. - de_DE \
  23. - de_LI \
  24. - el_GR \
  25. - en_AU \
  26. - en_CA \
  27. - en_GB \
  28. - en_IE \
  29. - en_IN \
  30. - en_NZ \
  31. - en_SG \
  32. - en_ZA \
  33. - es_ES \
  34. - fi_FI \
  35. - fr_BE \
  36. - fr_CA \
  37. - fr_CH \
  38. - fr_FR \
  39. - he_IL \
  40. - hi_IN \
  41. - hr_HR \
  42. - hu_HU \
  43. - id_ID \
  44. - it_CH \
  45. - it_IT \
  46. - iw_IL \
  47. - ja_JP \
  48. - ka_GE \
  49. - ko_KR \
  50. - lt_LT \
  51. - lv_LV \
  52. - nb_NO \
  53. - nl_BE \
  54. - nl_NL \
  55. - pl_PL \
  56. - pt_BR \
  57. - pt_PT \
  58. - ro_RO \
  59. - ru_RU \
  60. - sk_SK \
  61. - sl_SI \
  62. - sr_RS \
  63. - sv_SE \
  64. - th_TH \
  65. - tl_PH \
  66. - tr_TR \
  67. - uk_UA \
  68. - vi_VN \
  69. - zh_CN \
  70. - zh_HK \
  71. - zh_TW
  72. +PRODUCT_LOCALES := en_US es_ES
  73. diff --git a/target/product/sdk.mk b/target/product/sdk.mk
  74. index 95c0c8e..62c443f 100644
  75. --- a/target/product/sdk.mk
  76. +++ b/target/product/sdk.mk
  77. @@ -117,69 +117,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
  78.  PRODUCT_BRAND := generic
  79.  PRODUCT_NAME := sdk
  80.  PRODUCT_DEVICE := generic
  81. -PRODUCT_LOCALES := \
  82. -       ldpi \
  83. -       hdpi \
  84. -       mdpi \
  85. -       ar_EG \
  86. -       ar_IL \
  87. -        ur_PK \
  88. -        fa_IR \
  89. -       bg_BG \
  90. -       ca_ES \
  91. -       cs_CZ \
  92. -       da_DK \
  93. -       de_AT \
  94. -       de_CH \
  95. -       de_DE \
  96. -       de_LI \
  97. -       el_GR \
  98. -       en_AU \
  99. -       en_CA \
  100. -       en_GB \
  101. -       en_IE \
  102. -       en_IN \
  103. -       en_NZ \
  104. -       en_SG \
  105. -       en_US \
  106. -       en_ZA \
  107. -       es_ES \
  108. -       es_US \
  109. -       fi_FI \
  110. -       fr_BE \
  111. -       fr_CA \
  112. -       fr_CH \
  113. -       fr_FR \
  114. -       he_IL \
  115. -       hi_IN \
  116. -       hr_HR \
  117. -       hu_HU \
  118. -       id_ID \
  119. -       it_CH \
  120. -       it_IT \
  121. -       ja_JP \
  122. -       ko_KR \
  123. -       lt_LT \
  124. -       lv_LV \
  125. -       nb_NO \
  126. -       nl_BE \
  127. -       nl_NL \
  128. -       pl_PL \
  129. -       pt_BR \
  130. -       pt_PT \
  131. -       ro_RO \
  132. -       ru_RU \
  133. -       sk_SK \
  134. -       sl_SI \
  135. -       sr_RS \
  136. -       sv_SE \
  137. -       th_TH \
  138. -       tl_PH \
  139. -       tr_TR \
  140. -       uk_UA \
  141. -       vi_VN \
  142. -       zh_CN \
  143. -       zh_TW
  144. +PRODUCT_LOCALES := ldpi hdpi mdpi en_US es_ES
  145.  
  146.  # include available languages for TTS in the system image
  147.  include external/svox/pico/lang/PicoLangDeDeInSystem.mk
  148.  
  149. project device/geeksphone/zero/
  150. diff --git a/320_480logo.rle b/320_480logo.rle
  151. index f02ab48..8672207 100644
  152. Binary files a/320_480logo.rle and b/320_480logo.rle differ
  153. diff --git a/init.zero.rc b/init.zero.rc
  154. index 2da6757..1b9c618 100644
  155. --- a/init.zero.rc
  156. +++ b/init.zero.rc
  157. @@ -20,6 +20,8 @@ on fs
  158.     chmod 777 /data/simcom/simlog
  159.     mkdir /data/simcom/btadd        0777 system system
  160.     chmod 777 /data/simcom/btadd
  161. +   mkdir /data/misc/sensors        0777 compass system
  162. +   chmod 777 /data/misc/sensors
  163.     #mount yaffs2 mtd@system /system rw remount
  164.  
  165.  #---enable keypad interrupt until boot complete
  166. @@ -50,15 +52,28 @@ on boot
  167.      mkdir /data/misc/dhcp 0770 dhcp dhcp
  168.      chmod 0770 /data/misc/wifi/cert/as
  169.      chown dhcp dhcp /data/misc/dhcp
  170. +    chmod 666 /dev/mot
  171. +    chmod 666 /dev/mmc31xx
  172. +    chmod 666 /dev/ecompass_ctrl
  173. +    chmod 666 /dev/cm3623_ps
  174. +    chmod 666 /dev/cm3623_als
  175. +    mkdir /data/misc/sensors 0777 system system
  176.  
  177.      # Adjust socket buffer to enlarge TCP receive window for high bandwidth
  178.      write /proc/sys/net/ipv4/tcp_adv_win_scale  1
  179.  
  180.  on property:dev.bootcomplete=1
  181. -    # Adjust cpufreq to ondemand according to original post-boot script
  182. -    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
  183. -    write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 90
  184. -    write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 25000
  185. +    # Adjust cpufreq to smartassV2
  186. +    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor smartass2
  187. +    # write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 90
  188. +    # write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 25000
  189. +    # LowMemoryKiller
  190. +    write /sys/module/lowmemorykiller/parameters/minfree 3584,4096,8192,10240,11264,12288
  191. +    write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,5120,5632,6144
  192. +    write /sys/module/lowmemorykiller/parameters/check_filepages 1
  193. +    # SD
  194. +    write /sys/block/mmcblk0/bdi/read_ahead_kb 2048
  195. +    write /sys/devices/virtual/bdi/179:0/read_ahead_kb 2048
  196.  
  197.  on property:init.svc.bluetoothd=running
  198.      write /sys/devices/virtual/bluetooth/hci0/idle_timeout 7000
  199. @@ -123,10 +138,8 @@ service dhcpcd_wlan0 /system/bin/dhcpcd -BKL wlan0
  200.      oneshot
  201.  
  202.  service memsicd /system/bin/memsicd
  203. -    user compass
  204.      oneshot
  205.  
  206.  service wifi-loader /system/bin/logwrapper /system/bin/wificit.sh
  207.      disabled
  208.      oneshot
  209. -
  210. diff --git a/kernel b/kernel
  211. index 79fe88b..6ab9cce 100755
  212. Binary files a/kernel and b/kernel differ
  213. diff --git a/libcamera/QualcommCameraHardware.cpp b/libcamera/QualcommCameraHardware.cpp
  214. index c2360e7..81ac190 100644
  215. --- a/libcamera/QualcommCameraHardware.cpp
  216. +++ b/libcamera/QualcommCameraHardware.cpp
  217. @@ -75,7 +75,7 @@ extern "C" {
  218.  #define DEFAULT_PICTURE_WIDTH  1024
  219.  #define DEFAULT_PICTURE_HEIGHT 768
  220.  #define THUMBNAIL_BUFFER_SIZE (THUMBNAIL_WIDTH * THUMBNAIL_HEIGHT * 3/2)
  221. -#define MAX_ZOOM_LEVEL 5
  222. +#define MAX_ZOOM_LEVEL 20
  223.  #define NOT_FOUND -1
  224.  // Number of video buffers held by kernal (initially 1,2 &3)
  225.  #define ACTIVE_VIDEO_BUFFERS 3
  226. @@ -219,12 +219,12 @@ board_property boardProperties[] = {
  227.  static const camera_size_type picture_sizes[] = {
  228.      { 2592, 1944 }, // 5MP
  229.      { 2048, 1536 }, // 3MP QXGA
  230. -    { 1920, 1080 }, //HD1080
  231. +//  { 1920, 1080 }, //HD1080
  232.      { 1600, 1200 }, // 2MP UXGA
  233. -    { 1280, 768 }, //WXGA
  234. -    { 1280, 720 }, //HD720
  235. +//  { 1280, 768 }, //WXGA
  236. +//  { 1280, 720 }, //HD720
  237.      { 1024, 768}, // 1MP XGA
  238. -    { 800, 600 }, //SVGA
  239. +//  { 800, 600 }, //SVGA
  240.      { 800, 480 }, // WVGA
  241.      { 640, 480 }, // VGA
  242.      { 352, 288 }, //CIF
  243. @@ -333,10 +333,10 @@ static const str_map effects[] = {
  244.      { CameraParameters::EFFECT_NEGATIVE,   CAMERA_EFFECT_NEGATIVE },
  245.      { CameraParameters::EFFECT_SOLARIZE,   CAMERA_EFFECT_SOLARIZE },
  246.      { CameraParameters::EFFECT_SEPIA,      CAMERA_EFFECT_SEPIA },
  247. -    { CameraParameters::EFFECT_POSTERIZE,  CAMERA_EFFECT_POSTERIZE },
  248. -    { CameraParameters::EFFECT_WHITEBOARD, CAMERA_EFFECT_WHITEBOARD },
  249. -    { CameraParameters::EFFECT_BLACKBOARD, CAMERA_EFFECT_BLACKBOARD },
  250. -    { CameraParameters::EFFECT_AQUA,       CAMERA_EFFECT_AQUA }
  251. +//  { CameraParameters::EFFECT_POSTERIZE,  CAMERA_EFFECT_POSTERIZE },
  252. +//  { CameraParameters::EFFECT_WHITEBOARD, CAMERA_EFFECT_WHITEBOARD },
  253. +//  { CameraParameters::EFFECT_BLACKBOARD, CAMERA_EFFECT_BLACKBOARD },
  254. +//  { CameraParameters::EFFECT_AQUA,       CAMERA_EFFECT_AQUA }
  255.  };
  256.  
  257.  // from qcamera/common/camera.h
  258. @@ -563,20 +563,20 @@ static struct country_map country_numeric[] = {
  259.  
  260.  static const str_map scenemode[] = {
  261.      { CameraParameters::SCENE_MODE_AUTO,           CAMERA_BESTSHOT_OFF },
  262. -    { CameraParameters::SCENE_MODE_ACTION,         CAMERA_BESTSHOT_ACTION },
  263. -    { CameraParameters::SCENE_MODE_PORTRAIT,       CAMERA_BESTSHOT_PORTRAIT },
  264. -    { CameraParameters::SCENE_MODE_LANDSCAPE,      CAMERA_BESTSHOT_LANDSCAPE },
  265. +//  { CameraParameters::SCENE_MODE_ACTION,         CAMERA_BESTSHOT_ACTION },
  266. +//  { CameraParameters::SCENE_MODE_PORTRAIT,       CAMERA_BESTSHOT_PORTRAIT },
  267. +//  { CameraParameters::SCENE_MODE_LANDSCAPE,      CAMERA_BESTSHOT_LANDSCAPE },
  268.      { CameraParameters::SCENE_MODE_NIGHT,          CAMERA_BESTSHOT_NIGHT },
  269. -    { CameraParameters::SCENE_MODE_NIGHT_PORTRAIT, CAMERA_BESTSHOT_NIGHT_PORTRAIT },
  270. -    { CameraParameters::SCENE_MODE_THEATRE,        CAMERA_BESTSHOT_THEATRE },
  271. -    { CameraParameters::SCENE_MODE_BEACH,          CAMERA_BESTSHOT_BEACH },
  272. -    { CameraParameters::SCENE_MODE_SNOW,           CAMERA_BESTSHOT_SNOW },
  273. -    { CameraParameters::SCENE_MODE_SUNSET,         CAMERA_BESTSHOT_SUNSET },
  274. -    { CameraParameters::SCENE_MODE_STEADYPHOTO,    CAMERA_BESTSHOT_ANTISHAKE },
  275. -    { CameraParameters::SCENE_MODE_FIREWORKS ,     CAMERA_BESTSHOT_FIREWORKS },
  276. -    { CameraParameters::SCENE_MODE_SPORTS ,        CAMERA_BESTSHOT_SPORTS },
  277. -    { CameraParameters::SCENE_MODE_PARTY,          CAMERA_BESTSHOT_PARTY },
  278. -    { CameraParameters::SCENE_MODE_CANDLELIGHT,    CAMERA_BESTSHOT_CANDLELIGHT },
  279. +//  { CameraParameters::SCENE_MODE_NIGHT_PORTRAIT, CAMERA_BESTSHOT_NIGHT_PORTRAIT },
  280. +//  { CameraParameters::SCENE_MODE_THEATRE,        CAMERA_BESTSHOT_THEATRE },
  281. +//  { CameraParameters::SCENE_MODE_BEACH,          CAMERA_BESTSHOT_BEACH },
  282. +//  { CameraParameters::SCENE_MODE_SNOW,           CAMERA_BESTSHOT_SNOW },
  283. +//  { CameraParameters::SCENE_MODE_SUNSET,         CAMERA_BESTSHOT_SUNSET },
  284. +//  { CameraParameters::SCENE_MODE_STEADYPHOTO,    CAMERA_BESTSHOT_ANTISHAKE },
  285. +//  { CameraParameters::SCENE_MODE_FIREWORKS ,     CAMERA_BESTSHOT_FIREWORKS },
  286. +//  { CameraParameters::SCENE_MODE_SPORTS ,        CAMERA_BESTSHOT_SPORTS },
  287. +//  { CameraParameters::SCENE_MODE_PARTY,          CAMERA_BESTSHOT_PARTY },
  288. +//  { CameraParameters::SCENE_MODE_CANDLELIGHT,    CAMERA_BESTSHOT_CANDLELIGHT },
  289.  };
  290.  
  291.  #define country_number (sizeof(country_numeric) / sizeof(country_map))
  292. @@ -644,8 +644,8 @@ static const str_map focus_modes[] = {
  293.  };
  294.  
  295.  static const str_map lensshade[] = {
  296. -    { CameraParameters::LENSSHADE_ENABLE, TRUE },
  297. -    { CameraParameters::LENSSHADE_DISABLE, FALSE }
  298. +//  { CameraParameters::LENSSHADE_ENABLE, TRUE },
  299. +//  { CameraParameters::LENSSHADE_DISABLE, FALSE }
  300.  };
  301.  
  302.  static const str_map continuous_af[] = {
  303. @@ -708,7 +708,7 @@ static String8 lensshade_values;
  304.  static String8 touchafaec_values;
  305.  static String8 picture_format_values;
  306.  static String8 continuous_af_values;
  307. -static String8 zoom_ratio_values;
  308. +// static String8 zoom_ratio_values;
  309.  static String8 scenemode_values;
  310.  static String8 preview_frame_rate_values;
  311.  
  312. @@ -912,9 +912,9 @@ static void receive_shutter_callback(common_crop_t *crop);
  313.  static void receive_camframetimeout_callback(void);
  314.  static int fb_fd = -1;
  315.  static int32_t mMaxZoom = 0;
  316. -static bool zoomSupported = false;
  317. +// static bool zoomSupported = false;
  318.  static bool native_get_maxzoom(int camfd, void *pZm);
  319. -static bool native_get_zoomratios(int camfd, void *pZr, int maxZoomLevel);
  320. +// static bool native_get_zoomratios(int camfd, void *pZr, int maxZoomLevel);
  321.  
  322.  static int dstOffset = 0;
  323.  
  324. @@ -1111,32 +1111,32 @@ void QualcommCameraHardware::initDefaultParameters()
  325.                  continuous_af, sizeof(continuous_af) / sizeof(str_map));
  326.          }
  327.  
  328. -        if(native_get_maxzoom(mCameraControlFd,
  329. -                (void *)&mMaxZoom) == true){
  330. -            LOGD("Maximum zoom value is %d", mMaxZoom);
  331. -            zoomSupported = true;
  332. -            if(mMaxZoom > 0){
  333. +//      if(native_get_maxzoom(mCameraControlFd,
  334. +//              (void *)&mMaxZoom) == true){
  335. +//          LOGD("Maximum zoom value is %d", mMaxZoom);
  336. +//          zoomSupported = true;
  337. +//          if(mMaxZoom > 0){
  338.                  //if max zoom is available find the zoom ratios
  339. -                int16_t * zoomRatios = new int16_t[mMaxZoom+1];
  340. -                if(zoomRatios != NULL){
  341. -                    if(native_get_zoomratios(mCameraControlFd,
  342. -                                (void *)zoomRatios, mMaxZoom + 1) == true){
  343. -                        zoom_ratio_values =
  344. -                            create_str(zoomRatios, mMaxZoom + 1);
  345. -                    }else {
  346. -                    LOGE("Failed to get zoomratios...");
  347. -                    }
  348. -                    delete zoomRatios;
  349. -                } else {
  350. -                    LOGE("zoom ratios failed to acquire memory");
  351. -                }
  352. -            }
  353. -        } else {
  354. -            zoomSupported = false;
  355. -            LOGE("Failed to get maximum zoom value...setting max "
  356. -                    "zoom to zero");
  357. -            mMaxZoom = 0;
  358. -        }
  359. +//              int16_t * zoomRatios = new int16_t[mMaxZoom+1];
  360. +//              if(zoomRatios != NULL){
  361. +//                  if(native_get_zoomratios(mCameraControlFd,
  362. +//                              (void *)zoomRatios, mMaxZoom + 1) == true){
  363. +//                      zoom_ratio_values =
  364. +//                          create_str(zoomRatios, mMaxZoom + 1);
  365. +//                  }else {
  366. +//                  LOGE("Failed to get zoomratios...");
  367. +//                  }
  368. +//                  delete zoomRatios;
  369. +//              } else {
  370. +//                  LOGE("zoom ratios failed to acquire memory");
  371. +//              }
  372. +//          }
  373. +//      } else {
  374. +//          zoomSupported = false;
  375. +//          LOGE("Failed to get maximum zoom value...setting max "
  376. +//                  "zoom to zero");
  377. +//          mMaxZoom = 0;
  378. +//      }
  379.          preview_frame_rate_values = create_values_range_str(
  380.              MINIMUM_FPS, MAXIMUM_FPS);
  381.          parameter_string_initialized = true;
  382. @@ -1183,15 +1183,15 @@ void QualcommCameraHardware::initDefaultParameters()
  383.      mParameters.set(CameraParameters::KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES,
  384.                  valuesStr.string());
  385.  
  386. -    if(zoomSupported){
  387. -        mParameters.set(CameraParameters::KEY_ZOOM_SUPPORTED, "true");
  388. -        LOGV("max zoom is %d", mMaxZoom);
  389. -        mParameters.set("max-zoom",mMaxZoom);
  390. -        mParameters.set(CameraParameters::KEY_ZOOM_RATIOS,
  391. -                            zoom_ratio_values);
  392. -    } else {
  393. -        mParameters.set(CameraParameters::KEY_ZOOM_SUPPORTED, "false");
  394. -    }
  395. +//  if(zoomSupported){
  396. +//      mParameters.set(CameraParameters::KEY_ZOOM_SUPPORTED, "true");
  397. +//      LOGV("max zoom is %d", mMaxZoom);
  398. +//      mParameters.set("max-zoom",mMaxZoom);
  399. +//      mParameters.set(CameraParameters::KEY_ZOOM_RATIOS,
  400. +//                          zoom_ratio_values);
  401. +//  } else {
  402. +//      mParameters.set(CameraParameters::KEY_ZOOM_SUPPORTED, "false");
  403. +//  }
  404.  
  405.      mParameters.set(CameraParameters::KEY_ANTIBANDING,
  406.                      CameraParameters::ANTIBANDING_OFF);
  407. @@ -1257,6 +1257,8 @@ void QualcommCameraHardware::initDefaultParameters()
  408.  
  409.      mParameters.set("luma-adaptation", "3");
  410.      mParameters.set("zoom-supported", "true");
  411. +    mParameters.set("zoom-ratios", "100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200");
  412. +    mParameters.set("max-zoom", MAX_ZOOM_LEVEL);
  413.      mParameters.set("zoom", 0);
  414.      mParameters.set(CameraParameters::KEY_PICTURE_FORMAT,
  415.                      CameraParameters::PIXEL_FORMAT_JPEG);
  416. @@ -1554,30 +1556,30 @@ static bool native_get_maxzoom(int camfd, void *pZm)
  417.      return true;
  418.  }
  419.  
  420. -static bool native_get_zoomratios(int camfd, void *pZr, int maxZoomSize)
  421. -{
  422. -    LOGV("native_get_zoomratios E");
  423. -    struct msm_ctrl_cmd ctrlCmd;
  424. -    int16_t *zoomRatios = (int16_t *)pZr;
  425. +//  static bool native_get_zoomratios(int camfd, void *pZr, int maxZoomSize)
  426. +//{
  427. +//  LOGV("native_get_zoomratios E");
  428. +//  struct msm_ctrl_cmd ctrlCmd;
  429. +//  int16_t *zoomRatios = (int16_t *)pZr;
  430.  
  431. -    if(maxZoomSize <= 0)
  432. -        return false;
  433. +//  if(maxZoomSize <= 0)
  434. +//      return false;
  435.  
  436. -    ctrlCmd.type       = CAMERA_GET_PARM_ZOOMRATIOS;
  437. -    ctrlCmd.timeout_ms = 5000;
  438. -    ctrlCmd.length     = sizeof(int16_t)* (maxZoomSize);
  439. -    ctrlCmd.value      = zoomRatios;
  440. -    ctrlCmd.resp_fd    = camfd;
  441. +//  ctrlCmd.type       = CAMERA_GET_PARM_ZOOMRATIOS;
  442. +//  ctrlCmd.timeout_ms = 5000;
  443. +//  ctrlCmd.length     = sizeof(int16_t)* (maxZoomSize);
  444. +//  ctrlCmd.value      = zoomRatios;
  445. +//  ctrlCmd.resp_fd    = camfd;
  446.  
  447. -    if (ioctl(camfd, MSM_CAM_IOCTL_CTRL_COMMAND, &ctrlCmd) < 0) {
  448. -        LOGE("native_get_zoomratios: ioctl fd %d error %s",
  449. -                camfd,
  450. -                strerror(errno));
  451. -        return false;
  452. -    }
  453. -    LOGV("native_get_zoomratios X");
  454. -    return true;
  455. -}
  456. +//  if (ioctl(camfd, MSM_CAM_IOCTL_CTRL_COMMAND, &ctrlCmd) < 0) {
  457. +//      LOGE("native_get_zoomratios: ioctl fd %d error %s",
  458. +//              camfd,
  459. +//              strerror(errno));
  460. +//      return false;
  461. +//  }
  462. +//  LOGV("native_get_zoomratios X");
  463. +//  return true;
  464. +//}
  465.  
  466.  static bool native_set_afmode(int camfd, isp3a_af_mode_t af_type)
  467.  {
  468. @@ -2917,6 +2919,16 @@ status_t QualcommCameraHardware::startPreviewInternal()
  469.      //Reset the Gps Information
  470.      exif_table_numEntries = 0;
  471.  
  472. +    if(native_get_maxzoom(mCameraControlFd, (void *)&mMaxZoom) == true){
  473. +        LOGD("Maximum zoom value is %d", mMaxZoom);
  474. +        mParameters.set("zoom-supported", "true");
  475. +    } else {
  476. +        LOGE("Failed to get maximum zoom value...setting max zoom to zero");
  477. +        mParameters.set("zoom-supported", "false");
  478. +        mMaxZoom = 0;
  479. +    }
  480. +    mParameters.set("max-zoom",mMaxZoom);
  481. +
  482.      LOGV("startPreviewInternal X");
  483.      return NO_ERROR;
  484.  }
  485. @@ -2932,12 +2944,14 @@ void QualcommCameraHardware::stopPreviewInternal()
  486.  {
  487.      LOGV("stopPreviewInternal E: %d", mCameraRunning);
  488.      if (mCameraRunning) {
  489. +#if 0
  490.          // Cancel auto focus.
  491.          {
  492.              if (mNotifyCallback && (mMsgEnabled & CAMERA_MSG_FOCUS)) {
  493.                  cancelAutoFocusInternal();
  494.              }
  495.          }
  496. +#endif
  497.  
  498.          Mutex::Autolock l(&mCamframeTimeoutLock);
  499.          {
  500. @@ -3095,12 +3109,12 @@ status_t QualcommCameraHardware::cancelAutoFocusInternal()
  501.          return NO_ERROR;
  502.      }
  503.  
  504. -#if 0
  505. +//#if 0
  506.      if (mAutoFocusFd < 0) {
  507.          LOGV("cancelAutoFocusInternal X: not in progress");
  508.          return NO_ERROR;
  509.      }
  510. -#endif
  511. +//#endif
  512.  
  513.      status_t rc = NO_ERROR;
  514.      status_t err;
  515. @@ -3382,11 +3396,11 @@ status_t QualcommCameraHardware::setParameters(const CameraParameters& params)
  516.      if ((rc = setRotation(params)))     final_rc = rc;
  517.      if ((rc = setZoom(params)))         final_rc = rc;
  518.      if ((rc = setOrientation(params)))  final_rc = rc;
  519. -    if ((rc = setLensshadeValue(params)))  final_rc = rc;
  520. +//  if ((rc = setLensshadeValue(params)))  final_rc = rc;  // 37
  521.      if ((rc = setPictureFormat(params))) final_rc = rc;
  522. -    if ((rc = setSharpness(params)))    final_rc = rc;
  523. -    if ((rc = setSaturation(params)))   final_rc = rc;
  524. -    if ((rc = setSceneMode(params)))    final_rc = rc;
  525. +//  if ((rc = setSharpness(params)))    final_rc = rc;     // 4
  526. +//  if ((rc = setSaturation(params)))   final_rc = rc;     // 11
  527. +//  if ((rc = setSceneMode(params)))    final_rc = rc;     // 27
  528.      if ((rc = setContrast(params)))     final_rc = rc;
  529.  
  530.      const char *str = params.get(CameraParameters::KEY_SCENE_MODE);
  531. @@ -3394,11 +3408,11 @@ status_t QualcommCameraHardware::setParameters(const CameraParameters& params)
  532.  
  533.      if((value != NOT_FOUND) && (value == CAMERA_BESTSHOT_OFF)) {
  534.          if ((rc = setPreviewFrameRate(params))) final_rc = rc;
  535. -        if ((rc = setAntibanding(params)))  final_rc = rc;
  536. -        if ((rc = setAutoExposure(params))) final_rc = rc;
  537. +//      if ((rc = setAntibanding(params)))  final_rc = rc;  // 54
  538. +//      if ((rc = setAutoExposure(params))) final_rc = rc;  // 12
  539.          if ((rc = setExposureCompensation(params))) final_rc = rc;
  540.          if ((rc = setWhiteBalance(params))) final_rc = rc;
  541. -        if ((rc = setFlash(params)))        final_rc = rc;
  542. +//      if ((rc = setFlash(params)))        final_rc = rc;
  543.          if ((rc = setFocusMode(params)))    final_rc = rc;
  544.          if ((rc = setBrightness(params)))   final_rc = rc;
  545.          if ((rc = setISOValue(params)))  final_rc = rc;
  546. diff --git a/libcamera/QualcommCameraHardware.h b/libcamera/QualcommCameraHardware.h
  547. index ebba7f6..40e20a7 100644
  548. --- a/libcamera/QualcommCameraHardware.h
  549. +++ b/libcamera/QualcommCameraHardware.h
  550. @@ -262,7 +262,8 @@ enum camera_ops {
  551.      CAMERA_START_RECORDING,
  552.      CAMERA_STOP_RECORDING,
  553.      CAMERA_GET_PARM_MAXZOOM,
  554. -    CAMERA_GET_PARM_ZOOMRATIOS,
  555. +//  CAMERA_GET_PARM_ZOOMRATIOS,
  556. +    CAMERA_START_RAW_SNAPSHOT,
  557.      CAMERA_SET_PARM_LED_MODE,
  558.      CAMERA_GET_PARM_AF_SHARPNESS,
  559.      CAMERA_SET_MOTION_ISO,
  560. @@ -272,7 +273,6 @@ enum camera_ops {
  561.      CAMERA_PREPARE_SNAPSHOT,
  562.      CAMERA_SET_FPS_MODE,
  563.      CAMERA_SET_PARM_SCENE_MODE,
  564. -    CAMERA_START_RAW_SNAPSHOT,
  565.  };
  566.  
  567.  typedef enum {
  568. diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
  569. index e2b257d..6e1740b 100644
  570. --- a/overlay/frameworks/base/core/res/res/values/config.xml
  571. +++ b/overlay/frameworks/base/core/res/res/values/config.xml
  572. @@ -59,10 +59,10 @@
  573.           than the size of the config_autoBrightnessLevels array.
  574.      -->
  575.      <integer-array name="config_autoBrightnessLcdBacklightValues">
  576. -        <item>25</item>
  577. -        <item>55</item>
  578. -        <item>70</item>
  579. -        <item>70</item>
  580. +        <item>35</item>
  581. +        <item>50</item>
  582. +        <item>80</item>
  583. +        <item>100</item>
  584.          <item>250</item>
  585.      </integer-array>
  586.  
  587. diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
  588. index b1d33cd..8738ccb 100644
  589. --- a/overlay/frameworks/base/core/res/res/xml/power_profile.xml
  590. +++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
  591. @@ -1,59 +1,64 @@
  592.  <?xml version="1.0" encoding="utf-8"?>
  593. +<!--
  594. +**
  595. +** Copyright 2009, The Android Open Source Project
  596. +**
  597. +** Licensed under the Apache License, Version 2.0 (the "License")
  598. +** you may not use this file except in compliance with the License.
  599. +** You may obtain a copy of the License at
  600. +**
  601. +**     http://www.apache.org/licenses/LICENSE-2.0
  602. +**
  603. +** Unless required by applicable law or agreed to in writing, software
  604. +** distributed under the License is distributed on an "AS IS" BASIS,
  605. +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  606. +** See the License for the specific language governing permissions and
  607. +** limitations under the License.
  608. +*/
  609. +-->
  610.  <device name="Android" >
  611. -       <item name="none" >
  612. -               0
  613. -       </item>
  614. -       <item name="screen.on" >
  615. -               0.1
  616. -       </item>
  617. -       <item name="bluetooth.active" >
  618. -               0.1
  619. -       </item>
  620. -       <item name="bluetooth.on" >
  621. -               0.1
  622. -       </item>
  623. -       <item name="screen.full" >
  624. -               0.1
  625. -       </item>
  626. -       <item name="wifi.on" >
  627. -               0.1
  628. -       </item>
  629. -       <item name="wifi.active" >
  630. -               0.1
  631. -       </item>
  632. -       <item name="wifi.scan" >
  633. -               0.1
  634. -       </item>
  635. -       <item name="dsp.audio" >
  636. -               0.1
  637. -       </item>
  638. -       <item name="dsp.video" >
  639. -               0.1
  640. -       </item>
  641. -       <item name="radio.active" >
  642. -               1
  643. -       </item>
  644. -       <item name="radio.scanning" >
  645. -               0.5
  646. -       </item>
  647. -       <item name="gps.on" >
  648. -               1
  649. -       </item>
  650. +       <item name="none" >0</item>
  651. +       <item name="screen.on" >20</item>
  652. +       <item name="bluetooth.active" >90</item>
  653. +       <item name="bluetooth.on" >0.2</item>
  654. +       <item name="bluetooth.at">35500</item>
  655. +       <item name="screen.full" >80</item>
  656. +       <item name="wifi.on" >0.2</item>
  657. +       <item name="wifi.active" >90</item>
  658. +       <item name="wifi.scan" >200</item>
  659. +       <item name="dsp.audio" >25</item>
  660. +       <item name="dsp.video" >50</item>
  661. +       <item name="radio.active" >125</item>
  662. +       <item name="radio.scanning" >50</item>
  663. +       <item name="battery.capacity">1150</item>
  664. +       <item name="gps.on" >100</item>
  665.         <array name="radio.on" >
  666. -               <value > 0.2 </value>
  667. -               <value > 0.1 </value>
  668. -       </array>
  669. -       <array name="cpu.speeds" >
  670. -               <value > 600000 </value>
  671. -               <value > 400000 </value>
  672. -               <value > 128000 </value>
  673. -       </array>
  674. -       <item name="cpu.idle" >
  675. -               0.1
  676. -       </item>
  677. -       <array name="cpu.active" >
  678. -               <value > 0.25 </value>
  679. -               <value > 0.2 </value>
  680. -               <value > 0.1 </value>
  681. +               <value >1</value>
  682. +               <value >1</value>
  683.         </array>
  684. +  <array name="cpu.speeds">
  685. +      <value>122880</value>
  686. +      <value>245760</value>
  687. +      <value>320000</value>
  688. +      <value>480000</value>
  689. +      <value>604800</value>
  690. +      <value>672000</value>
  691. +      <value>729600</value>
  692. +      <value>748800</value>
  693. +      <value>768000</value>
  694. +  </array>
  695. +  <!-- Power consumption in suspend -->
  696. +  <item name="cpu.idle">0.1</item>
  697. +  <!-- Power consumption at different speeds -->
  698. +  <array name="cpu.active">
  699. +      <value>0.1</value>
  700. +      <value>0.1</value>
  701. +      <value>35</value>
  702. +      <value>75</value>
  703. +      <value>85</value>
  704. +      <value>101.5</value>
  705. +      <value>107.3</value>
  706. +      <value>123.6</value>
  707. +      <value>134.5</value>
  708. +  </array>
  709.  </device>
  710. diff --git a/prebuilt/dhd.ko b/prebuilt/dhd.ko
  711. index 569ce9e..3f40075 100644
  712. Binary files a/prebuilt/dhd.ko and b/prebuilt/dhd.ko differ
  713. diff --git a/recovery.fstab b/recovery.fstab
  714. index 9cd8848..ff06875 100644
  715. --- a/recovery.fstab
  716. +++ b/recovery.fstab
  717. @@ -6,3 +6,4 @@
  718.  /recovery      mtd             recovery
  719.  /sdcard                vfat            /dev/block/mmcblk0p1    /dev/block/mmcblk0
  720.  /system                yaffs2          system
  721. +/sd-ext                ext3            /dev/block/mmcblk0p2
  722. diff --git a/system.prop b/system.prop
  723. index 6585dcb..aed2243 100644
  724. --- a/system.prop
  725. +++ b/system.prop
  726. @@ -28,3 +28,6 @@ dalvik.vm.dexopt-data-only=1
  727.  
  728.  # Respect ALS setting, turn it off if not in use
  729.  ro.hardware.respect_als=true
  730. +
  731. +# Raise heap size
  732. +dalvik.vm.heapsize=32m
  733. diff --git a/zero.mk b/zero.mk
  734. index 52d9db2..ba874ed 100644
  735. --- a/zero.mk
  736. +++ b/zero.mk
  737. @@ -1,5 +1,5 @@
  738.  # The gps config appropriate for this device
  739. -$(call inherit-product, device/common/gps/gps_us_supl.mk)
  740. +$(call inherit-product, device/common/gps/gps_eu_supl.mk)
  741.  
  742.  $(call inherit-product-if-exists, vendor/geeksphone/zero/zero-vendor.mk)
  743.  
  744. @@ -113,6 +113,10 @@ PRODUCT_COPY_FILES += \
  745.  PRODUCT_COPY_FILES += \
  746.      device/geeksphone/zero/prebuilt/dhd.ko:system/lib/modules/dhd.ko
  747.  
  748. +## Módulo TUN
  749. +PRODUCT_COPY_FILES += \
  750. +    device/geeksphone/zero/prebuilt/tun.ko:system/lib/modules/tun.ko
  751. +
  752.  ## FMRadio app and dependencies
  753.  PRODUCT_COPY_FILES += \
  754.      vendor/geeksphone/zero/proprietary/lib/libfmhal.so:system/lib/libfmhal.so \
  755.  
  756. project frameworks/base/
  757. diff --git a/core/res/res/drawable/default_wallpaper.jpg b/core/res/res/drawable/default_wallpaper.jpg
  758. index 5ba522f..5431bc9 100644
  759. Binary files a/core/res/res/drawable/default_wallpaper.jpg and b/core/res/res/drawable/default_wallpaper.jpg differ
  760.  
  761. project packages/apps/Browser/
  762. diff --git a/res/values/strings.xml b/res/values/strings.xml
  763. index 7a1c4cc..2510ac1 100644
  764. --- a/res/values/strings.xml
  765. +++ b/res/values/strings.xml
  766. @@ -678,32 +678,6 @@
  767.      <string-array name="bookmarks" translatable="false">
  768.          <item>Google</item>
  769.          <item>http://www.google.com/</item>
  770. -        <item>Picasa</item>
  771. -        <item>http://picasaweb.google.com/m/viewer?source=androidclient</item>
  772. -        <item>Yahoo!</item>
  773. -        <item>http://www.yahoo.com/</item>
  774. -        <item>MSN</item>
  775. -        <item>http://www.msn.com/</item>
  776. -        <item>MySpace</item>
  777. -        <item>http://www.myspace.com/</item>
  778. -        <item>Facebook</item>
  779. -        <item>http://www.facebook.com/</item>
  780. -        <item>Wikipedia</item>
  781. -        <item>http://www.wikipedia.org/</item>
  782. -        <item>eBay</item>
  783. -        <item>http://www.ebay.com/</item>
  784. -        <item>CNN</item>
  785. -        <item>http://www.cnn.com/</item>
  786. -        <item>NY Times</item>
  787. -        <item>http://www.nytimes.com/</item>
  788. -        <item>ESPN</item>
  789. -        <item>http://espn.com/</item>
  790. -        <item>Amazon</item>
  791. -        <item>http://www.amazon.com/</item>
  792. -        <item>Weather Channel</item>
  793. -        <item>http://www.weather.com/</item>
  794. -        <item>BBC</item>
  795. -        <item>http://www.bbc.co.uk/</item>
  796.      </string-array>
  797.  
  798.      <!-- Bookmark name for Picasa website -->
  799.  
  800. project packages/apps/Camera/
  801. diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
  802. index 3abc463..aef52a8 100644
  803. --- a/src/com/android/camera/Camera.java
  804. +++ b/src/com/android/camera/Camera.java
  805. @@ -401,7 +401,7 @@ public class Camera extends BaseCamera implements View.OnClickListener,
  806.      private void initializeZoom() {
  807.          if (!mParameters.isZoomSupported()) return;
  808.  
  809. -        mZoomMax = mParameters.getMaxZoom();
  810. +        mZoomMax = mParameters.getZoomRatios().size() -1;
  811.          mSmoothZoomSupported = mParameters.isSmoothZoomSupported();
  812.          mGestureDetector = new GestureDetector(this, new ZoomGestureListener());
  813.  
  814. @@ -1897,7 +1897,7 @@ public class Camera extends BaseCamera implements View.OnClickListener,
  815.          * preview size/picture resolution
  816.          */
  817.          mParameters = mCameraDevice.getParameters();
  818. -        mZoomMax = mParameters.getMaxZoom();
  819. +        mZoomMax = mParameters.getZoomRatios().size() -1;
  820.      }
  821.  
  822.      private void stopPreview() {
  823. diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
  824. index 7987d36..29e763f 100644
  825. --- a/src/com/android/camera/VideoCamera.java
  826. +++ b/src/com/android/camera/VideoCamera.java
  827. @@ -1777,7 +1777,7 @@ public class VideoCamera extends BaseCamera
  828.  
  829.          // Maximum zoom value may change after preview size is set. Get the
  830.          // latest parameters here.
  831. -        mZoomMax = mParameters.getMaxZoom();
  832. +        mZoomMax = mParameters.getZoomRatios().size() -1;
  833.          mGestureDetector = new GestureDetector(this, new ZoomGestureListener());
  834.  
  835.          mCameraDevice.setZoomChangeListener(mZoomListener);
  836.  
  837. project vendor/cyanogen/
  838. diff --git a/overlay/common/frameworks/base/core/res/res/drawable/default_wallpaper.jpg b/overlay/common/frameworks/base/core/res/res/drawable/default_wallpaper.jpg
  839. index 0c29d88..5431bc9 100644
  840. Binary files a/overlay/common/frameworks/base/core/res/res/drawable/default_wallpaper.jpg and b/overlay/common/frameworks/base/core/res/res/drawable/default_wallpaper.jpg differ
  841.  
  842.  
clone this paste RAW Paste Data