Bug 1161134 - Use AppConstants.BROWSER_INTENT_CLASS_NAME; r=nalexander

Instead of calling directly into the BrowserApp.class when setting up intents, use AppConstants.BROWSER_INTENT_CLASS_NAME.
This commit is contained in:
Nathan Toone 2015-05-04 11:58:05 -06:00
Родитель 6b46f2c695
Коммит 808a9ff88d
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -41,7 +41,7 @@ public class GuestSession {
private static PendingIntent getNotificationIntent(Context context) {
Intent intent = new Intent(NOTIFICATION_INTENT);
intent.setClass(context, BrowserApp.class);
intent.setClassName(context, AppConstants.BROWSER_INTENT_CLASS_NAME);
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
}

Просмотреть файл

@ -6,7 +6,6 @@
package org.mozilla.gecko.tabqueue;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.BrowserApp;
import org.mozilla.gecko.GeckoAppShell;
import org.mozilla.gecko.GeckoSharedPrefs;
import org.mozilla.gecko.Locales;
@ -69,7 +68,7 @@ public class TabQueueDispatcher extends Locales.LocaleAwareActivity {
* Start fennec with the supplied intent.
*/
private void loadNormally(Intent intent) {
intent.setClass(getApplicationContext(), BrowserApp.class);
intent.setClassName(getApplicationContext(), AppConstants.BROWSER_INTENT_CLASS_NAME);
startActivity(intent);
finish();
}

Просмотреть файл

@ -5,7 +5,7 @@
package org.mozilla.gecko.tabqueue;
import org.mozilla.gecko.BrowserApp;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.GeckoAppShell;
import org.mozilla.gecko.GeckoEvent;
import org.mozilla.gecko.GeckoProfile;
@ -154,7 +154,8 @@ public class TabQueueHelper {
public static void showNotification(final Context context, final int tabsQueued) {
ThreadUtils.assertNotOnUiThread();
Intent resultIntent = new Intent(context, BrowserApp.class);
Intent resultIntent = new Intent();
resultIntent.setClassName(context, AppConstants.BROWSER_INTENT_CLASS_NAME);
resultIntent.setAction(TabQueueHelper.LOAD_URLS_ACTION);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, resultIntent, PendingIntent.FLAG_CANCEL_CURRENT);

Просмотреть файл

@ -5,7 +5,7 @@
package org.mozilla.gecko.tabqueue;
import org.mozilla.gecko.BrowserApp;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.GeckoProfile;
import org.mozilla.gecko.GeckoSharedPrefs;
import org.mozilla.gecko.R;
@ -190,7 +190,7 @@ public class TabQueueService extends Service {
private void openNow(Intent intent) {
Intent forwardIntent = new Intent(intent);
forwardIntent.setClass(getApplicationContext(), BrowserApp.class);
forwardIntent.setClassName(getApplicationContext(), AppConstants.BROWSER_INTENT_CLASS_NAME);
forwardIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(forwardIntent);