This commit is contained in:
Ryan VanderMeulen 2015-09-01 15:20:21 -04:00
Родитель 8e10092b79 0aee05ed9c
Коммит ce13fdac84
20 изменённых файлов: 135 добавлений и 19 удалений

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e935894ef5f27e2f04b9e929a45a958e6288a223">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e935894ef5f27e2f04b9e929a45a958e6288a223">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="51ebaf824cc634665c5efcae95b8301ad1758c5e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b4f6fd4afd03161f53c7d2a663750f94762bd238"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e935894ef5f27e2f04b9e929a45a958e6288a223">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="05a36844c1046a1eb07d5b1325f85ed741f961ea">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e935894ef5f27e2f04b9e929a45a958e6288a223">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "805025801a68f9ddbba6ffd2ed3926c97fa7fcc8",
"git_revision": "c2582f4be03cd12124b96a263c8d14c774f0ffe4",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "fb284fae468b639c8dbfd33ad2395c8397c090ec",
"revision": "a330673cd99b4f50094fb7dd14000efdb9cf81b4",
"repo_path": "integration/gaia-central"
}

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="51ebaf824cc634665c5efcae95b8301ad1758c5e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b4f6fd4afd03161f53c7d2a663750f94762bd238"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="05a36844c1046a1eb07d5b1325f85ed741f961ea">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="805025801a68f9ddbba6ffd2ed3926c97fa7fcc8"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="c2582f4be03cd12124b96a263c8d14c774f0ffe4"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9e2923fd6cab93cf88b4b9ada82225e44fe6635"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -6,6 +6,7 @@ ANDROID_MANIFEST_FILE := src/main/AndroidManifest.xml
JAVAFILES := \
src/main/java/org/mozilla/b2gdroid/Launcher.java \
src/main/java/org/mozilla/b2gdroid/ScreenStateObserver.java \
$(NULL)
# The GeckoView consuming APK depends on the GeckoView JAR files. There are two

Просмотреть файл

@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.b2gdroid;
import java.io.ByteArrayOutputStream;
@ -7,7 +11,6 @@ import android.app.Activity;
import android.app.ActivityManager;
import android.app.KeyguardManager;
import android.app.KeyguardManager.KeyguardLock;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@ -41,11 +44,14 @@ import org.mozilla.gecko.GeckoThread;
import org.mozilla.gecko.IntentHelper;
import org.mozilla.gecko.util.GeckoEventListener;
import org.mozilla.b2gdroid.ScreenStateObserver;
public class Launcher extends Activity
implements GeckoEventListener, ContextGetter {
private static final String LOGTAG = "B2G";
private ContactService mContactService;
private ContactService mContactService;
private ScreenStateObserver mScreenStateObserver;
/** ContextGetter */
public Context getContext() {
@ -80,6 +86,7 @@ public class Launcher extends Activity
super.onCreate(savedInstanceState);
IntentHelper.init(this);
mScreenStateObserver = new ScreenStateObserver(this);
// Disable the default lockscreen.
KeyguardManager keyguardManager = (KeyguardManager)getSystemService(KEYGUARD_SERVICE);
@ -109,6 +116,7 @@ public class Launcher extends Activity
Log.w(LOGTAG, "onDestroy");
super.onDestroy();
IntentHelper.destroy();
mScreenStateObserver = null;
EventDispatcher.getInstance().unregisterGeckoThreadListener(this,
"Launcher:Ready");

Просмотреть файл

@ -0,0 +1,52 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.b2gdroid;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;
import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;
import org.mozilla.gecko.GeckoAppShell;
import org.mozilla.gecko.GeckoEvent;
class ScreenStateObserver extends BroadcastReceiver {
private static final String LOGTAG = "B2G";
ScreenStateObserver(Context context) {
Log.d(LOGTAG, "ScreenStateObserver constructor");
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_ON);
filter.addAction(Intent.ACTION_SCREEN_OFF);
context.registerReceiver(this, filter);
}
@Override
public void onReceive(Context context, Intent intent) {
Log.d(LOGTAG, "ScreenStateObserver: " + intent.getAction());
String action = "no_op";
switch(intent.getAction()) {
case "android.intent.action.SCREEN_ON":
action = "screen_on";
break;
case "android.intent.action.SCREEN_OFF":
action = "screen_off";
break;
}
JSONObject obj = new JSONObject();
try {
obj.put("action", action);
} catch(JSONException ex) {
Log.wtf(LOGTAG, "Error building Android:Launcher message", ex);
}
GeckoEvent e = GeckoEvent.createBroadcastEvent("Android:Launcher", obj.toString());
GeckoAppShell.sendEventToGecko(e);
}
}

Просмотреть файл

@ -0,0 +1,50 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
this.EXPORTED_SYMBOLS = ["MessagesBridge"];
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/SystemAppProxy.jsm");
// This module receives messages from Launcher.java as observer notifications.
function debug() {
dump("-*- MessagesBridge " + Array.slice(arguments) + "\n");
}
this.MessagesBridge = {
init: function() {
Services.obs.addObserver(this, "Android:Launcher", false);
Services.obs.addObserver(this, "xpcom-shutdown", false);
},
observe: function(aSubject, aTopic, aData) {
if (aTopic == "xpcom-shutdown") {
Services.obs.removeObserver(this, "Android:Launcher");
Services.obs.removeObserver(this, "xpcom-shutdown");
}
if (aTopic != "Android:Launcher") {
return;
}
let data = JSON.parse(aData);
debug(`Got Android:Launcher message ${data.action}`);
switch (data.action) {
case "screen_on":
case "screen_off":
// In both cases, make it look like pressing the power button
// by dispatching keydown & keyup on the system app window.
let window = SystemAppProxy.getFrame().contentWindow;
window.dispatchEvent(new window.KeyboardEvent("keydown", { key: "Power" }));
window.dispatchEvent(new window.KeyboardEvent("keyup", { key: "Power" }));
break;
}
}
}
this.MessagesBridge.init();

Просмотреть файл

@ -10,6 +10,7 @@ let Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/MessagesBridge.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
"resource://gre/modules/FileUtils.jsm");

Просмотреть файл

@ -1,4 +1,4 @@
# Setup.js
component {8bc88ef2-3aab-4e94-a40c-e2c80added2c} Setup.js
contract @mozilla.org/b2g/b2gdroid-setup;1 {8bc88ef2-3aab-4e94-a40c-e2c80added2c}
category profile-after-change B2GDroidSetup @mozilla.org/b2g/b2gdroid-setup;1
component {8bc88ef2-3aab-4e94-a40c-e2c80added2c} Setup.js process=main
contract @mozilla.org/b2g/b2gdroid-setup;1 {8bc88ef2-3aab-4e94-a40c-e2c80added2c} process=main
category profile-after-change B2GDroidSetup @mozilla.org/b2g/b2gdroid-setup;1 process=main

Просмотреть файл

@ -6,3 +6,7 @@ EXTRA_COMPONENTS += [
'b2gdroid.manifest',
'Setup.js',
]
EXTRA_JS_MODULES += [
'MessagesBridge.jsm',
]

Просмотреть файл

@ -1,4 +1,4 @@
FROM taskcluster/builder:0.5.7
FROM taskcluster/builder:0.5.8
MAINTAINER Wander Lairson Costa <wcosta@mozilla.com>
ENV SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE /home/worker/socorro.token

Просмотреть файл

@ -1 +1 @@
0.0.18
0.0.19