Bug 1161195 - Part 2: Rename variables. r=nalexander
authorNathan Toone <nathan@toonetown.com>
Tue, 05 May 2015 20:11:15 -0600
changeset 273940 b36b6e9871105f4c191f935c10d2452452399adc
parent 273939 df64a65ca1bd87bdaa2c865ee536d80242cbfe36
child 273941 0cecdb107e9116a88be854ccfd46ff03c69b8b6a
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1161195
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1161195 - Part 2: Rename variables. r=nalexander Rename variables to be consistent with the name used in confvars.sh.
mobile/android/base/AppConstants.java.in
mobile/android/base/BrowserApp.java
mobile/android/base/CrashReporter.java
mobile/android/base/DataReportingNotification.java
mobile/android/base/GeckoAppShell.java
mobile/android/base/GuestSession.java
mobile/android/base/Restarter.java
mobile/android/base/background/common/GlobalConstants.java
mobile/android/base/overlays/ui/ShareDialog.java
mobile/android/base/tabqueue/TabQueueDispatcher.java
mobile/android/base/tabqueue/TabQueueHelper.java
mobile/android/base/tabqueue/TabQueueService.java
mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
mobile/android/search/java/org/mozilla/search/SearchWidget.java
mobile/android/tests/browser/junit3/src/BrowserTestCase.java
mobile/android/tests/browser/robocop/BaseRobocopTest.java
--- a/mobile/android/base/AppConstants.java.in
+++ b/mobile/android/base/AppConstants.java.in
@@ -78,25 +78,25 @@ public class AppConstants {
         public static final boolean preHCMR2 = MAX_SDK_VERSION < 13 || (MIN_SDK_VERSION < 13 && Build.VERSION.SDK_INT < 13);
         public static final boolean preHCMR1 = MAX_SDK_VERSION < 12 || (MIN_SDK_VERSION < 12 && Build.VERSION.SDK_INT < 12);
         public static final boolean preHC = MAX_SDK_VERSION < 11 || (MIN_SDK_VERSION < 11 && Build.VERSION.SDK_INT < 11);
     }
 
     /**
      * 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@";
 
     public static final String MOZ_APP_ABI = "@MOZ_APP_ABI@";
     public static final String MOZ_APP_BASENAME = "@MOZ_APP_BASENAME@";
 
     // For the benefit of future archaeologists: APP_BUILDID and
     // MOZ_APP_BUILDID are *exactly* the same.
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1864,17 +1864,17 @@ public class BrowserApp extends GeckoApp
                     DataReportingNotification.checkAndNotifyPolicy(GeckoAppShell.getContext());
                 }
 
             } else if (event.equals("Search:Keyword")) {
                 storeSearchQuery(message.getString("query"));
             } 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")) {
                 final String kind = message.getString("kind");
                 final JSONObject response = new JSONObject();
 
                 if ("any".equals(kind)) {
                     response.put("exists", SyncAccounts.syncAccountsExist(getContext()) ||
--- a/mobile/android/base/CrashReporter.java
+++ b/mobile/android/base/CrashReporter.java
@@ -444,17 +444,17 @@ public class CrashReporter extends Activ
         doFinish();
     }
 
     private void doRestart() {
         try {
             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);
         } catch (Exception e) {
             Log.e(LOGTAG, "error while trying to restart", e);
         }
     }
 
--- a/mobile/android/base/DataReportingNotification.java
+++ b/mobile/android/base/DataReportingNotification.java
@@ -71,17 +71,17 @@ public class DataReportingNotification {
     /**
      * Launch a notification of the data policy, and record notification time and version.
      */
     private static void notifyDataPolicy(Context context, SharedPreferences sharedPrefs) {
         boolean result = false;
         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);
 
             PendingIntent contentIntent = PendingIntent.getActivity(context, 0, prefIntent, PendingIntent.FLAG_UPDATE_CURRENT);
             final Resources resources = context.getResources();
 
             // Create and send notification.
--- a/mobile/android/base/GeckoAppShell.java
+++ b/mobile/android/base/GeckoAppShell.java
@@ -842,17 +842,17 @@ public class GeckoAppShell
      * Call this method only on the background thread.
      */
     private static void doCreateShortcut(final String aTitle, final String aURI, final Bitmap aIcon) {
         // The intent to be launched by the shortcut.
         Intent shortcutIntent = new Intent();
         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);
         intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, getLauncherIcon(aIcon));
 
         if (aTitle != null) {
             intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, aTitle);
         } else {
@@ -1200,17 +1200,17 @@ public class GeckoAppShell
 
         if ("vnd.youtube".equals(scheme) &&
             !hasHandlersForIntent(intent) &&
             !TextUtils.isEmpty(uri.getSchemeSpecificPart())) {
 
             // 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) {
                 // This should never occur.
                 Log.wtf(LOGTAG, "Class " + browserClassName + " not found!");
                 return null;
             }
 
--- a/mobile/android/base/GuestSession.java
+++ b/mobile/android/base/GuestSession.java
@@ -36,17 +36,17 @@ public class GuestSession {
             return false;
         }
 
         return profile.locked();
     }
 
     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);
     }
 
     public static void showNotification(Context context) {
         final NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
         final Resources res = context.getResources();
         builder.setContentTitle(res.getString(R.string.guest_browsing_notification_title))
                .setContentText(res.getString(R.string.guest_browsing_notification_text))
--- a/mobile/android/base/Restarter.java
+++ b/mobile/android/base/Restarter.java
@@ -26,17 +26,17 @@ public class Restarter extends Service {
             Thread.sleep(100);
         } catch (final InterruptedException e) {
         }
 
         final Intent restartIntent = (Intent)intent.getParcelableExtra(Intent.EXTRA_INTENT);
         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);
     }
 
     @Override
     public int onStartCommand(Intent intent, int flags, int startId) {
         doRestart(intent);
         stopSelf(startId);
--- a/mobile/android/base/background/common/GlobalConstants.java
+++ b/mobile/android/base/background/common/GlobalConstants.java
@@ -7,17 +7,17 @@ package org.mozilla.gecko.background.com
 import org.mozilla.gecko.AppConstants;
 
 /**
  * Preprocessed class for storing preprocessed values common to all
  * Android services.
  */
 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
    * should be received only by the Firefox versions with the given Android
    * package name.
    */
   public static final String PER_ANDROID_PACKAGE_PERMISSION = AppConstants.ANDROID_PACKAGE_NAME + ".permission.PER_ANDROID_PACKAGE";
 
--- a/mobile/android/base/overlays/ui/ShareDialog.java
+++ b/mobile/android/base/overlays/ui/ShareDialog.java
@@ -403,17 +403,17 @@ public class ShareDialog extends Locales
 
         Telemetry.sendUIEvent(TelemetryContract.Event.SAVE, TelemetryContract.Method.SHARE_OVERLAY, "bookmark");
     }
 
     public void launchBrowser() {
         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.
         } finally {
             slideOut();
         }
     }
 
