From 24e6de747889352ad303adf8d4e29b9661ae69ea Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 6 May 2015 15:53:24 -0700 Subject: [PATCH 01/17] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/b81582fc4a0f Author: Eli Perelman Desc: Merge pull request #29926 from eliperelman/bug-1161803 Bug 1161803 - Bumping gaia-raptor to v1.5.0 ======== https://hg.mozilla.org/integration/gaia-central/rev/63aecdf4ff27 Author: Eli Perelman Desc: Bug 1161803 - Bumping gaia-raptor to v1.5.0 ======== https://hg.mozilla.org/integration/gaia-central/rev/f0603fd9468a Author: Gareth Aye Desc: Merge pull request #29925 from gaye/bug-1162177-counter-app-improvements Bug 1162177 - Counter app improvements r=Eli ======== https://hg.mozilla.org/integration/gaia-central/rev/e60549effbd9 Author: gaye Desc: Bug 1162177 - Counter app improvements r=Eli --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 72750f58cbc..17d3f7fe27d 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "83b27f522642ea573c57e882657ab5c73d4b07f4", + "git_revision": "ace437d0b0d24f7f2bbb6f28ac5fe50231eab3a5", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "6f889f462ec6387626570bab40a0f032a205edf6", + "revision": "b81582fc4a0f4bd979eb679544fe3d7478f687af", "repo_path": "integration/gaia-central" } From d624e19a5843e37832d4b9623875885905a38dde Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 6 May 2015 15:55:36 -0700 Subject: [PATCH 02/17] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 4 ++-- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 6ae5451e5b7..25888a770c0 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + @@ -134,7 +134,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 8c7320f7f80..9d4892726e8 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index fdd6af7eb02..0dea7aac3e8 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 66d9616f951..9dbf7a77704 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 5a78c07c293..43207454490 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 8c7320f7f80..9d4892726e8 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 871188c4591..ef9a0dfdd2e 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 5b4036dbc61..815a91b2a02 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index bf5ca7c07fe..250ab675bc6 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 929cd609aaa..aeea6bdc9df 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 70b5181ccf19a23b8d6062543d7b1470a31ef976 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 01:47:52 -0700 Subject: [PATCH 03/17] Bumping gaia.json for 12 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/9e78d1efd542 Author: Martijn Desc: Merge pull request #29920 from mwargers/1113762 Bug 1113762 - Add videos with counters to gaia-ui tests ======== https://hg.mozilla.org/integration/gaia-central/rev/f6952d5c6c20 Author: Martijn Wargers Desc: Bug 1113762 - Add videos with counters to gaia-ui tests ======== https://hg.mozilla.org/integration/gaia-central/rev/d90743b92a0c Author: autolander Desc: Bug 1160649 - merge pull request #29933 from crh0716:1160649 to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/613105da88a4 Author: Arthur Chen Desc: Bug 1160649 - Force to use wrapping in the feedback textarea ======== https://hg.mozilla.org/integration/gaia-central/rev/ba7c6aa916f9 Author: autolander Desc: Bug 1050823 - merge pull request #29751 from azasypkin:bug-1050823-remove-update-header to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/4bd5ce5d449e Author: Aleh Zasypkin Desc: Bug 1050823 - [Messages][Refactoring] Removed "ThreadUI.updateHeaderData" call while retrieving threads. r=julien ======== https://hg.mozilla.org/integration/gaia-central/rev/6dd1ad344724 Author: Ricky Chien Desc: Merge pull request #29913 from RickyChien/fix-utils-ls Bug 1141356 - utils-xpc.js ls recursive skipped if pattern not matched r=gduan ======== https://hg.mozilla.org/integration/gaia-central/rev/1563a94f8a90 Author: Ricky Chien Desc: Bug 1141356 - utils-xpc.js ls recursive skipped if pattern not matched ======== https://hg.mozilla.org/integration/gaia-central/rev/9f5e524f5381 Author: Yi-Fan Liao Desc: Merge pull request #29877 from begeeben/1156143_allow_user_to_move_cards_out_of Bug 1156143 - [Stingray][Home] Allow user to move cards out of a folder, r=rexboy ======== https://hg.mozilla.org/integration/gaia-central/rev/82e0665738c3 Author: Yi-Fan Liao Desc: Bug 1156143 - [Stingray][Home] Allow user to move cards out of a folder * Add up arrow for cards in the folder list. Set z-index correctly at arrange mode. * Implement removing card in folder list. * Implement moving a card out of a folder to the card list. ======== https://hg.mozilla.org/integration/gaia-central/rev/9cdab1740d74 Author: steveck-chung Desc: Merge pull request #29909 from steveck-chung/message-text-selection-recipient Bug 1160232 - [Message] Set recipient pill content unselectable, r=julienw ======== https://hg.mozilla.org/integration/gaia-central/rev/fb3e7b2c1b29 Author: Steve Chung Desc: Bug 1160232 - [Message] Set recipient pill content unselectable, r=julienw --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 17d3f7fe27d..2f574b1a41f 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "ace437d0b0d24f7f2bbb6f28ac5fe50231eab3a5", + "git_revision": "6bb1aec1ec65febd4158b8d9ef8024a49bcdf560", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "b81582fc4a0f4bd979eb679544fe3d7478f687af", + "revision": "9e78d1efd542cc02641d6ae215d0ce54188bc2c6", "repo_path": "integration/gaia-central" } From 1627f00d75b5aafa68d49a29781c17ebc44e5884 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 01:50:45 -0700 Subject: [PATCH 04/17] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 25888a770c0..84682f96b5f 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 9d4892726e8..82a6e600732 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 0dea7aac3e8..0731325b8fa 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 9dbf7a77704..55a8818db4a 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 43207454490..9e6c9f4b285 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 9d4892726e8..82a6e600732 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index ef9a0dfdd2e..fc8ebe3e89d 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 815a91b2a02..fd326fb413f 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 250ab675bc6..190cccbc2bb 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index aeea6bdc9df..28aca5f5ce4 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 73cbb1e4042b2af2449a1e6dc112b90d766af070 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 02:30:09 -0700 Subject: [PATCH 05/17] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/6c61d23fb535 Author: autolander Desc: Bug 1138815 - merge pull request #28792 from RudyLu:keyboard/Bug1138815-fine_tune_swiping_2 to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/139cb0b92fcb Author: Rudy Lu Desc: Bug 1138815 - fine tune the swiping behavior of swipeable panel view. - Add swipingDetector to decide the swiping based on distance and velocity. --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 2f574b1a41f..0f9f3701076 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "6bb1aec1ec65febd4158b8d9ef8024a49bcdf560", + "git_revision": "493754a7ef39ca63d5aebee6bf5c6a4dd0913f9b", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "9e78d1efd542cc02641d6ae215d0ce54188bc2c6", + "revision": "6c61d23fb535e8d98a1903743dec7a218814d3d2", "repo_path": "integration/gaia-central" } From 2fde49658f73efd4d24ea785ecd0c0bba902711d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 02:32:22 -0700 Subject: [PATCH 06/17] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 84682f96b5f..f134da1e836 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 82a6e600732..200bd35e064 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 0731325b8fa..07ec00e20d9 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 55a8818db4a..e978d854a7c 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 9e6c9f4b285..b3627fc1325 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 82a6e600732..200bd35e064 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index fc8ebe3e89d..c5065504fc4 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index fd326fb413f..19abfd1d8fd 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 190cccbc2bb..40aeab8b5be 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 28aca5f5ce4..04609ab0d75 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From fcf9ab74087fceb6db3082973b9ddb4810c5cdf2 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 03:37:42 -0700 Subject: [PATCH 07/17] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/8fb6beb1f9ef Author: autolander Desc: Bug 1161941 - merge pull request #29907 from sean2449:Bug-1161941-remove-scan to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/10562ec8d9c5 Author: Sung Chiu Desc: Bug 1161941 - [Stingray][TVDeck] Remove channel scanning logic * Remove channel scanning logic from TVDeck * Remove channel sorting --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 0f9f3701076..71c92d08320 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "493754a7ef39ca63d5aebee6bf5c6a4dd0913f9b", + "git_revision": "645d6ec33b296c13cb6670c290eb49f49bacd6bc", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "6c61d23fb535e8d98a1903743dec7a218814d3d2", + "revision": "8fb6beb1f9efafe99fff3370aa0a2ecc31fffaed", "repo_path": "integration/gaia-central" } From 3d93c5a05a3a4e52552113eebfc525dcc2862b86 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 03:40:00 -0700 Subject: [PATCH 08/17] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f134da1e836..66f3b5794d7 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 200bd35e064..8ef1fb7bb12 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 07ec00e20d9..e7d8ffe1926 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index e978d854a7c..7d6424d30b6 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index b3627fc1325..85098109509 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 200bd35e064..8ef1fb7bb12 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index c5065504fc4..96c52359c2f 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 19abfd1d8fd..f65618117ba 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 40aeab8b5be..69df0d27021 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 04609ab0d75..d8d76904e97 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From e5b44ffd7543c1f1b2e118a8728058d9f0f31751 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 04:27:35 -0700 Subject: [PATCH 09/17] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/5bcd1e68c0d5 Author: Rex KM Lee Desc: Merge pull request #29902 from rexboy7/1160970-folder-movecard-anime Bug 1160970 - [Stingray][Home] Folder move-in/move-out animation. r=dwi2 f=yifan ======== https://hg.mozilla.org/integration/gaia-central/rev/e834b09a4847 Author: Rex Lee Desc: Bug 1160970 - [Stingray][Home] Folder move-in/move-out animation --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 71c92d08320..c6fc64ffec6 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "645d6ec33b296c13cb6670c290eb49f49bacd6bc", + "git_revision": "8ca87724d6f83d0f15fe6908474684c2f9b98ec9", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "8fb6beb1f9efafe99fff3370aa0a2ecc31fffaed", + "revision": "5bcd1e68c0d5fa68f721e21b945eef1c56d9e5b6", "repo_path": "integration/gaia-central" } From 569763a5ecbc31ff9fa75882d14f8787a4083aa7 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 04:29:46 -0700 Subject: [PATCH 10/17] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 66f3b5794d7..e7467a9bc2c 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 8ef1fb7bb12..12d75ed8ef3 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index e7d8ffe1926..95df929895e 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 7d6424d30b6..0ff69b168d4 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 85098109509..4d7ef3cedf6 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 8ef1fb7bb12..12d75ed8ef3 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 96c52359c2f..b19a5e1367d 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index f65618117ba..d99a9e64903 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 69df0d27021..04ece6479e3 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index d8d76904e97..9a2c0b8efaa 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 1dc70a46063c9f01211fb53b8efe3ddfc407e8b0 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 05:18:11 -0700 Subject: [PATCH 11/17] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/f03397b47946 Author: autolander Desc: Bug 1162443 - merge pull request #29942 from crh0716:1162443 to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/c49602a98654 Author: Arthur Chen Desc: Bug 1162443 - Fix typos in the document and improve the consistency --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c6fc64ffec6..2085f722e7a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "8ca87724d6f83d0f15fe6908474684c2f9b98ec9", + "git_revision": "6a0319dffe17792f2ad64371f32e0d6523c0bbb3", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "5bcd1e68c0d5fa68f721e21b945eef1c56d9e5b6", + "revision": "f03397b4794662971187fe001c11f233cfbe851d", "repo_path": "integration/gaia-central" } From 838a7b390d8447f513c3e6c35a8981cb7452ac99 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 05:20:27 -0700 Subject: [PATCH 12/17] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index e7467a9bc2c..f2542ffdcb6 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 12d75ed8ef3..b8bbf2881b9 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 95df929895e..fba8d2dde5b 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 0ff69b168d4..a36eb59a3f0 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 4d7ef3cedf6..acca2ac5cee 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 12d75ed8ef3..b8bbf2881b9 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index b19a5e1367d..707fafbc99c 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index d99a9e64903..eb6459de08b 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 04ece6479e3..be3b4fb3ee0 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 9a2c0b8efaa..49355793b31 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From b8465de2b2105645a61d0ede1efe3e889f654d35 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 06:40:30 -0700 Subject: [PATCH 13/17] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/12e33f70aecc Author: BavarianTomcat Desc: Revert "Bug 1141356 - utils-xpc.js ls recursive skipped if pattern not matched" for bustage This reverts commit 90c096425861bdbd75e591624289b39e94592e9c. --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 2085f722e7a..08ae44febdf 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "6a0319dffe17792f2ad64371f32e0d6523c0bbb3", + "git_revision": "bc5bfa18f795919b56b952bbf3637c235d0e13dc", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "f03397b4794662971187fe001c11f233cfbe851d", + "revision": "12e33f70aeccca27a275b3fa172876a07b891fe8", "repo_path": "integration/gaia-central" } From 2be6790b5952d46209d277551f94c4c1c3591a2d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 7 May 2015 06:43:12 -0700 Subject: [PATCH 14/17] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f2542ffdcb6..d74ac3ef598 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index b8bbf2881b9..b2d65f65168 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index fba8d2dde5b..facc136bc02 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index a36eb59a3f0..de51559b5a4 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index acca2ac5cee..e438936f6b7 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index b8bbf2881b9..b2d65f65168 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 707fafbc99c..b7bcdbb0b19 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index eb6459de08b..6888e06d2cc 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index be3b4fb3ee0..04f9b4c1f62 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 49355793b31..b851228a9dd 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 7bc34d3788ef2be2ae5a328ce8a4b880b017f1f0 Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Mon, 4 May 2015 23:48:00 -0400 Subject: [PATCH 15/17] Bug 1126222 - Part 1: Provide callback in some functions in NetworkService. r=echen --- dom/system/gonk/NetworkService.js | 24 ++++++++++++++++-------- dom/system/gonk/nsINetworkService.idl | 14 +++++++++----- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/dom/system/gonk/NetworkService.js b/dom/system/gonk/NetworkService.js index 66e8390b445..08e8f49ba6b 100644 --- a/dom/system/gonk/NetworkService.js +++ b/dom/system/gonk/NetworkService.js @@ -368,13 +368,15 @@ NetworkService.prototype = { }); }, - resetRoutingTable: function(network) { + resetRoutingTable: function(network, callback) { let options = { cmd: "removeNetworkRoute", ifname: network.name }; - this.controlMessage(options); + this.controlMessage(options, function(result) { + callback.nativeCommandResult(!result.error); + }); }, setDNS: function(networkInterface, callback) { @@ -406,7 +408,7 @@ NetworkService.prototype = { }); }, - removeDefaultRoute: function(network) { + removeDefaultRoute: function(network, callback) { debug("Remove default route for " + network.name); let gateways = network.getGateways(); let options = { @@ -414,7 +416,9 @@ NetworkService.prototype = { ifname: network.name, gateways: gateways }; - this.controlMessage(options); + this.controlMessage(options, function(result) { + callback.nativeCommandResult(!result.error); + }); }, _routeToString: function(interfaceName, host, prefixLength, gateway) { @@ -487,7 +491,7 @@ NetworkService.prototype = { }); }, - addSecondaryRoute: function(ifname, route) { + addSecondaryRoute: function(ifname, route, callback) { debug("Going to add route to secondary table on " + ifname); let options = { cmd: "addSecondaryRoute", @@ -496,10 +500,12 @@ NetworkService.prototype = { prefix: route.prefix, gateway: route.gateway }; - this.controlMessage(options); + this.controlMessage(options, function(result) { + callback.nativeCommandResult(!result.error); + }); }, - removeSecondaryRoute: function(ifname, route) { + removeSecondaryRoute: function(ifname, route, callback) { debug("Going to remove route from secondary table on " + ifname); let options = { cmd: "removeSecondaryRoute", @@ -508,7 +514,9 @@ NetworkService.prototype = { prefix: route.prefix, gateway: route.gateway }; - this.controlMessage(options); + this.controlMessage(options, function(result) { + callback.nativeCommandResult(!result.error); + }); }, // Enable/Disable DHCP server. diff --git a/dom/system/gonk/nsINetworkService.idl b/dom/system/gonk/nsINetworkService.idl index 43d37f69fa9..45e157c9ca7 100644 --- a/dom/system/gonk/nsINetworkService.idl +++ b/dom/system/gonk/nsINetworkService.idl @@ -159,7 +159,7 @@ interface nsIDhcpRequestCallback : nsISupports /** * Provide network services. */ -[scriptable, uuid(2e030f00-8b74-4800-8add-5862ab183503)] +[scriptable, uuid(8216224c-a4e0-43fa-9662-3f2446b500c6)] interface nsINetworkService : nsISupports { const long MODIFY_ROUTE_ADD = 0; @@ -271,7 +271,8 @@ interface nsINetworkService : nsISupports * @param networkInterface * The network interface we want remove from the routing table. */ - void resetRoutingTable(in nsINetworkInterface networkInterface); + void resetRoutingTable(in nsINetworkInterface networkInterface, + in nsINativeCommandCallback callback); /** * Set DNS. @@ -305,7 +306,8 @@ interface nsINetworkService : nsISupports * @param networkInterface * The network interface we want remove from the default route. */ - void removeDefaultRoute(in nsINetworkInterface networkInterface); + void removeDefaultRoute(in nsINetworkInterface networkInterface, + in nsINativeCommandCallback callback); /** * Modify route. @@ -342,7 +344,8 @@ interface nsINetworkService : nsISupports * .prefix: destination prefix * .gateway: gateway ip address */ - void addSecondaryRoute(in DOMString interfaceName, in jsval route); + void addSecondaryRoute(in DOMString interfaceName, in jsval route, + in nsINativeCommandCallback callback); /** * Remove route from secondary routing table. @@ -355,7 +358,8 @@ interface nsINetworkService : nsISupports * .prefix: destination prefix * .gateway: gateway ip address */ - void removeSecondaryRoute(in DOMString interfaceName, in jsval route); + void removeSecondaryRoute(in DOMString interfaceName, in jsval route, + in nsINativeCommandCallback callback); /** * Enable or disable usb rndis. From 2ed08371fab48654e4b61fe7e6b4d3efcbcb8bee Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Thu, 7 May 2015 00:57:00 -0400 Subject: [PATCH 16/17] Bug 1126222 - Part 2: Use promise to ensure execution order in NetworkManager. r=echen --- dom/system/gonk/NetworkManager.js | 416 ++++++++++++++++++------- dom/system/gonk/RadioInterfaceLayer.js | 15 +- 2 files changed, 309 insertions(+), 122 deletions(-) diff --git a/dom/system/gonk/NetworkManager.js b/dom/system/gonk/NetworkManager.js index 4ae69ec3834..57e071e3c90 100644 --- a/dom/system/gonk/NetworkManager.js +++ b/dom/system/gonk/NetworkManager.js @@ -85,6 +85,46 @@ function defineLazyRegExp(obj, name, pattern) { }); } +function NetworkInterface(aNetwork) { + let ips = {}; + let prefixLengths = {}; + aNetwork.getAddresses(ips, prefixLengths); + + this.state = aNetwork.state; + this.type = aNetwork.type; + this.name = aNetwork.name; + this.ips = ips.value; + this.prefixLengths = prefixLengths.value; + this.gateways = aNetwork.getGateways(); + this.dnses = aNetwork.getDnses(); + this.httpProxyHost = aNetwork.httpProxyHost; + this.httpProxyPort = aNetwork.httpProxyPort; +} +NetworkInterface.prototype = { + QueryInterface: XPCOMUtils.generateQI([Ci.nsINetworkInterface]), + + getAddresses: function(aIps, aPrefixLengths) { + aIps.value = this.ips.slice(); + aPrefixLengths.value = this.prefixLengths.slice(); + + return this.ips.length; + }, + + getGateways: function(aCount) { + if (aCount) { + aCount.value = this.gateways.length; + } + return this.gateways.slice(); + }, + + getDnses: function(aCount) { + if (aCount) { + aCount.value = this.dnses.length; + } + return this.dnses.slice(); + } +}; + function NetworkInterfaceLinks() { this.resetLinks(); @@ -254,14 +294,19 @@ NetworkManager.prototype = { let ips = {}; let prefixLengths = {}; let length = network.getAddresses(ips, prefixLengths); + let promises = []; + for (let i = 0; i < length; i++) { debug('Adding subnet routes: ' + ips.value[i] + '/' + prefixLengths.value[i]); - gNetworkService.modifyRoute(Ci.nsINetworkService.MODIFY_ROUTE_ADD, - network.name, ips.value[i], prefixLengths.value[i]) - .catch((aError) => { + promises.push( + gNetworkService.modifyRoute(Ci.nsINetworkService.MODIFY_ROUTE_ADD, + network.name, ips.value[i], prefixLengths.value[i]) + .catch(aError => { debug("_addSubnetRoutes error: " + aError); - }); + })); } + + return Promise.all(promises); }, updateNetworkInterface: function(network) { @@ -277,46 +322,57 @@ NetworkManager.prototype = { debug("Network " + network.type + "/" + network.name + " changed state to " + network.state); + // Keep a copy of network in case it is modified while we are updating. + let networkInterface = new NetworkInterface(network); + // Note that since Lollipop we need to allocate and initialize // something through netd, so we add createNetwork/destroyNetwork // to deal with that explicitly. - switch (network.state) { + switch (networkInterface.state) { case Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED: - gNetworkService.createNetwork(network.name, () => { + this._createNetwork(networkInterface.name) // Remove pre-created default route and let setAndConfigureActive() // to set default route only on preferred network - gNetworkService.removeDefaultRoute(network); - + .then(() => this._removeDefaultRoute(networkInterface)) // Set DNS server as early as possible to prevent from // premature domain name lookup. - gNetworkService.setDNS(network, () => { + .then(() => this._setDNS(networkInterface)) + .then(() => { // Add host route for data calls - if (this.isNetworkTypeMobile(network.type)) { - let currentInterfaceLinks = this.networkInterfaceLinks[networkId]; - let newLinkRoutes = network.getDnses().concat(network.httpProxyHost); - // If gateways have changed, remove all old routes first. - this._handleGateways(networkId, network.getGateways()) - .then(() => this._updateRoutes(currentInterfaceLinks.linkRoutes, - newLinkRoutes, - network.getGateways(), network.name)) - .then(() => currentInterfaceLinks.setLinks(newLinkRoutes, - network.getGateways(), - network.name)); + if (!this.isNetworkTypeMobile(networkInterface.type)) { + return; } + let currentInterfaceLinks = this.networkInterfaceLinks[networkId]; + let newLinkRoutes = networkInterface.getDnses().concat( + networkInterface.httpProxyHost); + // If gateways have changed, remove all old routes first. + return this._handleGateways(networkId, networkInterface.getGateways()) + .then(() => this._updateRoutes(currentInterfaceLinks.linkRoutes, + newLinkRoutes, + networkInterface.getGateways(), + networkInterface.name)) + .then(() => currentInterfaceLinks.setLinks(newLinkRoutes, + networkInterface.getGateways(), + networkInterface.name)); + }) + .then(() => { + if (networkInterface.type != + Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN) { + return; + } // Dun type is a special case where we add the default route to a // secondary table. - if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN) { - this.setSecondaryDefaultRoute(network); - } - - this._addSubnetRoutes(network); - this.setAndConfigureActive(); - + return this.setSecondaryDefaultRoute(networkInterface); + }) + .then(() => this._addSubnetRoutes(networkInterface)) + .then(() => this.setAndConfigureActive()) + .then(() => { // Update data connection when Wifi connected/disconnected - if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_WIFI && this.mRil) { + if (networkInterface.type == + Ci.nsINetworkInterface.NETWORK_TYPE_WIFI && this.mRil) { for (let i = 0; i < this.mRil.numRadioInterfaces; i++) { this.mRil.getRadioInterface(i).updateRILNetworkInterface(); } @@ -325,53 +381,73 @@ NetworkManager.prototype = { // Probing the public network accessibility after routing table is ready CaptivePortalDetectionHelper .notify(CaptivePortalDetectionHelper.EVENT_CONNECT, this.active); - + }) + .then(() => { // Notify outer modules like MmsService to start the transaction after // the configuration of the network interface is done. Services.obs.notifyObservers(network, TOPIC_CONNECTION_STATE_CHANGED, this.convertConnectionType(network)); + }) + .catch(aError => { + debug("updateNetworkInterface error: " + aError); }); - }); - break; case Ci.nsINetworkInterface.NETWORK_STATE_DISCONNECTED: - // Remove host route for data calls - if (this.isNetworkTypeMobile(network.type)) { - this._cleanupAllHostRoutes(networkId); - } - // Remove secondary default route for dun. - if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN) { - this.removeSecondaryDefaultRoute(network); - } - // Remove routing table in /proc/net/route - if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_WIFI) { - gNetworkService.resetRoutingTable(network); - } else if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE) { - gNetworkService.removeDefaultRoute(network); - } - // Clear http proxy on active network. - if (this.active && network.type == this.active.type) { - this.clearNetworkProxy(); - } + Promise.resolve() + .then(() => { + if (!this.isNetworkTypeMobile(networkInterface.type)) { + return; + } + // Remove host route for data calls + return this._cleanupAllHostRoutes(networkId); + }) + .then(() => { + if (networkInterface.type != + Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN) { + return; + } + // Remove secondary default route for dun. + return this.removeSecondaryDefaultRoute(networkInterface); + }) + .then(() => { + if (networkInterface.type == Ci.nsINetworkInterface.NETWORK_TYPE_WIFI) { + // Remove routing table in /proc/net/route + return this._resetRoutingTable(networkInterface); + } + if (networkInterface.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE) { + return this._removeDefaultRoute(networkInterface) + } + }) + .then(() => { + // Clear http proxy on active network. + if (this.active && networkInterface.type == this.active.type) { + this.clearNetworkProxy(); + } - // Abort ongoing captive portal detection on the wifi interface - CaptivePortalDetectionHelper - .notify(CaptivePortalDetectionHelper.EVENT_DISCONNECT, network); - this.setAndConfigureActive(); - - // Update data connection when Wifi connected/disconnected - if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_WIFI && this.mRil) { - for (let i = 0; i < this.mRil.numRadioInterfaces; i++) { - this.mRil.getRadioInterface(i).updateRILNetworkInterface(); - } - } - - gNetworkService.destroyNetwork(network.name, () => { - // Notify outer modules like MmsService to start the transaction after - // the configuration of the network interface is done. - Services.obs.notifyObservers(network, TOPIC_CONNECTION_STATE_CHANGED, - this.convertConnectionType(network)); - }); + // Abort ongoing captive portal detection on the wifi interface + CaptivePortalDetectionHelper + .notify(CaptivePortalDetectionHelper.EVENT_DISCONNECT, networkInterface); + }) + .then(() => this.setAndConfigureActive()) + .then(() => { + // Update data connection when Wifi connected/disconnected + if (networkInterface.type == + Ci.nsINetworkInterface.NETWORK_TYPE_WIFI && this.mRil) { + for (let i = 0; i < this.mRil.numRadioInterfaces; i++) { + this.mRil.getRadioInterface(i).updateRILNetworkInterface(); + } + } + }) + .then(() => this._destroyNetwork(networkInterface.name)) + .then(() => { + // Notify outer modules like MmsService to start the transaction after + // the configuration of the network interface is done. + Services.obs.notifyObservers(network, TOPIC_CONNECTION_STATE_CHANGED, + this.convertConnectionType(network)); + }) + .catch(aError => { + debug("updateNetworkInterface error: " + aError); + }); break; } }, @@ -599,45 +675,86 @@ NetworkManager.prototype = { return null; }, + _setSecondaryRoute: function(aDoAdd, aInterfaceName, aRoute) { + return new Promise((aResolve, aReject) => { + if (aDoAdd) { + gNetworkService.addSecondaryRoute(aInterfaceName, aRoute, + (aSuccess) => { + if (!aSuccess) { + aReject("addSecondaryRoute failed"); + return; + } + aResolve(); + }); + } else { + gNetworkService.removeSecondaryRoute(aInterfaceName, aRoute, + (aSuccess) => { + if (!aSuccess) { + debug("removeSecondaryRoute failed") + } + // Always resolve. + aResolve(); + }); + } + }); + }, + setSecondaryDefaultRoute: function(network) { let gateways = network.getGateways(); + let promises = []; + for (let i = 0; i < gateways.length; i++) { let isIPv6 = (gateways[i].indexOf(":") != -1) ? true : false; // First, we need to add a host route to the gateway in the secondary // routing table to make the gateway reachable. Host route takes the max // prefix and gateway address 'any'. - let route = { + let hostRoute = { ip: gateways[i], prefix: isIPv6 ? IPV6_MAX_PREFIX_LENGTH : IPV4_MAX_PREFIX_LENGTH, gateway: isIPv6 ? IPV6_ADDRESS_ANY : IPV4_ADDRESS_ANY }; - gNetworkService.addSecondaryRoute(network.name, route); // Now we can add the default route through gateway. Default route takes the // min prefix and destination ip 'any'. - route.ip = isIPv6 ? IPV6_ADDRESS_ANY : IPV4_ADDRESS_ANY; - route.prefix = 0; - route.gateway = gateways[i]; - gNetworkService.addSecondaryRoute(network.name, route); - } - }, - - removeSecondaryDefaultRoute: function(network) { - let gateways = network.getGateways(); - for (let i = 0; i < gateways.length; i++) { - let isIPv6 = (gateways[i].indexOf(":") != -1) ? true : false; - // Remove both default route and host route. - let route = { + let defaultRoute = { ip: isIPv6 ? IPV6_ADDRESS_ANY : IPV4_ADDRESS_ANY, prefix: 0, gateway: gateways[i] }; - gNetworkService.removeSecondaryRoute(network.name, route); - route.ip = gateways[i]; - route.prefix = isIPv6 ? IPV6_MAX_PREFIX_LENGTH : IPV4_MAX_PREFIX_LENGTH; - route.gateway = isIPv6 ? IPV6_ADDRESS_ANY : IPV4_ADDRESS_ANY; - gNetworkService.removeSecondaryRoute(network.name, route); + let promise = this._setSecondaryRoute(true, network.name, hostRoute) + .then(() => this._setSecondaryRoute(true, network.name, defaultRoute)); + + promises.push(promise); } + + return Promise.all(promises); + }, + + removeSecondaryDefaultRoute: function(network) { + let gateways = network.getGateways(); + let promises = []; + + for (let i = 0; i < gateways.length; i++) { + let isIPv6 = (gateways[i].indexOf(":") != -1) ? true : false; + // Remove both default route and host route. + let defaultRoute = { + ip: isIPv6 ? IPV6_ADDRESS_ANY : IPV4_ADDRESS_ANY, + prefix: 0, + gateway: gateways[i] + }; + let hostRoute = { + ip: gateways[i], + prefix: isIPv6 ? IPV6_MAX_PREFIX_LENGTH : IPV4_MAX_PREFIX_LENGTH, + gateway: isIPv6 ? IPV6_ADDRESS_ANY : IPV4_ADDRESS_ANY + }; + + let promise = this._setSecondaryRoute(false, network.name, defaultRoute) + .then(() => this._setSecondaryRoute(false, network.name, hostRoute)); + + promises.push(promise); + } + + return Promise.all(promises); }, /** @@ -664,8 +781,7 @@ NetworkManager.prototype = { this.active.state == Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED && this.active.type == this._preferredNetworkType) { debug("Active network is already our preferred type."); - this._setDefaultRouteAndProxy(this.active, oldActive); - return; + return this._setDefaultRouteAndProxy(this.active, oldActive); } // Find a suitable network interface to activate. @@ -688,28 +804,33 @@ NetworkManager.prototype = { } } - if (this.active) { - // Give higher priority to default data APN than secondary APN. - // If default data APN is not connected, we still set default route - // and DNS on secondary APN. - if (defaultDataNetwork && - this.isNetworkTypeSecondaryMobile(this.active.type) && - this.active.type != this.preferredNetworkType) { - this.active = defaultDataNetwork; - } - // Don't set default route on secondary APN - if (!this.isNetworkTypeSecondaryMobile(this.active.type)) { - this._setDefaultRouteAndProxy(this.active, oldActive); - } + // Give higher priority to default data APN than secondary APN. + // If default data APN is not connected, we still set default route + // and DNS on secondary APN. + if (this.active && defaultDataNetwork && + this.isNetworkTypeSecondaryMobile(this.active.type) && + this.active.type != this.preferredNetworkType) { + this.active = defaultDataNetwork; } - if (this.active != oldActive) { - Services.obs.notifyObservers(this.active, TOPIC_ACTIVE_CHANGED, null); - } + return Promise.resolve() + .then(() => { + // Don't set default route on secondary APN + if (!this.active || this.isNetworkTypeSecondaryMobile(this.active.type)) { + return Promise.resolve(); + } - if (this._manageOfflineStatus) { - Services.io.offline = !this.active; - } + return this._setDefaultRouteAndProxy(this.active, oldActive); + }) + .then(() => { + if (this.active != oldActive) { + Services.obs.notifyObservers(this.active, TOPIC_ACTIVE_CHANGED, null); + } + + if (this._manageOfflineStatus) { + Services.io.offline = !this.active; + } + }); }, resolveHostname: function(network, hostname) { @@ -788,13 +909,78 @@ NetworkManager.prototype = { } }, - _setDefaultRouteAndProxy: function(network, oldInterface) { - gNetworkService.setDefaultRoute(network, oldInterface, (success) => { - if (!success) { - gNetworkService.destroyNetwork(network, function() {}); - return; - } - this.setNetworkProxy(network); + _setDNS: function(aNetwork) { + return new Promise((aResolve, aReject) => { + gNetworkService.setDNS(aNetwork, (aError) => { + if (aError) { + aReject("setDNS failed"); + return; + } + aResolve(); + }); + }); + }, + + _createNetwork: function(aInterfaceName) { + return new Promise((aResolve, aReject) => { + gNetworkService.createNetwork(aInterfaceName, (aSuccess) => { + if (!aSuccess) { + aReject("createNetwork failed"); + return; + } + aResolve(); + }); + }); + }, + + _destroyNetwork: function(aInterfaceName) { + return new Promise((aResolve, aReject) => { + gNetworkService.destroyNetwork(aInterfaceName, (aSuccess) => { + if (!aSuccess) { + debug("destroyNetwork failed") + } + // Always resolve. + aResolve(); + }); + }); + }, + + _resetRoutingTable: function(aNetwork) { + return new Promise((aResolve, aReject) => { + gNetworkService.resetRoutingTable(aNetwork, (aSuccess) => { + if (!aSuccess) { + debug("resetRoutingTable failed"); + } + // Always resolve. + aResolve(); + }); + }); + }, + + _removeDefaultRoute: function(aNetwork) { + return new Promise((aResolve, aReject) => { + gNetworkService.removeDefaultRoute(aNetwork, (aSuccess) => { + if (!aSuccess) { + debug("removeDefaultRoute failed"); + } + // Always resolve. + aResolve(); + }); + }); + }, + + _setDefaultRouteAndProxy: function(aNetwork, aOldInterface) { + return new Promise((aResolve, aReject) => { + gNetworkService.setDefaultRoute(aNetwork, aOldInterface, (aSuccess) => { + if (!aSuccess) { + gNetworkService.destroyNetwork(aNetwork, function() { + aReject("setDefaultRoute failed"); + }); + return; + } + this.setNetworkProxy(aNetwork); + aResolve(); + }); }); }, diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index 5d03c4115b3..ee3883c051f 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -2703,13 +2703,13 @@ DataCall.prototype = { if (this.state == RIL.GECKO_NETWORK_STATE_CONNECTED) { // This needs to run asynchronously, to behave the same way as the case of // non-shared apn, see bug 1059110. - Services.tm.currentThread.dispatch(function(state) { + Services.tm.currentThread.dispatch(() => { // Do not notify if state changed while this event was being dispatched, // the state probably was notified already or need not to be notified. - if (networkInterface.state == state) { + if (networkInterface.state == RIL.GECKO_NETWORK_STATE_CONNECTED) { networkInterface.notifyRILNetworkInterface(); } - }.bind(null, RIL.GECKO_NETWORK_STATE_CONNECTED), Ci.nsIEventTarget.DISPATCH_NORMAL); + }, Ci.nsIEventTarget.DISPATCH_NORMAL); return; } @@ -2829,13 +2829,15 @@ DataCall.prototype = { // Notify the DISCONNECTED event immediately after network interface is // removed from requestedNetworkIfaces, to make the DataCall, shared or // not, to have the same behavior. - Services.tm.currentThread.dispatch(function(state) { + Services.tm.currentThread.dispatch(() => { // Do not notify if state changed while this event was being dispatched, // the state probably was notified already or need not to be notified. - if (networkInterface.state == state) { + if (networkInterface.state == RIL.GECKO_NETWORK_STATE_DISCONNECTED) { networkInterface.notifyRILNetworkInterface(); + // Clear link info after notifying NetworkManager. + this.resetLinkInfo(); } - }.bind(null, RIL.GECKO_NETWORK_STATE_DISCONNECTED), Ci.nsIEventTarget.DISPATCH_NORMAL); + }, Ci.nsIEventTarget.DISPATCH_NORMAL); } // Only deactivate data call if no more network interface needs this @@ -2861,7 +2863,6 @@ DataCall.prototype = { }, this.onDeactivateDataCallResult.bind(this)); this.state = RIL.GECKO_NETWORK_STATE_DISCONNECTING; - this.resetLinkInfo(); }, // Entry method for timer events. Used to reconnect to a failed APN From 0e371ab475c100aec2ed087c332f6ace97a64def Mon Sep 17 00:00:00 2001 From: Henry Chang Date: Thu, 30 Apr 2015 14:38:26 +0800 Subject: [PATCH 17/17] Bug 1138288 - Refactor nsWindow/nsScreen for multiple screen/window case. r=mwu --- widget/gonk/nsScreenManagerGonk.h | 31 ++++- widget/gonk/nsWindow.cpp | 222 ++++++++++++++++++++++-------- 2 files changed, 189 insertions(+), 64 deletions(-) diff --git a/widget/gonk/nsScreenManagerGonk.h b/widget/gonk/nsScreenManagerGonk.h index 2a7e30e9eaf..9558a168a4f 100644 --- a/widget/gonk/nsScreenManagerGonk.h +++ b/widget/gonk/nsScreenManagerGonk.h @@ -31,7 +31,8 @@ class nsScreenGonk : public nsBaseScreen typedef mozilla::hal::ScreenConfiguration ScreenConfiguration; public: - nsScreenGonk(); + nsScreenGonk(uint32_t aId, ANativeWindow* aNativeWindow); + ~nsScreenGonk(); NS_IMETHOD GetId(uint32_t* aId); @@ -42,9 +43,14 @@ public: NS_IMETHOD GetRotation(uint32_t* aRotation); NS_IMETHOD SetRotation(uint32_t aRotation); + uint32_t GetId(); + nsIntRect GetRect(); + float GetDpi(); + ANativeWindow* GetNativeWindow(); nsIntRect GetNaturalBounds(); uint32_t EffectiveScreenRotation(); ScreenConfiguration GetConfiguration(); + bool IsPrimaryScreen(); void RegisterWindow(nsWindow* aWindow); void UnregisterWindow(nsWindow* aWindow); @@ -56,8 +62,12 @@ public: } protected: - nsIntRect mScreenBounds; - nsIntRect mVirtualBounds; + uint32_t mId; + int32_t mColorDepth; + android::sp mNativeWindow; + float mDpi; + nsIntRect mNaturalBounds; // Screen bounds w/o rotation taken into account. + nsIntRect mVirtualBounds; // Screen bounds w/ rotation taken into account. uint32_t mScreenRotation; uint32_t mPhysicalScreenRotation; nsTArray mTopWindows; @@ -65,6 +75,15 @@ protected: class nsScreenManagerGonk final : public nsIScreenManager { +public: + enum { + // TODO: Bug 1138287 will define more screen/display types. + PRIMARY_SCREEN_TYPE = 0, + + // TODO: Maintain a mapping from type to id dynamically. + PRIMARY_SCREEN_ID = 0, + }; + public: nsScreenManagerGonk(); @@ -77,12 +96,16 @@ public: void Initialize(); void DisplayEnabled(bool aEnabled); + void AddScreen(uint32_t aDisplayType); + void RemoveScreen(uint32_t aDisplayType); + protected: ~nsScreenManagerGonk(); void VsyncControl(bool aEnabled); + uint32_t GetIdFromType(uint32_t aDisplayType); bool mInitialized; - nsCOMPtr mOneScreen; + nsTArray> mScreens; nsRefPtr mScreenOnEvent; nsRefPtr mScreenOffEvent; }; diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index 95b40c57433..db3c17b2d62 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -134,7 +134,6 @@ nsWindow::nsWindow() nsRefPtr screenManager = nsScreenManagerGonk::GetInstance(); screenManager->Initialize(); - mScreen = nsScreenManagerGonk::GetPrimaryScreen(); // This is a hack to force initialization of the compositor // resources, if we're going to use omtc. @@ -150,7 +149,9 @@ nsWindow::nsWindow() nsWindow::~nsWindow() { - HwcComposer2D::GetInstance()->SetCompositorParent(nullptr); + if (mScreen->IsPrimaryScreen()) { + HwcComposer2D::GetInstance()->SetCompositorParent(nullptr); + } } void @@ -397,11 +398,17 @@ nsWindow::Create(nsIWidget *aParent, const nsIntRect &aRect, nsWidgetInitData *aInitData) { - nsIntRect virtualBounds; - mScreen->GetRect(&virtualBounds.x, &virtualBounds.y, - &virtualBounds.width, &virtualBounds.height); - BaseCreate(aParent, IS_TOPLEVEL() ? virtualBounds : aRect, - aInitData); + BaseCreate(aParent, aRect, aInitData); + + nsCOMPtr screen; + + uint32_t screenId = aParent ? ((nsWindow*)aParent)->mScreen->GetId() : + aInitData->mScreenId; + + nsRefPtr screenManager = nsScreenManagerGonk::GetInstance(); + screenManager->ScreenForId(screenId, getter_AddRefs(screen)); + + mScreen = static_cast(screen.get()); mBounds = aRect; @@ -409,7 +416,7 @@ nsWindow::Create(nsIWidget *aParent, mVisible = false; if (!aParent) { - mBounds = virtualBounds; + mBounds = mScreen->GetRect(); } if (!IS_TOPLEVEL()) { @@ -418,7 +425,8 @@ nsWindow::Create(nsIWidget *aParent, mScreen->RegisterWindow(this); - Resize(0, 0, virtualBounds.width, virtualBounds.height, false); + Resize(0, 0, mBounds.width, mBounds.height, false); + return NS_OK; } @@ -511,10 +519,7 @@ nsWindow::Resize(double aX, } if (aRepaint) { - nsIntRect virtualBounds; - mScreen->GetRect(&virtualBounds.x, &virtualBounds.y, - &virtualBounds.width, &virtualBounds.height); - Invalidate(virtualBounds); + Invalidate(mBounds); } return NS_OK; @@ -538,7 +543,12 @@ nsWindow::SetFocus(bool aRaise) if (aRaise) { BringToTop(); } - gFocusedWindow = this; + + if (!IS_TOPLEVEL() && mScreen->IsPrimaryScreen()) { + // We should only set focused window on non-toplevel primary window. + gFocusedWindow = this; + } + return NS_OK; } @@ -587,7 +597,7 @@ nsWindow::GetNativeData(uint32_t aDataType) switch (aDataType) { case NS_NATIVE_WINDOW: // Called before primary display's EGLSurface creation. - return GetGonkDisplay()->GetNativeWindow(); + return mScreen->GetNativeWindow(); } return nullptr; } @@ -748,7 +758,7 @@ nsWindow::EndRemoteDrawing() float nsWindow::GetDPI() { - return GetGonkDisplay()->xdpi; + return mScreen->GetDpi(); } double @@ -803,7 +813,7 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, } CreateCompositor(); - if (mCompositorParent) { + if (mCompositorParent && mScreen->IsPrimaryScreen()) { HwcComposer2D::GetInstance()->SetCompositorParent(mCompositorParent); } MOZ_ASSERT(mLayerManager); @@ -826,10 +836,7 @@ nsWindow::BringToTop() mWidgetListener->WindowActivated(); } - nsIntRect virtualBounds; - mScreen->GetRect(&virtualBounds.x, &virtualBounds.y, - &virtualBounds.width, &virtualBounds.height); - Invalidate(virtualBounds); + Invalidate(mBounds); } void @@ -874,42 +881,75 @@ nsWindow::NeedsPaint() Composer2D* nsWindow::GetComposer2D() { + if (!mScreen->IsPrimaryScreen()) { + return nullptr; + } + return HwcComposer2D::GetInstance(); } +static uint32_t +SurfaceFormatToColorDepth(int32_t aSurfaceFormat) +{ + switch (aSurfaceFormat) { + case GGL_PIXEL_FORMAT_RGB_565: + return 16; + case GGL_PIXEL_FORMAT_RGBA_8888: + return 32; + } + return 24; // GGL_PIXEL_FORMAT_RGBX_8888 +} + // nsScreenGonk.cpp -nsScreenGonk::nsScreenGonk() - : mScreenRotation(nsIScreen::ROTATION_0_DEG) +nsScreenGonk::nsScreenGonk(uint32_t aId, ANativeWindow* aNativeWindow) + : mId(aId) + , mNativeWindow(aNativeWindow) + , mScreenRotation(nsIScreen::ROTATION_0_DEG) , mPhysicalScreenRotation(nsIScreen::ROTATION_0_DEG) { - nsIntSize screenSize; - - ANativeWindow *win = GetGonkDisplay()->GetNativeWindow(); - if (win->query(win, NATIVE_WINDOW_WIDTH, &screenSize.width) || - win->query(win, NATIVE_WINDOW_HEIGHT, &screenSize.height)) { + int surfaceFormat; + if (mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_WIDTH, &mVirtualBounds.width) || + mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_HEIGHT, &mVirtualBounds.height) || + mNativeWindow->query(mNativeWindow.get(), NATIVE_WINDOW_FORMAT, &surfaceFormat)) { NS_RUNTIMEABORT("Failed to get native window size, aborting..."); } - mScreenBounds = gfx::IntRect(gfx::IntPoint(0, 0), screenSize); - char propValue[PROPERTY_VALUE_MAX]; - property_get("ro.sf.hwrotation", propValue, "0"); - mPhysicalScreenRotation = atoi(propValue) / 90; + mNaturalBounds = mVirtualBounds; - mVirtualBounds = mScreenBounds; + if (IsPrimaryScreen()) { + char propValue[PROPERTY_VALUE_MAX]; + property_get("ro.sf.hwrotation", propValue, "0"); + mPhysicalScreenRotation = atoi(propValue) / 90; + } + + mDpi = GetGonkDisplay()->xdpi; + mColorDepth = SurfaceFormatToColorDepth(surfaceFormat); } nsScreenGonk::~nsScreenGonk() { } +bool +nsScreenGonk::IsPrimaryScreen() +{ + return nsScreenManagerGonk::PRIMARY_SCREEN_ID == mId; +} + NS_IMETHODIMP nsScreenGonk::GetId(uint32_t *outId) { - *outId = 1; + *outId = mId; return NS_OK; } +uint32_t +nsScreenGonk::GetId() +{ + return mId; +} + NS_IMETHODIMP nsScreenGonk::GetRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, int32_t *outHeight) @@ -923,6 +963,12 @@ nsScreenGonk::GetRect(int32_t *outLeft, int32_t *outTop, return NS_OK; } +nsIntRect +nsScreenGonk::GetRect() +{ + return mVirtualBounds; +} + NS_IMETHODIMP nsScreenGonk::GetAvailRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, int32_t *outHeight) @@ -930,31 +976,20 @@ nsScreenGonk::GetAvailRect(int32_t *outLeft, int32_t *outTop, return GetRect(outLeft, outTop, outWidth, outHeight); } -static uint32_t -ColorDepth() -{ - switch (GetGonkDisplay()->surfaceformat) { - case GGL_PIXEL_FORMAT_RGB_565: - return 16; - case GGL_PIXEL_FORMAT_RGBA_8888: - return 32; - } - return 24; // GGL_PIXEL_FORMAT_RGBX_8888 -} - NS_IMETHODIMP nsScreenGonk::GetPixelDepth(int32_t *aPixelDepth) { // XXX: this should actually return 32 when we're using 24-bit // color, because we use RGBX. - *aPixelDepth = ColorDepth(); + *aPixelDepth = mColorDepth; return NS_OK; } NS_IMETHODIMP nsScreenGonk::GetColorDepth(int32_t *aColorDepth) { - return GetPixelDepth(aColorDepth); + *aColorDepth = mColorDepth; + return NS_OK; } NS_IMETHODIMP @@ -964,6 +999,18 @@ nsScreenGonk::GetRotation(uint32_t* aRotation) return NS_OK; } +float +nsScreenGonk::GetDpi() +{ + return mDpi; +} + +ANativeWindow* +nsScreenGonk::GetNativeWindow() +{ + return mNativeWindow.get(); +} + NS_IMETHODIMP nsScreenGonk::SetRotation(uint32_t aRotation) { @@ -980,10 +1027,10 @@ nsScreenGonk::SetRotation(uint32_t aRotation) if (rotation == nsIScreen::ROTATION_90_DEG || rotation == nsIScreen::ROTATION_270_DEG) { mVirtualBounds = nsIntRect(0, 0, - mScreenBounds.height, - mScreenBounds.width); + mNaturalBounds.height, + mNaturalBounds.width); } else { - mVirtualBounds = mScreenBounds; + mVirtualBounds = mNaturalBounds; } nsAppShell::NotifyScreenRotation(); @@ -1000,7 +1047,7 @@ nsScreenGonk::SetRotation(uint32_t aRotation) nsIntRect nsScreenGonk::GetNaturalBounds() { - return mScreenBounds; + return mNaturalBounds; } uint32_t @@ -1039,12 +1086,12 @@ ScreenConfiguration nsScreenGonk::GetConfiguration() { ScreenOrientation orientation = ComputeOrientation(mScreenRotation, - mScreenBounds.Size()); - uint32_t colorDepth = ColorDepth(); + mNaturalBounds.Size()); + // NB: perpetuating colorDepth == pixelDepth illusion here, for // consistency. return ScreenConfiguration(mVirtualBounds, orientation, - colorDepth, colorDepth); + mColorDepth, mColorDepth); } void @@ -1071,7 +1118,6 @@ NS_IMPL_ISUPPORTS(nsScreenManagerGonk, nsIScreenManager) nsScreenManagerGonk::nsScreenManagerGonk() : mInitialized(false) { - mOneScreen = new nsScreenGonk(); } nsScreenManagerGonk::~nsScreenManagerGonk() @@ -1110,6 +1156,8 @@ nsScreenManagerGonk::Initialize() mScreenOffEvent = new ScreenOnOffEvent(false); GetGonkDisplay()->OnEnabled(displayEnabledCallback); + AddScreen(PRIMARY_SCREEN_TYPE); + nsAppShell::NotifyScreenInitialized(); mInitialized = true; } @@ -1127,7 +1175,7 @@ nsScreenManagerGonk::DisplayEnabled(bool aEnabled) NS_IMETHODIMP nsScreenManagerGonk::GetPrimaryScreen(nsIScreen **outScreen) { - NS_IF_ADDREF(*outScreen = mOneScreen.get()); + NS_IF_ADDREF(*outScreen = mScreens[0].get()); return NS_OK; } @@ -1135,7 +1183,15 @@ NS_IMETHODIMP nsScreenManagerGonk::ScreenForId(uint32_t aId, nsIScreen **outScreen) { - return GetPrimaryScreen(outScreen); + for (size_t i = 0; i < mScreens.Length(); i++) { + if (mScreens[i]->GetId() == aId) { + NS_IF_ADDREF(*outScreen = mScreens[i].get()); + return NS_OK; + } + } + + *outScreen = nullptr; + return NS_OK; } NS_IMETHODIMP @@ -1145,19 +1201,29 @@ nsScreenManagerGonk::ScreenForRect(int32_t inLeft, int32_t inHeight, nsIScreen **outScreen) { + // Since all screens have independent coordinate system, we could + // only return the primary screen no matter what rect is given. return GetPrimaryScreen(outScreen); } NS_IMETHODIMP nsScreenManagerGonk::ScreenForNativeWidget(void *aWidget, nsIScreen **outScreen) { - return GetPrimaryScreen(outScreen); + for (size_t i = 0; i < mScreens.Length(); i++) { + if (aWidget == mScreens[i]->GetNativeWindow()) { + NS_IF_ADDREF(*outScreen = mScreens[i].get()); + return NS_OK; + } + } + + *outScreen = nullptr; + return NS_OK; } NS_IMETHODIMP nsScreenManagerGonk::GetNumberOfScreens(uint32_t *aNumberOfScreens) { - *aNumberOfScreens = 1; + *aNumberOfScreens = mScreens.Length(); return NS_OK; } @@ -1189,3 +1255,39 @@ nsScreenManagerGonk::VsyncControl(bool aEnabled) display.DisableVsync(); } } + +uint32_t +nsScreenManagerGonk::GetIdFromType(uint32_t aDisplayType) +{ + // This is the only place where we make the assumption that + // display type is equivalent to screen id. + + // Bug 1138287 will address the conversion from type to id. + return aDisplayType; +} + +void +nsScreenManagerGonk::AddScreen(uint32_t aDisplayType) +{ + // We currently only support adding primary screen. + MOZ_ASSERT(PRIMARY_SCREEN_TYPE == aDisplayType); + + uint32_t id = GetIdFromType(aDisplayType); + + ANativeWindow* win = GetGonkDisplay()->GetNativeWindow(); + nsScreenGonk* screen = new nsScreenGonk(id, win); + + mScreens.AppendElement(screen); +} + +void +nsScreenManagerGonk::RemoveScreen(uint32_t aDisplayType) +{ + uint32_t screenId = GetIdFromType(aDisplayType); + for (size_t i = 0; i < mScreens.Length(); i++) { + if (mScreens[i]->GetId() == screenId) { + mScreens.RemoveElementAt(i); + break; + } + } +}