mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
bug 620811 - Crash on restarting fennec r=mwu a=stuart
This commit is contained in:
parent
11c968fbab
commit
539605e644
@ -89,7 +89,7 @@ public class NotificationHandler
|
||||
if (App.ACTION_ALERT_CLICK.equals(action)) {
|
||||
// Start or bring to front the main activity
|
||||
Intent appIntent = new Intent(Intent.ACTION_MAIN);
|
||||
appIntent.setClassName(context, "org.mozilla.@MOZ_APP_NAME@.App");
|
||||
appIntent.setClassName(context, "@ANDROID_PACKAGE_NAME@.App");
|
||||
appIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
try {
|
||||
context.startActivity(appIntent);
|
||||
|
@ -36,7 +36,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#filter substitution
|
||||
package org.mozilla.@MOZ_APP_NAME@;
|
||||
package @ANDROID_PACKAGE_NAME@;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
@ -59,7 +59,7 @@ public class Restarter extends Activity {
|
||||
Log.i("Restarter", "pid: " + new Integer(android.os.Process.myPid()).toString());
|
||||
while((line = psOut.readLine()) != null) {
|
||||
Log.i("Restarter", "ps: " + line);
|
||||
if (line.contains("org.mozilla.@MOZ_APP_NAME@")){
|
||||
if (line.contains("@ANDROID_PACKAGE_NAME@")){
|
||||
if (!line.contains(new Integer(android.os.Process.myPid()).toString())){
|
||||
Log.i("Restarter", "app still running, wait a bit");
|
||||
stillRunning = true;
|
||||
@ -81,8 +81,8 @@ public class Restarter extends Activity {
|
||||
try {
|
||||
String action = "android.intent.action.MAIN";
|
||||
Intent intent = new Intent(action);
|
||||
intent.setClassName("org.mozilla.@MOZ_APP_NAME@",
|
||||
"org.mozilla.@MOZ_APP_NAME@.App");
|
||||
intent.setClassName("@ANDROID_PACKAGE_NAME@",
|
||||
"@ANDROID_PACKAGE_NAME@.App");
|
||||
Bundle b = getIntent().getExtras();
|
||||
if (b != null)
|
||||
intent.putExtras(b);
|
||||
|
@ -73,7 +73,7 @@ ifeq ($(OS_ARCH),Linux)
|
||||
# need to launch by package name.
|
||||
DEFINES += \
|
||||
-DXP_LINUX \
|
||||
-DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
|
||||
-DANDROID_PACKAGE_NAME=\"$(ANDROID_PACKAGE_NAME)\"
|
||||
$(NULL)
|
||||
DIRS += \
|
||||
google-breakpad/src/common \
|
||||
|
@ -612,10 +612,10 @@ nsresult SetExceptionHandler(nsILocalFile* aXREDirectory,
|
||||
crashReporterPath = ToNewCString(crashReporterPath_temp);
|
||||
#else
|
||||
// On Android, we launch using the application package name
|
||||
// instead of a filename, so use MOZ_APP_NAME to do that here.
|
||||
// instead of a filename, so use ANDROID_PACKAGE_NAME to do that here.
|
||||
//TODO: don't hardcode org.mozilla here, so other vendors can
|
||||
// ship XUL apps with different package names on Android?
|
||||
nsCString package("org.mozilla." MOZ_APP_NAME "/.CrashReporter");
|
||||
nsCString package(ANDROID_PACKAGE_NAME "/.CrashReporter");
|
||||
crashReporterPath = ToNewCString(package);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user