mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 05:44:20 +00:00
Bug 990116 - Part 1: Split BROWSER_INTENT_CLASS and BROWSER_INTENT_CLASS_NAME. r=mcomella
This commit is contained in:
parent
041d930c2a
commit
2c81326cfb
@ -6,7 +6,10 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import org.mozilla.gecko.mozglue.RobocopTarget;
|
||||
|
||||
/**
|
||||
* A collection of constants that pertain to the build and runtime state of the
|
||||
* application. Typically these are sourced from build-time definitions (see
|
||||
@ -19,9 +22,19 @@ import org.mozilla.gecko.mozglue.RobocopTarget;
|
||||
@RobocopTarget
|
||||
public class AppConstants {
|
||||
public static final String ANDROID_PACKAGE_NAME = "@ANDROID_PACKAGE_NAME@";
|
||||
public static final String BROWSER_INTENT_CLASS = ANDROID_PACKAGE_NAME + ".App";
|
||||
public static final String MANGLED_ANDROID_PACKAGE_NAME = "@MANGLED_ANDROID_PACKAGE_NAME@";
|
||||
|
||||
/**
|
||||
* The Java Class instance that launches the browser.
|
||||
* <p>
|
||||
* This should always agree with <code>BROWSER_INTENT_CLASS_NAME</code>.
|
||||
*/
|
||||
public static final Class<? extends Activity> BROWSER_INTENT_CLASS = @ANDROID_PACKAGE_NAME@.App.class;
|
||||
/**
|
||||
* The name of the Java class that launches the browser.
|
||||
*/
|
||||
public static final String BROWSER_INTENT_CLASS_NAME = BROWSER_INTENT_CLASS.getName();
|
||||
|
||||
public static final String GRE_MILESTONE = "@GRE_MILESTONE@";
|
||||
|
||||
public static final String MOZ_APP_ABI = "@MOZ_APP_ABI@";
|
||||
|
@ -1230,7 +1230,7 @@ abstract public class BrowserApp extends GeckoApp
|
||||
} else if (event.equals("Prompt:ShowTop")) {
|
||||
// Bring this activity to front so the prompt is visible..
|
||||
Intent bringToFrontIntent = new Intent();
|
||||
bringToFrontIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.BROWSER_INTENT_CLASS);
|
||||
bringToFrontIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
bringToFrontIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
startActivity(bringToFrontIntent);
|
||||
} else if (event.equals("Accounts:Create")) {
|
||||
|
@ -450,7 +450,7 @@ public class CrashReporter extends Activity
|
||||
String action = "android.intent.action.MAIN";
|
||||
Intent intent = new Intent(action);
|
||||
intent.setClassName(AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.BROWSER_INTENT_CLASS);
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
intent.putExtra("didRestart", true);
|
||||
Log.i(LOGTAG, intent.toString());
|
||||
startActivity(intent);
|
||||
|
@ -39,7 +39,7 @@ public class DataReportingNotification {
|
||||
|
||||
// Launch main App to launch Data choices when notification is clicked.
|
||||
Intent prefIntent = new Intent(GeckoApp.ACTION_LAUNCH_SETTINGS);
|
||||
prefIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.BROWSER_INTENT_CLASS);
|
||||
prefIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
|
||||
GeckoPreferences.setResourceToOpen(prefIntent, "preferences_vendor");
|
||||
prefIntent.putExtra(ALERT_NAME_DATAREPORTING_NOTIFICATION, true);
|
||||
|
@ -833,7 +833,7 @@ public class GeckoAppShell
|
||||
shortcutIntent.setAction(GeckoApp.ACTION_BOOKMARK);
|
||||
shortcutIntent.setData(Uri.parse(aURI));
|
||||
shortcutIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.BROWSER_INTENT_CLASS);
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
}
|
||||
|
||||
Intent intent = new Intent();
|
||||
@ -871,7 +871,7 @@ public class GeckoAppShell
|
||||
shortcutIntent = new Intent();
|
||||
shortcutIntent.setAction(GeckoApp.ACTION_BOOKMARK);
|
||||
shortcutIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.BROWSER_INTENT_CLASS);
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
shortcutIntent.setData(Uri.parse(aURI));
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class Restarter extends Activity {
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.setClassName(AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.BROWSER_INTENT_CLASS);
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
Bundle b = getIntent().getExtras();
|
||||
if (b != null)
|
||||
intent.putExtras(b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user