Bug 1220892 - Part 1: Remove MOZ_ANDROID_NATIVE_ACCOUNTS_UI. r=mcomella

--HG--
extra : commitid : 3drJfjq0uyX
extra : rebase_source : 67a2e524b90f78e8f719e1f8efc9a84a6f9a19dd
extra : histedit_source : 68805f753e785e2d935ee221ba5243597ec24f92
This commit is contained in:
Nick Alexander 2015-11-30 14:32:17 -08:00
Родитель 1ffe5e6606
Коммит 3e1c5ea1e5
11 изменённых файлов: 18 добавлений и 89 удалений

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

@ -8481,13 +8481,6 @@ if test -n "$MOZ_DEVICES"; then
AC_DEFINE(MOZ_DEVICES)
fi
dnl Build Fennec Android native UI to manage accounts. This will go away as
dnl Fennec transitions to web UI to manage accounts.
AC_SUBST(MOZ_ANDROID_NATIVE_ACCOUNT_UI)
if test -n "$MOZ_ANDROID_NATIVE_ACCOUNT_UI"; then
AC_DEFINE(MOZ_ANDROID_NATIVE_ACCOUNT_UI)
fi
dnl ========================================================
if test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=

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

@ -346,13 +346,6 @@ public class AppConstants {
false;
//#endif
public static final boolean MOZ_ANDROID_NATIVE_ACCOUNT_UI =
//#ifdef MOZ_ANDROID_NATIVE_ACCOUNT_UI
true;
//#else
false;
//#endif
/**
* Target CPU architecture: "armeabi-v7a", "x86, "mips", ..
*/

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

@ -563,20 +563,18 @@ var BrowserApp = {
InitLater(() => AccessFu.attach(window), window, "AccessFu");
}
if (!AppConstants.MOZ_ANDROID_NATIVE_ACCOUNT_UI) {
// We can't delay registering WebChannel listeners: if the first page is
// about:accounts, which can happen when starting the Firefox Account flow
// from the first run experience, or via the Firefox Account Status
// Activity, we can and do miss messages from the fxa-content-server.
// However, we never allow suitably restricted profiles from listening to
// fxa-content-server messages.
if (ParentalControls.isAllowed(ParentalControls.MODIFY_ACCOUNTS)) {
console.log("browser.js: loading Firefox Accounts WebChannel");
Cu.import("resource://gre/modules/FxAccountsWebChannel.jsm");
EnsureFxAccountsWebChannel();
} else {
console.log("browser.js: not loading Firefox Accounts WebChannel; this profile cannot connect to Firefox Accounts.");
}
// We can't delay registering WebChannel listeners: if the first page is
// about:accounts, which can happen when starting the Firefox Account flow
// from the first run experience, or via the Firefox Account Status
// Activity, we can and do miss messages from the fxa-content-server.
// However, we never allow suitably restricted profiles from listening to
// fxa-content-server messages.
if (ParentalControls.isAllowed(ParentalControls.MODIFY_ACCOUNTS)) {
console.log("browser.js: loading Firefox Accounts WebChannel");
Cu.import("resource://gre/modules/FxAccountsWebChannel.jsm");
EnsureFxAccountsWebChannel();
} else {
console.log("browser.js: not loading Firefox Accounts WebChannel; this profile cannot connect to Firefox Accounts.");
}
// Notify Java that Gecko has loaded.

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

@ -60,10 +60,8 @@ chrome.jar:
content/aboutDevices.xhtml (content/aboutDevices.xhtml)
content/aboutDevices.js (content/aboutDevices.js)
#endif
#ifndef MOZ_ANDROID_NATIVE_ACCOUNT_UI
content/aboutAccounts.xhtml (content/aboutAccounts.xhtml)
content/aboutAccounts.js (content/aboutAccounts.js)
#endif
content/aboutLogins.xhtml (content/aboutLogins.xhtml)
content/aboutLogins.js (content/aboutLogins.js)
#ifdef NIGHTLY_BUILD

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

@ -73,7 +73,11 @@ var modules = {
uri: "chrome://browser/content/aboutLogins.xhtml",
privileged: true
},
}
accounts: {
uri: "chrome://browser/content/aboutAccounts.xhtml",
privileged: true
},
};
if (AppConstants.MOZ_SERVICES_HEALTHREPORT) {
modules['healthreport'] = {
@ -87,12 +91,6 @@ if (AppConstants.MOZ_DEVICES) {
privileged: true
};
}
if (!AppConstants.MOZ_ANDROID_NATIVE_ACCOUNT_UI) {
modules['accounts'] = {
uri: "chrome://browser/content/aboutAccounts.xhtml",
privileged: true
};
}
function AboutRedirector() {}
AboutRedirector.prototype = {

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

@ -20,9 +20,7 @@ contract @mozilla.org/network/protocol/about;1?what=blocked {322ba47e-7047-4f71-
#ifdef MOZ_DEVICES
contract @mozilla.org/network/protocol/about;1?what=devices {322ba47e-7047-4f71-aebf-cb7d69325cd9}
#endif
#ifndef MOZ_ANDROID_NATIVE_ACCOUNT_UI
contract @mozilla.org/network/protocol/about;1?what=accounts {322ba47e-7047-4f71-aebf-cb7d69325cd9}
#endif
contract @mozilla.org/network/protocol/about;1?what=logins {322ba47e-7047-4f71-aebf-cb7d69325cd9}
# DirectoryProvider.js

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

@ -7,10 +7,8 @@
@AB_CD@.jar:
% locale browser @AB_CD@ %locale/@AB_CD@/browser/
locale/@AB_CD@/browser/about.dtd (%chrome/about.dtd)
#ifndef MOZ_ANDROID_NATIVE_ACCOUNT_UI
locale/@AB_CD@/browser/aboutAccounts.dtd (%chrome/aboutAccounts.dtd)
locale/@AB_CD@/browser/aboutAccounts.properties (%chrome/aboutAccounts.properties)
#endif
locale/@AB_CD@/browser/aboutAddons.dtd (%chrome/aboutAddons.dtd)
locale/@AB_CD@/browser/aboutAddons.properties (%chrome/aboutAddons.properties)
#ifdef MOZ_DEVICES

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

@ -32,12 +32,6 @@
<action android:name="android.intent.action.MAIN" />
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
</intent-filter>
#ifdef MOZ_ANDROID_NATIVE_ACCOUNT_UI
<intent-filter>
<action android:name="@ANDROID_PACKAGE_NAME@.ACTION_FXA_GET_STARTED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
#endif
</activity>
<activity
@ -53,12 +47,6 @@
android:configChanges="locale|layoutDirection"
android:noHistory="true"
android:windowSoftInputMode="adjustResize">
#ifdef MOZ_ANDROID_NATIVE_ACCOUNT_UI
<intent-filter>
<action android:name="@ANDROID_PACKAGE_NAME@.ACTION_FXA_CONFIRM_ACCOUNT"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
#endif
</activity>
<activity
@ -81,12 +69,6 @@
android:name="org.mozilla.gecko.fxa.activities.FxAccountUpdateCredentialsActivity"
android:configChanges="locale|layoutDirection"
android:windowSoftInputMode="adjustResize">
#ifdef MOZ_ANDROID_NATIVE_ACCOUNT_UI
<intent-filter>
<action android:name="@ANDROID_PACKAGE_NAME@.ACTION_FXA_UPDATE_CREDENTIALS"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
#endif
</activity>
<activity
@ -94,12 +76,6 @@
android:name="org.mozilla.gecko.fxa.activities.FxAccountFinishMigratingActivity"
android:configChanges="locale|layoutDirection"
android:windowSoftInputMode="adjustResize">
#ifdef MOZ_ANDROID_NATIVE_ACCOUNT_UI
<intent-filter>
<action android:name="@ANDROID_PACKAGE_NAME@.ACTION_FXA_FINISH_MIGRATING"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
#endif
</activity>
<activity
@ -134,7 +110,6 @@
</intent-filter>
</receiver>
#ifndef MOZ_ANDROID_NATIVE_ACCOUNT_UI
<activity
android:exported="false"
android:name="org.mozilla.gecko.fxa.activities.FxAccountGetStartedActivityWeb">
@ -170,4 +145,3 @@
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
#endif

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

@ -167,9 +167,6 @@ public class FxAccountStatusFragment
accountCategory = (PreferenceCategory) ensureFindPreference("signed_in_as_category");
profilePreference = ensureFindPreference("profile");
manageAccountPreference = ensureFindPreference("manage_account");
if (AppConstants.MOZ_ANDROID_NATIVE_ACCOUNT_UI) {
accountCategory.removePreference(manageAccountPreference);
}
authServerPreference = ensureFindPreference("auth_server");
removeAccountPreference = ensureFindPreference("remove_account");
@ -231,16 +228,11 @@ public class FxAccountStatusFragment
@Override
public boolean onPreferenceClick(Preference preference) {
if (preference == profilePreference) {
if (!AppConstants.MOZ_ANDROID_NATIVE_ACCOUNT_UI) {
// There is no native equivalent, bind the click action to fire an intent.
ActivityUtils.openURLInFennec(getActivity().getApplicationContext(), "about:accounts?action=avatar");
}
// Either we handled the event or there is no native equivalent.
ActivityUtils.openURLInFennec(getActivity().getApplicationContext(), "about:accounts?action=avatar");
return true;
}
if (preference == manageAccountPreference) {
// There's no native equivalent, so no need to re-direct through an Intent filter.
ActivityUtils.openURLInFennec(getActivity().getApplicationContext(), "about:accounts?action=manage");
return true;
}
@ -281,10 +273,6 @@ public class FxAccountStatusFragment
}
if (preference == needsVerificationPreference) {
if (AppConstants.MOZ_ANDROID_NATIVE_ACCOUNT_UI) {
FxAccountCodeResender.resendCode(getActivity().getApplicationContext(), fxAccount);
}
final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_CONFIRM_ACCOUNT);
// Per http://stackoverflow.com/a/8992365, this triggers a known bug with
// the soft keyboard not being shown for the started activity. Why, Android, why?

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

@ -8,9 +8,7 @@ chrome.jar:
% skin browser classic/1.0 %skin/
skin/aboutPage.css (aboutPage.css)
skin/about.css (about.css)
#ifndef MOZ_ANDROID_NATIVE_ACCOUNT_UI
skin/aboutAccounts.css (aboutAccounts.css)
#endif
skin/aboutAddons.css (aboutAddons.css)
skin/aboutBase.css (aboutBase.css)
#ifdef MOZ_DEVICES

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

@ -73,13 +73,6 @@ this.AppConstants = Object.freeze({
false,
#endif
MOZ_ANDROID_NATIVE_ACCOUNT_UI:
#ifdef MOZ_ANDROID_NATIVE_ACCOUNT_UI
true,
#else
false,
#endif
MOZ_SAFE_BROWSING:
#ifdef MOZ_SAFE_BROWSING
true,