Permalink
Browse files

Merge pull request #6993 from dscravag/nightly2

Nightly 2012-12-13
  • Loading branch information...
2 parents db43572 + ba1f140 commit 47990e89ad5710224a771cf64751ed84935433cc @dscravag dscravag committed Dec 13, 2012
Showing with 1,536 additions and 432 deletions.
  1. +5 −1 Makefile
  2. +5 −4 apps/browser/js/browser.js
  3. +80 −0 apps/communications/contacts/js/fb/fb_contact_utils.js
  4. +290 −66 apps/communications/contacts/js/fb/fb_data.js
  5. +1 −8 apps/communications/contacts/js/fb/fb_init.js
  6. +2 −41 apps/communications/contacts/js/fb/fb_utils.js
  7. +1 −1 apps/communications/contacts/js/fb/friends_list.js
  8. +2 −1 apps/communications/dialer/index.html
  9. +95 −3 apps/communications/dialer/js/contacts.js
  10. +4 −0 apps/communications/dialer/oncall.html
  11. +1 −1 apps/communications/ftu/js/wifi.js
  12. +1 −1 apps/email/js/ext/gaia-email-opt.js
  13. +4 −9 apps/gallery/js/MetadataParser.js
  14. +91 −60 apps/gallery/js/gallery.js
  15. +1 −0 apps/gallery/style/gallery.css
  16. +1 −1 apps/settings/index.html
  17. +53 −29 apps/settings/js/bluetooth.js
  18. +0 −2 apps/settings/js/connectivity.js
  19. +32 −0 apps/settings/js/settings.js
  20. +11 −3 apps/settings/style/settings.css
  21. +17 −5 apps/system/js/quick_settings.js
  22. +3 −1 apps/system/style/quick_settings/quick_settings.css
  23. +3 −1 build/settings.py
  24. +18 −8 shared/js/l10n.js
  25. +3 −1 shared/js/media/jpeg_metadata_parser.js
  26. +38 −19 tests/atoms/gaia_apps.js
  27. +133 −28 tests/atoms/gaia_data_layer.js
  28. +55 −2 tests/python/README.md
  29. +52 −7 tests/python/gaiatest/gaia_test.py
  30. +4 −2 tests/python/gaiatest/tests/contacts/manifest.ini
  31. +0 −2 tests/python/gaiatest/tests/contacts/test_add_new_contact.py
  32. +6 −4 tests/python/gaiatest/tests/contacts/test_call_contact.py
  33. +0 −2 tests/python/gaiatest/tests/contacts/test_edit_contact.py
  34. +0 −2 tests/python/gaiatest/tests/contacts/test_sms_contact.py
  35. +31 −7 tests/python/gaiatest/tests/manifest.ini
  36. +1 −1 tests/python/gaiatest/tests/marketplace/manifest.ini
  37. +6 −6 tests/python/gaiatest/tests/marketplace/test_marketplace_login.py
  38. +12 −16 tests/python/gaiatest/tests/marketplace/test_search_marketplace_and_install_app.py
  39. +3 −5 tests/python/gaiatest/tests/test_browser_cell_data.py
  40. +57 −0 tests/python/gaiatest/tests/test_browser_lan.py
  41. +0 −3 tests/python/gaiatest/tests/test_calculator.py
  42. +81 −5 tests/python/gaiatest/tests/test_calendar.py
  43. +0 −3 tests/python/gaiatest/tests/test_call_log.py
  44. +4 −7 tests/python/gaiatest/tests/test_camera.py
  45. +22 −6 tests/python/gaiatest/tests/test_cards_view.py
  46. +0 −3 tests/python/gaiatest/tests/test_clock.py
  47. +9 −11 tests/python/gaiatest/tests/test_dialer.py
  48. +0 −3 tests/python/gaiatest/tests/test_gallery.py
  49. +51 −0 tests/python/gaiatest/tests/test_launch_app.py
  50. +6 −4 tests/python/gaiatest/tests/test_lockscreen.py
  51. +10 −5 tests/python/gaiatest/tests/test_music.py
  52. +55 −0 tests/python/gaiatest/tests/test_radio.py
  53. +0 −3 tests/python/gaiatest/tests/test_sms.py
  54. +0 −3 tests/python/gaiatest/tests/test_updater.py
  55. +5 −8 tests/python/gaiatest/tests/test_video_player.py
  56. +6 −1 tests/python/gaiatest/tests/unit/manifest.ini
  57. +5 −0 tests/python/gaiatest/tests/unit/settings/manifest.ini
  58. +26 −0 tests/python/gaiatest/tests/unit/settings/test_carrier_settings.py
  59. +27 −0 tests/python/gaiatest/tests/unit/settings/test_settings.py
  60. +17 −0 tests/python/gaiatest/tests/unit/settings/test_wifi_settings.py
  61. +52 −0 tests/python/gaiatest/tests/unit/test_initial_state.py
  62. +30 −0 tests/python/gaiatest/tests/unit/test_kill.py
  63. +0 −5 tests/python/gaiatest/tests/unit/test_killall.py
  64. +2 −4 tests/python/gaiatest/tests/unit/test_launch_entrypoint.py
  65. +0 −1 tests/python/gaiatest/tests/unit/test_lock_screen.py
  66. +6 −7 tests/python/gaiatest/tests/unit/test_wifi.py
