зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1161195 - Part 2: Rename variables. r=nalexander
Rename variables to be consistent with the name used in confvars.sh.
This commit is contained in:
Родитель
79c3b4b7be
Коммит
0f9afa9766
|
@ -83,15 +83,15 @@ public class AppConstants {
|
|||
/**
|
||||
* The name of the Java class that represents the android application.
|
||||
*/
|
||||
public static final String MOZ_ANDROID_APPLICATION_CLASS_NAME = "@MOZ_ANDROID_APPLICATION_CLASS@";
|
||||
public static final String MOZ_ANDROID_APPLICATION_CLASS = "@MOZ_ANDROID_APPLICATION_CLASS@";
|
||||
/**
|
||||
* The name of the Java class that launches the browser activity.
|
||||
*/
|
||||
public static final String BROWSER_INTENT_CLASS_NAME = "@MOZ_ANDROID_BROWSER_INTENT_CLASS@";
|
||||
public static final String MOZ_ANDROID_BROWSER_INTENT_CLASS = "@MOZ_ANDROID_BROWSER_INTENT_CLASS@";
|
||||
/**
|
||||
* The name of the Java class that launches the search activity.
|
||||
*/
|
||||
public static final String SEARCH_INTENT_CLASS_NAME = "@MOZ_ANDROID_SEARCH_INTENT_CLASS@";
|
||||
public static final String MOZ_ANDROID_SEARCH_INTENT_CLASS = "@MOZ_ANDROID_SEARCH_INTENT_CLASS@";
|
||||
|
||||
public static final String GRE_MILESTONE = "@GRE_MILESTONE@";
|
||||
|
||||
|
|
|
@ -1869,7 +1869,7 @@ 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_NAME);
|
||||
bringToFrontIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
bringToFrontIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
startActivity(bringToFrontIntent);
|
||||
} else if (event.equals("Accounts:Exist")) {
|
||||
|
|
|
@ -449,7 +449,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_NAME);
|
||||
AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
intent.putExtra("didRestart", true);
|
||||
Log.i(LOGTAG, intent.toString());
|
||||
startActivity(intent);
|
||||
|
|
|
@ -76,7 +76,7 @@ public class DataReportingNotification {
|
|||
try {
|
||||
// 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_NAME);
|
||||
prefIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
|
||||
GeckoPreferences.setResourceToOpen(prefIntent, "preferences_vendor");
|
||||
prefIntent.putExtra(ALERT_NAME_DATAREPORTING_NOTIFICATION, true);
|
||||
|
|
|
@ -847,7 +847,7 @@ public class GeckoAppShell
|
|||
shortcutIntent.setAction(GeckoApp.ACTION_HOMESCREEN_SHORTCUT);
|
||||
shortcutIntent.setData(Uri.parse(aURI));
|
||||
shortcutIntent.setClassName(AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
|
||||
|
@ -1205,7 +1205,7 @@ public class GeckoAppShell
|
|||
// Return an intent with a URI that will open the YouTube page in the
|
||||
// current Fennec instance.
|
||||
final Class<?> c;
|
||||
final String browserClassName = AppConstants.BROWSER_INTENT_CLASS_NAME;
|
||||
final String browserClassName = AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS;
|
||||
try {
|
||||
c = Class.forName(browserClassName);
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public class GuestSession {
|
|||
|
||||
private static PendingIntent getNotificationIntent(Context context) {
|
||||
Intent intent = new Intent(NOTIFICATION_INTENT);
|
||||
intent.setClassName(context, AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
intent.setClassName(context, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class Restarter extends Service {
|
|||
restartIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.putExtra("didRestart", true)
|
||||
.setClassName(getApplicationContext(),
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
startActivity(restartIntent);
|
||||
Log.d(LOGTAG, "Launched " + restartIntent);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.mozilla.gecko.AppConstants;
|
|||
*/
|
||||
public class GlobalConstants {
|
||||
public static final String BROWSER_INTENT_PACKAGE = AppConstants.ANDROID_PACKAGE_NAME;
|
||||
public static final String BROWSER_INTENT_CLASS = AppConstants.BROWSER_INTENT_CLASS_NAME;
|
||||
public static final String BROWSER_INTENT_CLASS = AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS;
|
||||
|
||||
/**
|
||||
* Bug 800244: this signing-level permission protects broadcast intents that
|
||||
|
|
|
@ -408,7 +408,7 @@ public class ShareDialog extends Locales.LocaleAwareActivity implements SendTabT
|
|||
try {
|
||||
// This can launch in the guest profile. Sorry.
|
||||
final Intent i = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
|
||||
i.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
i.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
startActivity(i);
|
||||
} catch (URISyntaxException e) {
|
||||
// Nothing much we can do.
|
||||
|
|
|
@ -68,7 +68,7 @@ public class TabQueueDispatcher extends Locales.LocaleAwareActivity {
|
|||
* Start fennec with the supplied intent.
|
||||
*/
|
||||
private void loadNormally(Intent intent) {
|
||||
intent.setClassName(getApplicationContext(), AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
intent.setClassName(getApplicationContext(), AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ public class TabQueueHelper {
|
|||
ThreadUtils.assertNotOnUiThread();
|
||||
|
||||
Intent resultIntent = new Intent();
|
||||
resultIntent.setClassName(context, AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
resultIntent.setClassName(context, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
resultIntent.setAction(TabQueueHelper.LOAD_URLS_ACTION);
|
||||
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, resultIntent, PendingIntent.FLAG_CANCEL_CURRENT);
|
||||
|
|
|
@ -190,7 +190,7 @@ public class TabQueueService extends Service {
|
|||
|
||||
private void openNow(Intent intent) {
|
||||
Intent forwardIntent = new Intent(intent);
|
||||
forwardIntent.setClassName(getApplicationContext(), AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
forwardIntent.setClassName(getApplicationContext(), AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
forwardIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(forwardIntent);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ public class PostSearchFragment extends Fragment {
|
|||
|
||||
// If the intent URI didn't specify a package, open this in Fennec.
|
||||
if (i.getPackage() == null) {
|
||||
i.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
i.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL,
|
||||
TelemetryContract.Method.CONTENT, "search-result");
|
||||
} else {
|
||||
|
|
|
@ -68,7 +68,7 @@ public class SearchWidget extends AppWidgetProvider {
|
|||
case ACTION_LAUNCH_BROWSER:
|
||||
redirect = buildRedirectIntent(Intent.ACTION_MAIN,
|
||||
AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME,
|
||||
AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS,
|
||||
intent);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH,
|
||||
TelemetryContract.Method.WIDGET, "browser");
|
||||
|
@ -76,7 +76,7 @@ public class SearchWidget extends AppWidgetProvider {
|
|||
case ACTION_LAUNCH_NEW_TAB:
|
||||
redirect = buildRedirectIntent(Intent.ACTION_VIEW,
|
||||
AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.BROWSER_INTENT_CLASS_NAME,
|
||||
AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS,
|
||||
intent);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH,
|
||||
TelemetryContract.Method.WIDGET, "new-tab");
|
||||
|
@ -84,7 +84,7 @@ public class SearchWidget extends AppWidgetProvider {
|
|||
case ACTION_LAUNCH_SEARCH:
|
||||
redirect = buildRedirectIntent(Intent.ACTION_VIEW,
|
||||
AppConstants.ANDROID_PACKAGE_NAME,
|
||||
AppConstants.SEARCH_INTENT_CLASS_NAME,
|
||||
AppConstants.MOZ_ANDROID_SEARCH_INTENT_CLASS,
|
||||
intent);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH,
|
||||
TelemetryContract.Method.WIDGET, "search");
|
||||
|
|
|
@ -20,7 +20,7 @@ public class BrowserTestCase extends ActivityInstrumentationTestCase2<Activity>
|
|||
/**
|
||||
* The Java Class instance that launches the browser.
|
||||
* <p>
|
||||
* This should always agree with {@link AppConstants#BROWSER_INTENT_CLASS_NAME}.
|
||||
* This should always agree with {@link AppConstants#MOZ_ANDROID_BROWSER_INTENT_CLASS}.
|
||||
*/
|
||||
public static final Class<? extends Activity> BROWSER_INTENT_CLASS;
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class BrowserTestCase extends ActivityInstrumentationTestCase2<Activity>
|
|||
static {
|
||||
Class<? extends Activity> cl;
|
||||
try {
|
||||
cl = (Class<? extends Activity>) Class.forName(AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
cl = (Class<? extends Activity>) Class.forName(AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Oh well.
|
||||
cl = Activity.class;
|
||||
|
|
|
@ -43,7 +43,7 @@ public abstract class BaseRobocopTest extends ActivityInstrumentationTestCase2<A
|
|||
/**
|
||||
* The Java Class instance that launches the browser.
|
||||
* <p>
|
||||
* This should always agree with {@link AppConstants#BROWSER_INTENT_CLASS_NAME}.
|
||||
* This should always agree with {@link AppConstants#MOZ_ANDROID_BROWSER_INTENT_CLASS}.
|
||||
*/
|
||||
public static final Class<? extends Activity> BROWSER_INTENT_CLASS;
|
||||
|
||||
|
@ -51,7 +51,7 @@ public abstract class BaseRobocopTest extends ActivityInstrumentationTestCase2<A
|
|||
static {
|
||||
Class<? extends Activity> cl;
|
||||
try {
|
||||
cl = (Class<? extends Activity>) Class.forName(AppConstants.BROWSER_INTENT_CLASS_NAME);
|
||||
cl = (Class<? extends Activity>) Class.forName(AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Oh well.
|
||||
cl = Activity.class;
|
||||
|
|
Загрузка…
Ссылка в новой задаче