--- a/mobile/android/base/tabqueue/TabQueueDispatcher.java
+++ b/mobile/android/base/tabqueue/TabQueueDispatcher.java
@@ -63,17 +63,17 @@ public class TabQueueDispatcher extends 
         startService(intent);
         finish();
     }
 
     /**
      * 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();
     }
 
     /**
      * Abort as we were started with no URL.
      * @param dataString
      */
--- a/mobile/android/base/tabqueue/TabQueueHelper.java
+++ b/mobile/android/base/tabqueue/TabQueueHelper.java
@@ -150,17 +150,17 @@ public class TabQueueHelper {
      *
      * @param context
      * @param tabsQueued
      */
     public static void showNotification(final Context context, final int tabsQueued) {
         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);
 
         final String text;
         final Resources resources = context.getResources();
         if (tabsQueued == 1) {
             text = resources.getString(R.string.tab_queue_notification_text_singular);
--- a/mobile/android/base/tabqueue/TabQueueService.java
+++ b/mobile/android/base/tabqueue/TabQueueService.java
@@ -185,17 +185,17 @@ public class TabQueueService extends Ser
 
         tabQueueHandler.postDelayed(stopServiceRunnable, TOAST_TIMEOUT);
 
         return START_REDELIVER_INTENT;
     }
 
     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);
 
         TabQueueHelper.removeNotification(getApplicationContext());
 
         GeckoSharedPrefs.forApp(getApplicationContext()).edit().remove(GeckoPreferences.PREFS_TAB_QUEUE_LAST_SITE)
                                                                .remove(GeckoPreferences.PREFS_TAB_QUEUE_LAST_TIME)
                                                                .apply();
--- a/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
+++ b/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
@@ -125,17 +125,17 @@ public class PostSearchFragment extends 
 
             try {
                 // If the url URI does not have an intent scheme, the intent data will be the entire
                 // URI and its action will be ACTION_VIEW.
                 final Intent i = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
 
                 // 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 {
                     Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH,
                             TelemetryContract.Method.INTENT, "search-result");
                 }
 
                 startActivity(i);
--- a/mobile/android/search/java/org/mozilla/search/SearchWidget.java
+++ b/mobile/android/search/java/org/mozilla/search/SearchWidget.java
@@ -63,33 +63,33 @@ public class SearchWidget extends AppWid
     @Override
     public void onReceive(final Context context, final Intent intent) {
         // This will hold the intent to redispatch.
         final Intent redirect;
         switch (intent.getAction()) {
             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");
                 break;
             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");
                 break;
             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");
                 break;
             default:
                 redirect = null;
         }
 
--- a/mobile/android/tests/browser/junit3/src/BrowserTestCase.java
+++ b/mobile/android/tests/browser/junit3/src/BrowserTestCase.java
@@ -15,27 +15,27 @@ import android.test.ActivityInstrumentat
 @SuppressWarnings("unchecked")
 public class BrowserTestCase extends ActivityInstrumentationTestCase2<Activity> {
     @SuppressWarnings("unused")
     private static String LOG_TAG = "BrowserTestCase";
 
     /**
      * 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;
 
     // Use reflection here so we don't have to either (a) preprocess this
     // file, or (b) get access to Robocop's TestConstants class from these
     // instrumentation tests.
     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;
         }
         BROWSER_INTENT_CLASS = cl;
     }
 
     public BrowserTestCase() {
--- a/mobile/android/tests/browser/robocop/BaseRobocopTest.java
+++ b/mobile/android/tests/browser/robocop/BaseRobocopTest.java
@@ -38,25 +38,25 @@ public abstract class BaseRobocopTest ex
         TALOS
     }
 
     private static final String DEFAULT_ROOT_PATH = "/mnt/sdcard/tests";
 
     /**
      * 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;
 
     // Use reflection here so we don't have to preprocess this file.
     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;
         }
         BROWSER_INTENT_CLASS = cl;
     }
 
     protected Assert mAsserter;