View
@@ -611,8 +611,12 @@ purge:
$(ADB) shell rm -r $(MSYS_FIX)$(GAIA_INSTALL_PARENT)/webapps
# Build the settings.json file from settings.py
+ifeq ($(NOFTU), 1)
+SETTINGS_ARG=--noftu
+endif
+
profile/settings.json: build/settings.py build/wallpaper.jpg
- python build/settings.py --console --homescreen $(SCHEME)homescreen.$(GAIA_DOMAIN)$(GAIA_PORT)/manifest.webapp --ftu $(SCHEME)communications.$(GAIA_DOMAIN)$(GAIA_PORT)/manifest.webapp --wallpaper build/wallpaper.jpg --output $@
+ python build/settings.py $(SETTINGS_ARG) --console --homescreen $(SCHEME)homescreen.$(GAIA_DOMAIN)$(GAIA_PORT)/manifest.webapp --ftu $(SCHEME)communications.$(GAIA_DOMAIN)$(GAIA_PORT)/manifest.webapp --wallpaper build/wallpaper.jpg --output $@
# push profile/settings.json to the phone
install-settings-defaults: profile/settings.json
@@ -1313,17 +1313,18 @@ var Browser = {
if (length == 1)
places.push({uri: '', title: ''});
- var self = this;
places.forEach(function processPlace(place) {
var thumbnail = document.createElement('li');
var link = document.createElement('a');
var title = document.createElement('span');
link.href = place.uri;
title.textContent = place.title ? place.title : place.uri;
- var objectURL = URL.createObjectURL(place.screenshot);
- self._topSiteThumbnailObjectURLs.push(objectURL);
- link.style.backgroundImage = 'url(' + objectURL + ')';
+ if (place.screenshot) {
+ var objectURL = URL.createObjectURL(place.screenshot);
+ this._topSiteThumbnailObjectURLs.push(objectURL);
+ link.style.backgroundImage = 'url(' + objectURL + ')';
+ }
thumbnail.appendChild(link);
thumbnail.appendChild(title);
@@ -209,3 +209,83 @@ fb.getAddress = function(fbdata) {
return out;
};
+
+// Merge done specifically for dialer and Call Log apps
+fb.mergeContact = function(devContact, fbContact) {
+ var fbPhotos = fbContact.photo;
+ if (!devContact.photo && Array.isArray(fbPhotos)) {
+ devContact.photo = [];
+ }
+
+ if (Array.isArray(fbPhotos) && fbPhotos.length > 0 && fbPhotos[0]) {
+ devContact.photo.push(fbPhotos[0]);
+ }
+
+ if (!devContact.tel && Array.isArray(fbContact.tel)) {
+ devContact.tel = [];
+ }
+
+ if (Array.isArray(fbContact.tel)) {
+ fbContact.tel.forEach(function(atel) {
+ devContact.tel.push(atel);
+ });
+ }
+
+ return devContact;
+};
+
+fb.getContactByNumber = function(number, onsuccess, onerror) {
+ var req = fb.contacts.getByPhone(number);
+
+ req.onsuccess = function(e) {
+ onsuccess(e.target.result);
+ };
+
+ req.onerror = onerror;
+};
+
+// Only will be executed in the case of not loading fb.utils previously
+// i.e. dialer and call log FB integration
+var fb = window.fb || {};
+fb.utils = window.fb.utils || {};
+
+// Returns the mozContact associated to a UID in FB
+fb.utils.getMozContactByUid = function(uid, onsuccess, onerror) {
+ var filter = {
+ filterBy: ['category'],
+ filterValue: uid,
+ filterOp: 'contains'
+ };
+
+ var req = navigator.mozContacts.find(filter);
+ req.onsuccess = onsuccess;
+ req.onerror = onerror;
+};
+
+ /**
+ * Request auxiliary object to support asynchronous calls
+ *
+ */
+fb.utils.Request = function() {
+ this.done = function(result) {
+ this.result = result;
+ if (typeof this.onsuccess === 'function') {
+ var ev = {};
+ ev.target = this;
+ window.setTimeout(function() {
+ this.onsuccess(ev);
+ }.bind(this), 0);
+ }
+ }
+
+ this.failed = function(error) {
+ this.error = error;
+ if (typeof this.onerror === 'function') {
+ var ev = {};
+ ev.target = this;
+ window.setTimeout(function() {
+ this.onerror(ev);
+ }.bind(this), 0);
+ }
+ }
+};
Oops, something went wrong.

0 comments on commit 47990e8

Please sign in to comment.