Skip to content

Commit

Permalink
bug 620811 - Crash on restarting fennec r=mwu a=stuart
Browse files Browse the repository at this point in the history
--HG--
branch : GECKO20b8_20101214_RELBRANCH
extra : transplant_source : %3C%F0%07%24%04%1D%93%2B%1F%FC%B1bW%9DJ%D6%9Ds%DD%7B
  • Loading branch information
bslassey committed Dec 22, 2010
1 parent 2559df5 commit 0351759
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion embedding/android/NotificationHandler.java.in
Expand Up @@ -94,7 +94,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(this, "org.mozilla.@MOZ_APP_NAME@.App");
appIntent.setClassName(this, "@ANDROID_PACKAGE_NAME@.App");
try {
startActivity(appIntent);
} catch (ActivityNotFoundException e) {
Expand Down
8 changes: 4 additions & 4 deletions embedding/android/Restarter.java.in
Expand Up @@ -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.*;
Expand All @@ -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;
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion toolkit/crashreporter/Makefile.in
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions toolkit/crashreporter/nsExceptionHandler.cpp
Expand Up @@ -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

Expand Down

0 comments on commit 0351759

Please sign in to comment.